/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-1: #6366f1;
    --accent-2: #a855f7;
    --accent-3: #06b6d4;
    --gradient-main: linear-gradient(135deg, #6366f1, #a855f7, #06b6d4);
    --gradient-subtle: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.15));
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.hidden { display: none !important; }

/* ===== HEADER ===== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    background: var(--gradient-main); display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800; color: #fff;
}
.logo-text { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.nav { display: flex; gap: 8px; }
.nav-link {
    padding: 8px 16px; border-radius: var(--radius-sm); text-decoration: none;
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
    transition: var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-glass); }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.mobile-menu-btn span { width: 22px; height: 2px; background: var(--text-secondary); border-radius: 2px; transition: var(--transition); }

/* ===== HERO ===== */
.hero {
    padding: 160px 0 100px; position: relative; overflow: hidden; text-align: center;
}
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}
.shape-1 { width: 400px; height: 400px; background: var(--accent-1); top: -100px; right: -100px; }
.shape-2 { width: 300px; height: 300px; background: var(--accent-2); bottom: -50px; left: -50px; animation-delay: -3s; }
.shape-3 { width: 200px; height: 200px; background: var(--accent-3); top: 50%; left: 60%; animation-delay: -5s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.hero-badge {
    display: inline-block; padding: 8px 20px; border-radius: 50px;
    background: var(--gradient-subtle); border: 1px solid var(--border-glass);
    font-size: 13px; font-weight: 600; color: var(--accent-3);
    margin-bottom: 28px; animation: fadeInUp 0.6s ease;
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.2rem); font-weight: 900; line-height: 1.15;
    margin-bottom: 20px; animation: fadeInUp 0.6s ease 0.1s both;
}
.gradient-text {
    background: var(--gradient-main); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle {
    font-size: 18px; color: var(--text-secondary); max-width: 600px;
    margin: 0 auto 40px; animation: fadeInUp 0.6s ease 0.2s both;
}
.hero-stats {
    display: flex; align-items: center; justify-content: center; gap: 32px;
    margin-bottom: 40px; animation: fadeInUp 0.6s ease 0.3s both;
}
.stat-item { text-align: center; }
.stat-value { display: block; font-size: 28px; font-weight: 800; color: var(--text-primary); }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border-glass); }
.hero-cta {
    display: inline-block; padding: 16px 36px; border-radius: var(--radius-xl);
    background: var(--gradient-main); color: #fff; font-weight: 700; font-size: 16px;
    text-decoration: none; transition: var(--transition);
    box-shadow: 0 4px 30px rgba(99, 102, 241, 0.4);
    animation: fadeInUp 0.6s ease 0.4s both;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(99, 102, 241, 0.5); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SECTIONS ===== */
.section-header { text-align: center; margin-bottom: 48px; }
.section-tag {
    display: inline-block; padding: 4px 14px; border-radius: 50px;
    background: var(--gradient-subtle); border: 1px solid var(--border-glass);
    font-size: 12px; font-weight: 700; color: var(--accent-2);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 12px; }
.section-desc { font-size: 16px; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* ===== CALCULATOR ===== */
.calculator-section { padding: 80px 0; }
.calc-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.calc-card {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg); padding: 36px;
    backdrop-filter: blur(10px); box-shadow: var(--shadow-card);
}
.calc-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.input-wrapper {
    position: relative; display: flex; align-items: center;
    background: var(--bg-secondary); border: 1px solid var(--border-glass);
    border-radius: var(--radius-md); transition: var(--transition);
}
.input-wrapper:focus-within { border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.input-icon {
    padding: 0 14px; font-size: 14px; font-weight: 700; color: var(--text-muted);
    border-right: 1px solid var(--border-glass);
}
.input-wrapper input,
.input-wrapper select {
    flex: 1; padding: 14px 16px; background: transparent; border: none;
    color: var(--text-primary); font-size: 15px; font-family: var(--font-main);
    outline: none; width: 100%;
}
.input-wrapper select { cursor: pointer; }
.input-wrapper select option { background: var(--bg-secondary); color: var(--text-primary); }
.form-help { font-size: 12px; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn-calculate {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px 32px; border: none; border-radius: var(--radius-md);
    background: var(--gradient-main); color: #fff; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: var(--transition); font-family: var(--font-main);
    margin-top: 8px;
}
.btn-calculate:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4); }
.btn-calculate:active { transform: scale(0.98); }
.btn-icon { font-size: 20px; transition: var(--transition); }
.btn-calculate:hover .btn-icon { transform: translateX(4px); }

/* ===== RESULTS ===== */
.results-card {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg); padding: 36px;
    backdrop-filter: blur(10px); box-shadow: var(--shadow-card);
    animation: fadeInUp 0.5s ease;
}
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.results-title { font-size: 20px; font-weight: 700; }
.btn-reset {
    padding: 8px 16px; border-radius: var(--radius-sm); background: var(--bg-glass);
    border: 1px solid var(--border-glass); color: var(--text-secondary);
    font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--transition);
    font-family: var(--font-main);
}
.btn-reset:hover { color: var(--text-primary); border-color: var(--accent-1); }

