@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;800&display=swap');

/* 
 * Indexfonds Portal Global Styles
 * Optimized for performance and readability
 */

:root {
    --if-luxury-blue: #0f172a;
    --if-accent-gold: #fbbf24;
    --if-soft-bg: #f8fafc;
    --if-glass-bg: rgba(255, 255, 255, 0.7);
    --if-glass-border: rgba(255, 255, 255, 0.2);
    --if-primary: #3b82f6;
    --if-primary-dark: #2563eb;
}

body { 
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; 
    background-color: var(--if-soft-bg);
}

/* ── Typography & Helpers ───────────────────────────────────── */
.text-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.x-small { font-size: 0.75rem; }
.extra-small { font-size: 0.65rem; }
.fw-black { font-weight: 900; }
.letter-spacing-1 { letter-spacing: 0.05rem; }
.letter-spacing-2 { letter-spacing: 2px; }
.ls-tight { letter-spacing: -0.025em; }

.transition-all { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.cursor-pointer { cursor: pointer; }

/* ── Layout & Surfaces ─────────────────────────────────────── */
.glass-card {
    background: var(--if-glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--if-glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.backdrop-blur { 
    -webkit-backdrop-filter: blur(12px); 
    backdrop-filter: blur(12px); 
}

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
}

.hover-up { 
    transition: transform 0.2s ease-in-out; 
}

.hover-up:hover { 
    transform: translateY(-3px); 
}

.transition-all { 
    transition: all 0.2s ease-in-out; 
}

.hover-shadow:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 1.5rem 4rem rgba(0,0,0,.08)!important; 
}

.hover-shadow-2xl:hover {
    box-shadow: 0 2rem 5rem rgba(0,0,0,0.15)!important;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes rotate { 
    from { transform: rotate(0deg); } 
    to { transform: rotate(360deg); } 
}

.animate-rotate { animation: rotate 30s linear infinite; }

/* ── Component: Academy Hub ────────────────────────────────── */
.academy-hub { 
    background: radial-gradient(circle at top right, rgba(13, 110, 253, 0.03), transparent), 
                radial-gradient(circle at bottom left, rgba(13, 110, 253, 0.03), transparent); 
}

.hero-glass {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.hero-bg-anim {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 60%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
}

.glass-pill {
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50rem;
}

.academy-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}
.academy-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

.category-icon-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--if-primary);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-size: 1.25rem;
}

.group:hover .group-hover-primary { color: var(--if-primary) !important; }
.group:hover .group-hover-translate { transform: translateX(8px); }
.group:hover .group-hover-text-primary { color: #0d6efd!important; }
.group:hover .group-hover-translate-x { transform: translateX(8px); }

/* ── Academy Article Detail ────────────────────────────────── */
.py-6 { padding-top: 4rem; padding-bottom: 4rem; }

.avatar-circle-sm { 
    width: 44px; 
    height: 44px; 
    border-radius: 50%; 
    font-size: 0.9rem; 
}

.glass-bg-accent {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 140%;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.05) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.academy-content { 
    font-size: 1.25rem; 
    color: #1e293b; 
    line-height: 1.7; 
}

.academy-content h1, 
.academy-content h2, 
.academy-content h3 { 
    color: #0f172a; 
    margin-top: 3.5rem; 
    margin-bottom: 1.25rem; 
    font-weight: 800; 
}

.academy-content h1 { font-size: 2.25rem; }

.academy-content h2 { 
    font-size: 1.75rem; 
    border-bottom: 1px solid #f1f5f9; 
    padding-bottom: 0.5rem; 
}

.academy-content h3 { font-size: 1.4rem; }
.academy-content p { margin-bottom: 1.75rem; font-weight: 400; }
.academy-content strong { color: #0f172a; font-weight: 700; }
.academy-content ul, .academy-content ol { margin-bottom: 2.5rem; padding-left: 1.5rem; }
.academy-content li { margin-bottom: 1rem; position: relative; }
.academy-content ul li::marker { color: var(--if-primary); font-size: 1.2em; }

/* Progress bar styles */
.progress-container { 
    width: 100%; 
    height: 4px; 
    background: transparent; 
    position: fixed; 
    top: 0; 
    left: 0; 
}

.progress-bar { 
    height: 4px; 
    background: var(--if-primary); 
    width: 0%; 
    border-radius: 0 4px 4px 0; 
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); 
}

.glass-overlay-dark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ── Components: E-Paper & Success States ────────────────── */
.epaper-landing {
    --primary-soft: rgba(79, 70, 229, 0.1);
    --success-soft: rgba(34, 197, 94, 0.1);
    --indigo-soft: rgba(99, 102, 241, 0.1);
    --indigo: #6366f1;
}

.bg-success-soft { background-color: var(--success-soft); }
.bg-indigo-soft { background-color: var(--indigo-soft); }
.text-indigo { color: var(--indigo); }
.bg-indigo { background-color: #6366f1; }

.hero-section {
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.05), transparent);
}

