
:root {
    --bg-dark: #0A0E27;
    --bg-card: #FFFFFF;
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --secondary: #10B981;
    --accent: #F59E0B;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.page-wrapper { 
    max-width: 1400px; 
    margin: 0 auto; 
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* HEADER MEJORADO */
.main-header { 
    text-align: center; 
    margin-bottom: 50px; 
    color: white;
    padding: 40px 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    color: #C7D2FE;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.badge::before {
    content: "✨";
    font-size: 1rem;
}

.main-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff 0%, #A5B4FC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
    line-height: 1.1;
}

.main-header p { 
    color: #94A3B8; 
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 600px;
    margin: 0 auto;
}

/* TABS PARA COMPARADOR */
.tabs-container {
    background: rgba(255,255,255,0.05);
    padding: 8px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    display: inline-flex;
    gap: 8px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #94A3B8;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.95rem;
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* CALCULADORA PRINCIPAL */
.calculator-container {
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    margin-bottom: 40px;
}

.calc-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    min-height: 700px;
}

/* CONFIG PANEL MEJORADO */
.config-panel {
    padding: 40px;
    border-right: 1px solid var(--border);
    background: linear-gradient(to bottom, #FAFBFC 0%, #F8FAFC 100%);
}

.panel-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title::before {
    content: "⚙️";
    font-size: 1.5rem;
}

.input-group {
    margin-bottom: 32px;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.input-field {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    width: 130px;
}

.input-field:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    transform: translateY(-2px);
}

.input-field input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: right;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    outline: none;
}

.input-field input::-webkit-outer-spin-button,
.input-field input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.currency, .unit {
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 6px;
    font-size: 0.9rem;
}

/* SLIDER MEJORADO */
.range-slider {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #E2E8F0 0%, #CBD5E1 100%);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.3s;
}

.range-slider:hover {
    background: linear-gradient(to right, #CBD5E1 0%, #94A3B8 100%);
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border: 4px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px var(--primary-glow);
}

.pills {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.pill {
    font-size: 0.75rem;
    background: white;
    border: 2px solid #E2E8F0;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
    font-family: inherit;
}

.pill:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--primary-glow);
}

/* RESULTADOS MEJORADOS */
.results-panel {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.total-display {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 25px;
    color: white;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.total-display::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.total-display .label {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.total-display h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin: 10px 0 0 0;
    letter-spacing: -2px;
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-item strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    display: block;
    color: var(--text-main);
}

.highlight {
    color: var(--secondary) !important;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.invest { background-color: #94A3B8; }
.dot.interest { background-color: var(--primary); }

.chart-wrapper {
    flex-grow: 1;
    min-height: 300px;
    position: relative;
    margin-bottom: 25px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* TABLA DE EVOLUCIÓN */
.evolution-table {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.evolution-table h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 15px;
    color: var(--text-main);
    font-size: 1.1rem;
}

.evolution-table table {
    width: 100%;
    border-collapse: collapse;
}

.evolution-table th {
    background: #F8FAFC;
    padding: 12px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    position: sticky;
    top: 0;
}

.evolution-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.evolution-table tr:hover {
    background: #F8FAFC;
}

/* CTA MEJORADO */
.cta-box {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    border: none;
    padding: 24px 28px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.cta-box:hover::before {
    left: 100%;
}

.cta-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.cta-text {
    display: flex;
    flex-direction: column;
    color: white;
    position: relative;
    z-index: 1;
}

.cta-text strong {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.cta-text small {
    color: #94A3B8;
    font-size: 0.85rem;
}

.cta-button {
    background: white;
    color: var(--text-main);
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.cta-button:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* COMPARADOR */
.comparator-view {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.comparator-view.active {
    display: grid;
}

.scenario {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.scenario-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    color: var(--text-main);
}

.scenario-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.scenario-badge.A {
    background: #DBEAFE;
    color: #1E40AF;
}

.scenario-badge.B {
    background: #D1FAE5;
    color: #065F46;
}

/* SEO CONTENT MEJORADO */
.seo-content {
    margin-top: 60px;
    background: rgba(255,255,255,0.05);
    padding: 50px;
    border-radius: 24px;
    color: #CBD5E1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.seo-content h2 {
    color: white;
    margin-bottom: 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
}

.seo-content h3 {
    color: #A5B4FC;
    margin: 30px 0 15px 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
}

.seo-content p {
    margin-bottom: 15px;
    color: #94A3B8;
    line-height: 1.8;
}

.formula-box {
    background: rgba(0,0,0,0.3);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    font-family: 'Space Grotesk', monospace;
    font-size: 1.3rem;
    color: #A5B4FC;
    border: 2px solid rgba(99, 102, 241, 0.3);
    margin: 25px 0;
}

.benefits-list {
    list-style: none;
    margin-top: 20px;
}

.benefits-list li {
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
    color: #CBD5E1;
}

.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* FAQ */
.faq-section {
    margin-top: 40px;
}

.faq-item {
    background: rgba(255,255,255,0.03);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

.faq-question {
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.faq-answer {
    color: #94A3B8;
    line-height: 1.7;
}

/* FOOTER */
.main-footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    color: #64748B;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.2s;
    margin: 0 15px;
}

.footer-links a:hover {
    color: white;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }

    .config-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .comparator-view {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .cta-box {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .cta-button {
        width: 100%;
    }

    .seo-content {
        padding: 30px 20px;
    }
}


.text-page-container {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 40px 30px;
    background: rgba(15, 23, 42, 0.85); 
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    color: #CBD5E1;
}

.text-page-container h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.text-page-container h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 12px;
    color: #E5E7EB;
}

.text-page-container p {
    margin-bottom: 12px;
    line-height: 1.8;
    color: #94A3B8;
}

.text-page-container ul {
    margin: 10px 0 20px 0;
    padding-left: 1.2rem;
}

.text-page-container li {
    margin-bottom: 8px;
    color: #CBD5E1;
}

.text-page-container a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    font-weight: 500;
}

.text-page-container a:hover {
    color: var(--primary-dark);
}

.text-page-container strong {
    color: #E5E7EB;
    font-weight: 600;
}

.footer-links .separator {
    color: #64748B;
    opacity: 0.7;
    margin: 0 6px;
}
/* TABLA COMPARATIVA DE PLATAFORMAS */

.comparison-table {
    margin-top: 25px;
    background: rgba(15, 23, 42, 0.75);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
    padding: 10px 12px;
    text-align: left;
}

.comparison-table thead th {
    border-bottom: 1px solid rgba(148, 163, 184, 0.5);
    color: #E5E7EB;
    font-weight: 600;
}

.comparison-table tbody tr {
    border-bottom: 1px solid rgba(30, 64, 175, 0.35);
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

.comparison-table td {
    color: #CBD5E1;
}

.comparison-cta {
    display: inline-block;
    background: #FFFFFF;
    color: #0F172A;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.comparison-cta:hover {
    background: var(--primary);
    color: #FFFFFF;
    transform: translateY(-1px);
}

.comparison-disclaimer {
    margin-top: 12px;
    font-size: 0.75rem;
    color: #94A3B8;
}