.result-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.result-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-radius: var(--radius-md);
    background: var(--bg-glass); border: 1px solid var(--border-glass);
}
.result-item.highlight { background: var(--gradient-subtle); border-color: rgba(99, 102, 241, 0.2); }
.result-item.total {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(6, 182, 212, 0.1));
    border-color: rgba(34, 197, 94, 0.2);
}
.result-label { font-size: 14px; color: var(--text-secondary); }
.result-value { font-size: 18px; font-weight: 700; font-family: var(--font-mono); }
.result-item.highlight .result-value { color: var(--accent-2); }
.result-item.total .result-value { color: var(--green); font-size: 20px; }
.result-rate { font-size: 12px; color: var(--text-muted); margin-left: 8px; }

.result-annual {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    padding: 18px; background: var(--bg-glass); border-radius: var(--radius-md);
    border: 1px solid var(--border-glass); margin-bottom: 24px;
}
.annual-item { text-align: center; }
.annual-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.annual-value { font-size: 16px; font-weight: 700; font-family: var(--font-mono); color: var(--accent-3); }

/* Comparison */
.result-comparison {
    padding: 20px; background: var(--bg-glass); border-radius: var(--radius-md);
    border: 1px solid var(--border-glass); margin-bottom: 20px;
}
.result-comparison h4 { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 16px; }
.comparison-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.comp-label { font-size: 12px; color: var(--text-muted); width: 130px; flex-shrink: 0; }
.comp-bar { flex: 1; height: 24px; background: var(--bg-secondary); border-radius: var(--radius-sm); overflow: hidden; }
.comp-fill { height: 100%; border-radius: var(--radius-sm); transition: width 0.8s ease; }
.comp-fill.old { background: var(--text-muted); }
.comp-fill.new { background: var(--gradient-main); }
.comp-value { font-size: 13px; font-weight: 600; font-family: var(--font-mono); width: 80px; text-align: right; }
.comp-diff { font-size: 13px; color: var(--green); margin-top: 12px; }

.btn-print {
    width: 100%; padding: 12px; border-radius: var(--radius-md);
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
    cursor: pointer; transition: var(--transition); font-family: var(--font-main);
}
.btn-print:hover { border-color: var(--accent-1); color: var(--text-primary); }

/* ===== DA RATES TABLE ===== */
.rates-section { padding: 80px 0; }
.table-wrapper {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-card); overflow-x: auto;
}
.da-table { width: 100%; border-collapse: collapse; }
.da-table th {
    padding: 16px 20px; text-align: left; font-size: 13px; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border-glass);
}
.da-table td {
    padding: 14px 20px; font-size: 14px; color: var(--text-secondary);
    border-bottom: 1px solid var(--border-glass);
}
.da-table tr:last-child td { border-bottom: none; }
.da-table tr:hover { background: var(--bg-glass); }
.da-table tr.latest { background: var(--gradient-subtle); }
.da-table tr.latest td { color: var(--text-primary); font-weight: 600; }
.da-table tr.frozen { background: rgba(239, 68, 68, 0.05); }
.da-table tr.frozen td { color: var(--red); font-style: italic; }
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 50px;
    font-size: 11px; font-weight: 600; background: var(--bg-glass);
    color: var(--text-muted); border: 1px solid var(--border-glass);
}
.badge-latest { background: rgba(99, 102, 241, 0.15); color: var(--accent-1); border-color: rgba(99, 102, 241, 0.3); }
.badge-active { background: rgba(34, 197, 94, 0.15); color: var(--green); border-color: rgba(34, 197, 94, 0.3); }
.badge-restored { background: rgba(245, 158, 11, 0.15); color: var(--orange); border-color: rgba(245, 158, 11, 0.3); }
.badge-frozen { background: rgba(239, 68, 68, 0.15); color: var(--red); border-color: rgba(239, 68, 68, 0.3); }

