/* Variables y Sistema de Diseño Base - Reutilizando colores del portafolio */
:root {
    --bg-dark: #0f1115;
    --bg-panel: rgba(25, 28, 36, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Neon Colors */
    --neon-green: #10b981;
    --neon-red: #ef4444;
    --neon-cyan: #06b6d4;
    
    --glow-green: rgba(16, 185, 129, 0.3);
    --glow-red: rgba(239, 68, 68, 0.3);
    --glow-cyan: rgba(6, 182, 212, 0.3);
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(16, 185, 129, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.08), transparent 25%);
}

.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
    margin-bottom: 0.5rem;
}

.back-link:hover {
    color: var(--neon-cyan);
}

.back-link i {
    width: 16px;
    height: 16px;
}

.app-header h1 {
    margin: 0;
    font-size: 2rem;
    color: var(--text-main);
}

.subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--neon-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.brand-badge i {
    width: 16px;
    height: 16px;
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* Form Styles */
.panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.neon-icon {
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 8px var(--glow-cyan));
}

.neon-icon.green {
    color: var(--neon-green);
    filter: drop-shadow(0 0 8px var(--glow-green));
}

.neon-icon.red {
    color: var(--neon-red);
    filter: drop-shadow(0 0 8px var(--glow-red));
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

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

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.input-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.unit-suffix {
    position: absolute;
    right: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.helper-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Results Section */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-card {
    position: relative;
    overflow: hidden;
}

.highlight-border {
    border-color: rgba(16, 185, 129, 0.3);
}

.card-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: var(--glow-green);
    filter: blur(60px);
    border-radius: 50%;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.big-result {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.big-result .number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.big-result .unit {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 600;
}

.result-description {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

/* Financial Split Cards */
.financial-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.panel-header.compact {
    margin-bottom: 1rem;
}

.panel-header.compact h3 {
    margin: 0;
    font-size: 1rem;
}

.metric-group {
    margin-bottom: 1rem;
}
.metric-group:last-child {
    margin-bottom: 0;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
}

.metric-value.amount {
    font-size: 1.5rem;
}

/* Dynamic Colors */
.text-red { color: var(--neon-red); }
.text-green { color: var(--neon-green); }
.text-cyan { color: var(--neon-cyan); }
.text-gray { color: var(--text-muted); }

/* Savings Card */
.savings-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    text-align: center;
}

.savings-header h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    color: var(--text-main);
}

.savings-value {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.savings-value span:first-child {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--neon-green);
}

.savings-value .unit {
    color: var(--text-muted);
    font-weight: 600;
}

.savings-desc {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Disclaimer Banner */
.disclaimer-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    font-size: 0.875rem;
    line-height: 1.5;
}

.disclaimer-banner i {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.disclaimer-banner strong {
    color: #fcd34d;
}

/* Methodology Accordion */
.methodology-accordion {
    padding: 0;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-title h3 {
    margin: 0;
    font-size: 1.125rem;
}

.header-title i {
    color: var(--neon-cyan);
}

#accordion-icon {
    transition: transform 0.3s ease;
}

#accordion-icon.rotated {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: rgba(0, 0, 0, 0.2);
}

.accordion-content.open {
    max-height: 1200px; /* Suficiente espacio para que se expanda */
}

.methodology-step {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.methodology-step h4 {
    margin: 0 0 1rem 0;
    color: var(--neon-cyan);
    font-size: 1rem;
}

.methodology-step p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.formula-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    color: var(--neon-green);
    text-align: center;
    border: 1px dashed rgba(16, 185, 129, 0.3);
    font-size: 0.95rem;
}

.table-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .table-comparison {
        grid-template-columns: 1fr;
    }
}

.table-comparison .col {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.table-comparison .highlight-col {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.table-comparison h5 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: var(--text-main);
}

.table-comparison ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.table-comparison code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: var(--neon-cyan);
}

