/* Fuentes modernas */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset y variables CSS */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 18px;
}

/* Header moderno */
.modern-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-section i {
    font-size: 2rem;
    color: var(--primary-color);
}

.logo-image {
    height: 4rem;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: brightness(1.1);
}

.logo-section h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.country-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Contenido principal */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
}

.calculator-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Card de la calculadora */
.calculator-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.card-header h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.card-header p {
    opacity: 0.9;
    margin: 0;
    font-size: 1.125rem;
}

.card-body {
    padding: 2rem;
}

/* Campos de entrada modernos */
.input-field {
    margin-bottom: 1.5rem;
}

.input-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.input-field label i {
    color: var(--primary-color);
    width: 16px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    z-index: 2;
}

.modern-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1.375rem;
    font-weight: 500;
    background: var(--surface);
    transition: all 0.2s ease;
    outline: none;
}

.modern-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modern-input:hover {
    border-color: var(--secondary-color);
}

.percentage-badge {
    position: absolute;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
}

/* Botones modernos */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    text-decoration: none;
}

.btn-clear {
    background: var(--danger-color);
    color: white;
}

.btn-clear:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-text {
    background: var(--secondary-color);
    color: white;
}

.btn-text:hover {
    background: #475569;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-close {
    background: var(--secondary-color);
    color: white;
}

.btn-close:hover {
    background: #475569;
}

/* Modales modernos */
.modal-modern {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modern-modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border: none;
    position: relative;
}

.modal-title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-title-section i {
    font-size: 1.25rem;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modern-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modern-modal-body {
    padding: 2rem;
}

.modern-modal-footer {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
    display: flex;
    justify-content: center;
}

/* Info card en modal */
.info-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.info-icon {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.info-content h5 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.125rem;
}

.info-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.formula-section h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.125rem;
}

.formula-item {
    background: #f1f5f9;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--success-color);
}

.formula {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1.125rem;
}

/* Modal de texto */
.text-result-card {
    background: #f8fafc;
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.text-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.125rem;
}

.text-content {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.text-content p {
    margin: 0;
    font-size: 1.375rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 500;
}

.copy-section {
    display: flex;
    justify-content: center;
}

.btn-copy {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
}

.btn-copy:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0;
    }
    
    .calculator-wrapper {
        padding: 0 0.5rem;
    }
    
    .card-header {
        padding: 1.5rem 1rem;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .logo-section h1 {
        font-size: 1.5rem;
    }
    
    .action-buttons {
        gap: 0.75rem;
    }
}

/* Animaciones suaves */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-card {
    animation: fadeIn 0.5s ease-out;
}

/* Ocultar elementos de Bootstrap que no necesitamos */
.navbar-default,
.form-group,
.form-control,
.input-group,
.input-group-addon,
.btn-default,
.btn-danger,
.btn-primary {
    /* Estos estilos serán sobrescritos por los nuevos */
}