/* ===== HOW SECTION ===== */
.how-section { padding: 80px 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.info-card {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg); padding: 32px;
    backdrop-filter: blur(10px); transition: var(--transition);
}
.info-card:hover { border-color: rgba(99, 102, 241, 0.2); transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.info-icon { font-size: 32px; margin-bottom: 16px; }
.info-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.info-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.info-card ul { list-style: none; margin-top: 10px; }
.info-card li { padding: 6px 0; font-size: 14px; color: var(--text-secondary); padding-left: 20px; position: relative; }
.info-card li::before { content: '›'; position: absolute; left: 0; color: var(--accent-1); font-weight: 700; }
.formula-box {
    padding: 14px 18px; background: var(--bg-secondary); border-radius: var(--radius-md);
    border: 1px solid var(--border-glass); margin-bottom: 14px;
}
.formula-box code { font-family: var(--font-mono); font-size: 13px; color: var(--accent-3); }

/* ===== FAQ ===== */
.faq-section { padding: 80px 0; }
.faq-list { max-width: 750px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius-md); overflow: hidden; transition: var(--transition);
}
.faq-item[open] { border-color: rgba(99, 102, 241, 0.2); }
.faq-question {
    padding: 20px 24px; cursor: pointer; font-size: 15px; font-weight: 600;
    color: var(--text-primary); list-style: none; display: flex;
    align-items: center; justify-content: space-between; transition: var(--transition);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
    content: '+'; font-size: 20px; font-weight: 300; color: var(--text-muted);
    transition: var(--transition); flex-shrink: 0; margin-left: 16px;
}
.faq-item[open] .faq-question::after { content: '−'; color: var(--accent-1); }
.faq-answer {
    padding: 0 24px 20px; font-size: 14px; color: var(--text-secondary);
    line-height: 1.8; animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== FOOTER ===== */
.footer {
    padding: 60px 0 32px; border-top: 1px solid var(--border-glass);
    background: var(--bg-secondary);
}
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo-icon { display: inline-flex; }
.footer-brand .logo-text { vertical-align: middle; margin-left: 8px; }
.footer-desc { margin-top: 12px; font-size: 14px; color: var(--text-muted); max-width: 350px; }
.footer-links h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--text-secondary); }
.footer-links a {
    display: block; padding: 4px 0; font-size: 14px; color: var(--text-muted);
    text-decoration: none; transition: var(--transition);
}
.footer-links a:hover { color: var(--accent-1); }
.footer-bottom { border-top: 1px solid var(--border-glass); padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: 13px; color: var(--text-muted); }
.footer-disclaimer { margin-top: 8px; font-size: 12px; color: var(--text-muted); opacity: 0.7; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav { display: none; }
    .nav.open {
        display: flex; flex-direction: column; position: absolute;
        top: 70px; left: 0; right: 0; background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-glass); padding: 16px;
    }
    .mobile-menu-btn { display: flex; }
    .hero { padding: 130px 0 70px; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .stat-divider { width: 40px; height: 1px; }
    .calc-wrapper { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 24px; }
    .result-annual { grid-template-columns: 1fr; }
    .comparison-row { flex-wrap: wrap; }
    .comp-label { width: 100%; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .calc-card, .results-card { padding: 24px; }
    .da-table th, .da-table td { padding: 10px 12px; font-size: 13px; }
}

/* ===== PRINT ===== */
@media print {
    .header, .hero, .rates-section, .how-section, .faq-section, .footer,
    .btn-calculate, .btn-reset, .btn-print, .section-header { display: none !important; }
    body { background: #fff; color: #000; }
    .results-card {
        display: block !important; background: #fff; border: 1px solid #ddd;
        box-shadow: none; max-width: 100%;
    }
    .result-item { background: #f9f9f9; border: 1px solid #eee; }
    .result-value, .annual-value, .comp-value { color: #000 !important; }
    .result-comparison { background: #f9f9f9; }
}