.signup-card { transition: transform 0.3s ease; }
.signup-card:hover { transform: translateY(-5px); }

/* 3D Ebook Mockup */
.ebook-mockup {
    perspective: 2000px;
    width: 280px;
    height: 400px;
    margin: 0 auto;
    filter: drop-shadow(25px 30px 45px rgba(0,0,0,0.35));
}

.ebook-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-22deg) rotateX(4deg);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.ebook-mockup:hover .ebook-inner {
    transform: rotateY(-8deg) rotateX(2deg);
}

.ebook-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #1e1b4b 100%);
    border-radius: 3px 12px 12px 3px;
    z-index: 5;
    overflow: hidden;
    transform: translateZ(10px);
    display: flex;
    flex-direction: column;
}

.ebook-gloss {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(115deg, rgba(255,255,255,0.15) 0%, transparent 40%, rgba(0,0,0,0.1) 70%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
    z-index: 6;
}

.ebook-spine {
    position: absolute;
    width: 32px;
    height: 100%;
    left: 0;
    background: linear-gradient(to right, #312e81 0%, #4338ca 30%, #312e81 100%);
    transform: rotateY(-90deg) translateZ(16px);
    transform-origin: left;
    border-radius: 4px 0 0 4px;
    z-index: 4;
}

.ebook-pages {
    position: absolute;
    width: 100%;
    height: 98%;
    top: 1%;
    right: -10px;
    background: #f8fafc;
    background-image: linear-gradient(to bottom, #e2e8f0 1px, transparent 1px);
    background-size: 100% 3px;
    transform: translateZ(-10px);
    box-shadow: inset -5px 0 10px rgba(0,0,0,0.05);
    border-radius: 0 4px 4px 0;
    z-index: 3;
}

.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.3;
}

.blob-1 { width: 300px; height: 300px; background: #4f46e5; top: -50px; right: -100px; }
.blob-2 { width: 200px; height: 200px; background: #a855f7; bottom: 0; left: 0; }

.icon-box {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
}

.glass-panel {
    background: rgba(15, 23, 42, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Compare Tool Styles */
.compare-table thead th { vertical-align: bottom; }
.compare-table tbody tr:last-child { border-bottom: 0!important; }
.compare-table td { transition: background-color 0.2s ease; }
.compare-table tr:hover td { background-color: #fafbfd; }

.x-small { font-size: 0.75rem; }
.progress { overflow: visible; background-color: #f0f2f5; }

.success-icon-wrap {
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.step-num {
    width: 32px; height: 32px;
    background-color: var(--bs-primary);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Security & Common Page Utilities */
.login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(13, 110, 253, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(13, 110, 253, 0.05), transparent);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.login-icon {
    width: 60px;
    height: 60px;
    background: var(--bs-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.2);
}

.btn-xl { padding: 1rem 2rem; font-size: 1.1rem; }

.form-floating > .form-control:focus ~ label { color: var(--bs-primary); }
.form-control-lg:focus { border-color: var(--bs-primary); box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1) !important; }

.rounded-4 { border-radius: 1.5rem !important; }

/* Background & Gradient Utilities */
.bg-gradient-to-t { background-image: linear-gradient(to top, var(--tw-gradient-stops, rgba(0,0,0,0.8), transparent)); }

/* Reader Interface */
.reader-container { height: calc(100vh - 60px); overflow: hidden; }
.reader-sidebar { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; overflow-y: auto; }
.reader-content-area { overflow-y: auto; scroll-behavior: smooth; }

.reader-nav-link { 
    color: #475569; 
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.reader-nav-link:hover { background-color: #f8fafc; color: #4f46e5; }
.reader-nav-link.active { 
    background-color: rgba(79, 70, 229, 0.08) !important; 
    color: #4f46e5 !important;
    font-weight: 600;
    border-color: rgba(79, 70, 229, 0.1);
}

@media (max-width: 991px) {
    .reader-container { height: auto; display: block; }
    .reader-content-area { height: auto; }
}

/* ── Components: Fund & Index Listings ────────────────── */
.hub-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 2rem;
    position: relative;
    overflow: hidden;
}

.hub-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.index-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
    background: white;
}

.index-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
    border-color: #3b82f6;
}

.category-divider {
    position: relative;
    text-align: center;
    margin: 4rem 0 2.5rem;
}

.category-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e5e7eb;
    z-index: 1;
}

.category-title {
    position: relative;
    display: inline-block;
    background: #f8fafc;
    padding: 0 1.5rem;
    z-index: 2;
    font-weight: 800;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: #64748b;
    font-size: 0.85rem;
}

.encyclopedia-badge {
    font-size: 0.65rem;
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Prose/Lexicon Content Styling */
.prose {
    color: #374151;
    line-height: 1.75;
    font-size: 1.05rem;
}

.prose h2 {
    color: #111827;
    font-weight: 700;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 0.5rem;
}

.prose h3 {
    color: #1f2937;
    font-weight: 600;
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p { margin-bottom: 1.25rem; }
.prose ul { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: #111827; font-weight: 600; }

.bg-primary-soft { background-color: rgba(13, 110, 253, 0.1); }
.letter-spacing-1 { letter-spacing: 0.05em; }

.hover-shadow:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.08)!important; }
.hover-text-primary:hover { color: var(--bs-primary)!important; transform: translateX(3px); }

/* Premium Select Components */
.select-premium-wrapper {
    position: relative;
    min-width: 200px;
}

.form-select-premium {
    width: 100%;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background-color: #0f172a;
    background-image: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.form-select-premium:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: #1e293b;
}

.form-select-premium:focus {
    outline: none;
    border-color: var(--bs-info);
    box-shadow: 0 0 0 3px rgba(13, 202, 240, 0.2);
}

.select-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: color 0.2s ease;
}

.form-select-premium:hover + .select-icon {
    color: #fff;
}

/* Pagination & Button Overrides */
.pagination .page-link { color: #6c757d; font-size: 0.875rem; }
.pagination .page-item.active .page-link { background-color: var(--bs-primary); background-image: linear-gradient(135deg, var(--bs-primary), var(--bs-info)); }
.btn-primary { background-image: linear-gradient(135deg, var(--bs-primary), #4e73df); border: 0; }
.btn-info { background-image: linear-gradient(135deg, #36b9cc, #2a96a5); border: 0; color: white; }

/* ── Components: Portfolio Analyzer ────────────────── */
.portfolio-item-row {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.portfolio-item-row:hover {
    background-color: #f8f9fa;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.05);
}

.portfolio-item-row div[id^="portfolio_items_"] > div {
    margin-bottom: 1.25rem;
}

@media (min-width: 992px) {
    .portfolio-item-row div[id^="portfolio_items_"] > div {
        margin-bottom: 0;
    }
    .portfolio-item-row div[id^="portfolio_items_"] {
        display: flex;
        gap: 1rem;
        align-items: flex-end;
    }
    .portfolio-item-row div[id^="portfolio_items_"] > div {
        flex: 1;
    }
}

/* Print Optimization for Financial Reports */
@media print {
    .navbar, .footer, .btn, .alert, .d-print-none { display: none !important; }
    .container { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
    body { background: white !important; font-size: 12pt; }
    .card { border: 1px solid #eee !important; box-shadow: none !important; break-inside: avoid; }
    .card-header { background-color: #f8f9fa !important; border-bottom: 1px solid #eee !important; }
    .progress { border: 1px solid #ddd !important; }
    .progress-bar { background-color: #0d6efd !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    h1, h2, h3, h4, h5, h6 { color: #333 !important; }
    .table { width: 100% !important; border-collapse: collapse !important; }
    .table th, .table td { border: 1px solid #eee !important; }
    .bg-primary { background-color: #0d6efd !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bg-info { background-color: #0dcaf0 !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bg-success { background-color: #198754 !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bg-warning { background-color: #ffc107 !important; color: black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bg-danger { background-color: #dc3545 !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Components: Shared Hero & Stepper ────────────────── */
.strategy-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    position: relative;
    overflow: hidden;
}

.strategy-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    transform: rotate(-15deg);
    pointer-events: none;
}

.step-bubble {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4);
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.step-bubble.active {
    background: #fff;
    color: #1e3a8a;
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.step-bubble.done {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

.step-line {
    background: rgba(255,255,255,0.1);
}

.step-line.done {
    background: rgba(34, 197, 94, 0.4);
}

/* ── Components: Strategy Result ────────────────────────── */
.projection-banner {
    background: linear-gradient(135deg, #1a237e 0%, #1565c0 100%);
    border: 1px solid rgba(255,255,255,0.15);
}

.proj-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.strategy-profile-card {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%) !important;
}

/* ── Typography & Gradients ────────────────────────────────── */
.text-gradient-primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ls-tight { letter-spacing: -0.025em; }
.letter-spacing-1 { letter-spacing: 0.1em; }
.letter-spacing-2 { letter-spacing: 0.2em; }

/* ── Components: Immersive Quiz ────────────────────────── */
.quiz-immersive-arena {
    overflow: hidden;
}

.blueprint-bg {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(59, 130, 246, 0.05) 1px, transparent 0);
    background-size: 40px 40px;
}

.aurora-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    filter: blur(80px);
    z-index: 1;
}

.pulse-indicator { 
    width: 10px; 
    height: 10px; 
    border-radius: 50%; 
    box-shadow: 0 0 10px currentColor; 
    animation: quizPulse 2s infinite; 
}

@keyframes quizPulse { 
    0% { opacity: 0.4; } 
    50% { opacity: 1; } 
    100% { opacity: 0.4; } 
}

.liquid-progress-track { 
    height: 8px; 
    background: rgba(59, 130, 246, 0.05); 
    border-radius: 100px; 
    overflow: hidden; 
}

.liquid-progress-fill { 
    height: 100%; 
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); 
    position: relative; 
}

.arena-card { 
    background: rgba(255, 255, 255, 0.8); 
    border: 1px solid rgba(59, 130, 246, 0.1) !important; 
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px); 
}

.arena-glass { 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 100%); 
    pointer-events: none; 
}

.option-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.5rem 2rem;
    color: var(--if-luxury-blue);
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-weight: 600;
}

.option-btn:hover:not(.disabled) {
    background: #f1f5f9;
    border-color: var(--if-primary);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.option-btn.correct { background: #ecfdf5 !important; border-color: #10b981 !important; color: #065f46 !important; }
.option-btn.wrong { background: #fef2f2 !important; border-color: #ef4444 !important; color: #991b1b !important; }

.feedback-banner.correct { border-color: #d1fae5; background: #f0fdf4; color: #065f46; }
.feedback-banner.wrong { border-color: #fee2e2; background: #fef2f2; color: #991b1b; }

.btn-next-step {
    width: 100%;
    padding: 1.2rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--if-luxury-blue);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.btn-next-step:hover { background: #f8fafc; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.btn-exit {
    position: fixed;
    top: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.btn-exit:hover { background: #ef4444; color: #fff; border-color: #ef4444; transform: rotate(90deg) scale(1.1); }

.btn-outline-premium {
    padding: 1rem 2rem;
    border-radius: 100px;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}
.btn-outline-premium:hover { background: #f1f5f9; color: var(--if-luxury-blue); }

.btn-primary-premium {
    padding: 1rem 2rem;
    border-radius: 100px;
    background: var(--if-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.3);
}
.btn-primary-premium:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(59, 130, 246, 0.4); }

/* Animations Logic */
.animate-slide-down { animation: quizSlideDown 0.6s ease-out forwards; opacity: 0; }
.animate-bounce-in { animation: quizBounceIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.animate-slide-in { animation: quizSlideIn 0.5s ease-out forwards; opacity: 0; }

@keyframes quizSlideDown { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes quizBounceIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes quizSlideIn { from { transform: translateX(-20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Components: Calculators ──────────────────────────────── */
.legend-box {
    width: 12px; 
    height: 12px; 
    display: inline-block; 
    margin-right: 5px; 
    border-radius: 3px;
}

.calc-trigger { 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.calc-trigger:hover { 
    transform: scale(1.02); 
}

/* Custom Range Input */
input[type=range].custom-range::-webkit-slider-thumb {
    background-color: var(--if-primary);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
    border: 3px solid #fff;
    cursor: pointer;
}

/* ── Component: Strategy Wizard ────────────────────────────── */
.strategy-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    position: relative;
    overflow: hidden;
}

.strategy-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    transform: rotate(-15deg);
    pointer-events: none;
}

.step-bubble {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4);
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.step-bubble.active {
    background: #fff;
    color: #1e3a8a;
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.step-bubble.done {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

.step-line {
    background: rgba(255,255,255,0.1);
}

.step-line.done {
    background: rgba(34, 197, 94, 0.4);
}

.strategy-card {
    border: 2px solid transparent !important;
    transition: all 0.25s ease;
    cursor: pointer;
}
.strategy-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12) !important;
    border-color: #0d6efd !important;
}

/* ── Component: Quiz ──────────────────────────────────────── */
.quiz-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(59, 130, 246, 0.1) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.card-glass-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 100%);
    pointer-events: none;
}

.difficulty-tier-icon {
    border-radius: 30px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.shadow-glow {
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.quiz-card-wrapper:hover .quiz-card {
    transform: translateY(-12px);
    background: white;
    border-color: var(--if-primary) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
}

.quiz-card-wrapper:hover .difficulty-tier-icon {
    transform: rotate(10deg) scale(1.1);
}

/* ── Component: Calculators ───────────────────────────────── */
.val-input:focus, .target-input:focus { 
    outline: none; 
    border-color: #0d6efd !important; 
    box-shadow: none !important; 
}

/* ── Miscellaneous UI ─────────────────────────────────────── */
.ts-dropdown {
    border: none !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
    margin-top: 10px !important;
}

.progress-bar { 
    height: 4px; 
    background: linear-gradient(90deg, #3b82f6 0%, #fbbf24 100%); 
    transition: width 0.1s ease; 
}

.compare-table tr:hover td { background-color: #fafbfd; }

@media print {
    .bg-primary, .sticky-top, .btn, .col-lg-5, .card-header .btn { display: none !important; }
    .card { border: 1px solid #ddd !important; box-shadow: none !important; }
}
