/* ===== DESIGN TOKENS ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --text-primary: #f0f0f5;
    --text-secondary: #8a8a9a;
    --text-muted: #55556a;
    --accent-gold: #f0b232;
    --accent-teal: #2dd4bf;
    --accent-purple: #a78bfa;
    --accent-rose: #fb7185;
    --gradient-main: linear-gradient(135deg, #f0b232 0%, #2dd4bf 50%, #a78bfa 100%);
    --gradient-gold: linear-gradient(135deg, #f0b232, #e8961e);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    --glass: rgba(22,22,31,0.7);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
    --transition: all 0.3s ease;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-main: 'Inter', system-ui, sans-serif;
    --font-display: 'Outfit', system-ui, sans-serif;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
a { color: var(--accent-teal); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-gold); }
button, a, input, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== PARTICLES CANVAS & MOBILE OVERLAY ===== */
#particles-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none; opacity: 0.4;
}
.nav-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.nav-overlay.active { opacity: 1; pointer-events: auto; }

/* ===== NAV ===== */
#main-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10,10,15,0.8); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); transition: all 0.4s;
}
.nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.5rem; }
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--text-primary); }
.logo-accent { background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 8px; }
.nav-link {
    padding: 8px 16px; border-radius: var(--radius-sm); font-size: 0.875rem;
    color: var(--text-secondary); font-weight: 500; transition: all 0.3s;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.live-indicator { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; color: #22c55e; letter-spacing: 1px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pulse-dot 1.5s infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.5); } 50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34,197,94,0); } }
.last-updated { font-size: 0.75rem; color: var(--text-muted); }

/* ===== HERO ===== */
#hero-section {
    position: relative; min-height: 90vh; display: flex; align-items: center; justify-content: center;
    padding: 120px 24px 80px; text-align: center; overflow: hidden; z-index: 1;
}
.hero-glow {
    position: absolute; width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(240,178,50,0.12) 0%, transparent 70%);
    top: 10%; left: 50%; transform: translateX(-50%); filter: blur(80px); pointer-events: none; z-index: 0;
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-badge {
    display: inline-flex; padding: 8px 20px; border-radius: 100px;
    background: rgba(240,178,50,0.1); border: 1px solid rgba(240,178,50,0.2);
    font-size: 0.75rem; font-weight: 600; letter-spacing: 2px; color: var(--accent-gold);
    margin-bottom: 24px; animation: fadeInDown 0.8s ease;
}
.hero-title {
    font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800; line-height: 1.1; margin-bottom: 20px; animation: fadeInDown 0.8s 0.15s ease both;
}
.gradient-text { background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle {
    font-size: 1.125rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 40px;
    animation: fadeInDown 0.8s 0.3s ease both;
}
.hero-stats {
    display: flex; align-items: center; justify-content: center; gap: 32px;
    margin-bottom: 40px; animation: fadeInUp 0.8s 0.45s ease both;
}
.hero-stat-value { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--text-primary); }
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.hero-stat-divider { width: 1px; height: 48px; background: var(--border); }
.hero-cta {
    display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px;
    background: var(--gradient-gold); color: #0a0a0f; font-weight: 600; font-size: 0.95rem;
    border-radius: 100px; transition: all 0.3s; animation: fadeInUp 0.8s 0.6s ease both;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(240,178,50,0.3); color: #0a0a0f; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ===== TICKER ===== */
#ticker-section {
    position: relative; z-index: 1; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    background: var(--bg-secondary); overflow: hidden;
}
.ticker-wrapper { display: flex; align-items: stretch; }
.ticker-label {
    display: flex; align-items: center; gap: 8px; padding: 12px 20px;
    background: rgba(240,178,50,0.08); border-right: 1px solid var(--border);
    font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; color: var(--accent-gold); white-space: nowrap;
}
.ticker-track { flex: 1; overflow: hidden; position: relative; }
.ticker-content {
    display: flex; align-items: center; gap: 40px; white-space: nowrap;
    animation: ticker-scroll 40s linear infinite; padding: 12px 0;
}
.ticker-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.ticker-name { color: var(--text-primary); font-weight: 500; }
.ticker-change { font-weight: 600; }
.ticker-change.up { color: #22c55e; }
.ticker-change.down { color: #ef4444; }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===== SECTIONS COMMON ===== */
section { position: relative; z-index: 1; padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-badge {
    display: inline-block; padding: 6px 16px; border-radius: 100px;
    background: rgba(45,212,191,0.1); border: 1px solid rgba(45,212,191,0.15);
    font-size: 0.7rem; font-weight: 600; letter-spacing: 1.5px; color: var(--accent-teal);
    text-transform: uppercase; margin-bottom: 12px;
}
.section-title { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; margin-bottom: 12px; }
.section-desc { color: var(--text-secondary); max-width: 550px; margin: 0 auto; font-size: 0.95rem; }

/* ===== MARKET PULSE ===== */
.pulse-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pulse-card {
    background: var(--gradient-card); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 20px; transition: all 0.3s;
}
.pulse-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.pulse-card-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.pulse-card-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.pulse-card-change { font-size: 0.85rem; font-weight: 600; margin-top: 4px; }
.pulse-card-change.up { color: #22c55e; }
.pulse-card-change.down { color: #ef4444; }

/* ===== FILTER BAR ===== */
.filter-bar { display: flex; justify-content: center; gap: 8px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn {
    padding: 8px 20px; border-radius: 100px; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); font-size: 0.85rem;
    font-weight: 500; cursor: pointer; transition: all 0.3s; font-family: var(--font-main);
}
.filter-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.filter-btn.active { background: var(--gradient-gold); color: #0a0a0f; border-color: transparent; font-weight: 600; }

/* ===== AVATAR SYSTEM ===== */
.avatar-photo, .avatar-fallback {
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0; position: relative;
}
.avatar-photo img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.avatar-fallback {
    font-weight: 700; color: #0a0a0f;
}
.avatar-sm { width: 40px; height: 40px; font-size: 0.85rem; }
.avatar-md { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; margin: 0 auto 12px; }
.avatar-xl { width: 88px; height: 88px; font-size: 2rem; margin: 0 auto 14px; }
.avatar-photo.avatar-sm { border: 2px solid var(--border-hover); }
.avatar-photo.avatar-md { border: 2px solid var(--border-hover); }
.avatar-photo.avatar-lg { border: 3px solid rgba(240,178,50,0.3); box-shadow: 0 4px 20px rgba(240,178,50,0.2); }
.avatar-photo.avatar-xl { border: 3px solid rgba(240,178,50,0.3); box-shadow: 0 6px 24px rgba(240,178,50,0.25); }
.avatar-fallback.avatar-lg { box-shadow: 0 4px 20px rgba(240,178,50,0.2); }
.avatar-fallback.avatar-xl { box-shadow: 0 6px 24px rgba(240,178,50,0.25); }

/* ===== PODIUM ===== */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 20px; margin-bottom: 48px; }
.podium-card {
    background: var(--gradient-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 28px 24px; text-align: center; transition: all 0.4s; width: 260px; position: relative; overflow: hidden;
}
.podium-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--gradient-main); opacity: 0; transition: opacity 0.3s;
}
.podium-card:hover { transform: translateY(-6px); border-color: var(--border-hover); }
.podium-card:hover::before { opacity: 1; }
.podium-card.rank-1 { order: 2; transform: scale(1.05); }
.podium-card.rank-2 { order: 1; }
.podium-card.rank-3 { order: 3; }
.podium-rank {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; font-weight: 800; font-size: 1rem; margin-bottom: 12px;
}
.rank-1 .podium-rank { background: linear-gradient(135deg, #f0b232, #ffd700); color: #0a0a0f; }
.rank-2 .podium-rank { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #0a0a0f; }
.rank-3 .podium-rank { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; }
.podium-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; }
.podium-company { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.podium-worth { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--accent-gold); }
.podium-change { font-size: 0.85rem; font-weight: 600; margin-top: 4px; }

/* ===== TABLE ===== */
.table-mobile-hint {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.74rem;
    color: var(--text-secondary);
}
.rankings-table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
.rankings-table { width: 100%; border-collapse: collapse; }
.rankings-table thead { background: var(--bg-card); }
.rankings-table th {
    padding: 14px 16px; text-align: left; font-size: 0.75rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
}
.rankings-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: middle; }
.rankings-table tbody tr { transition: background 0.3s; }
.rankings-table tbody tr:hover { background: var(--bg-card-hover); }
.rank-cell { font-weight: 700; color: var(--text-muted); width: 50px; }
.name-cell { display: flex; align-items: center; gap: 12px; }

.name-info-name { font-weight: 600; }
.name-info-age { font-size: 0.75rem; color: var(--text-muted); }
.worth-cell { font-family: var(--font-display); font-weight: 700; }
.change-cell { font-weight: 600; }
.change-cell.up { color: #22c55e; }
.change-cell.down { color: #ef4444; }

/* Live Ticker Animations */
@keyframes flash-up {
    0% { background-color: rgba(34, 197, 94, 0.3); color: #22c55e; border-radius: 4px; }
    100% { background-color: transparent; }
}
@keyframes flash-down {
    0% { background-color: rgba(239, 68, 68, 0.3); color: #ef4444; border-radius: 4px; }
    100% { background-color: transparent; }
}
.flash-up { animation: flash-up 1.5s ease-out; }
.flash-down { animation: flash-down 1.5s ease-out; }

.industry-badge {
    display: inline-block; padding: 4px 10px; border-radius: 100px; font-size: 0.75rem;
    font-weight: 500; background: rgba(45,212,191,0.1); color: var(--accent-teal); border: 1px solid rgba(45,212,191,0.15);
}
.country-cell { display: flex; align-items: center; gap: 6px; }
.stock-cell { white-space: nowrap; font-size: 0.85rem; }
.stock-ticker {
    display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: 700;
    background: rgba(240,178,50,0.12); color: var(--accent-gold); border: 1px solid rgba(240,178,50,0.2);
    margin-right: 6px; letter-spacing: 0.3px;
}
.stock-price { font-family: var(--font-display); font-weight: 600; color: var(--text-primary); }
.stock-chg { font-size: 0.75rem; margin-left: 4px; }
.stock-chg.up { color: #22c55e; }
.stock-chg.down { color: #ef4444; }
.stock-private { color: var(--text-muted); font-style: italic; font-size: 0.8rem; }

/* ===== NEWS SECTION ===== */
.news-daily-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 6px 18px;
    border-radius: 100px;
    background: rgba(240,178,50,0.07);
    border: 1px solid rgba(240,178,50,0.18);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-gold);
    letter-spacing: 0.3px;
    animation: fadeInUp 0.8s 0.5s ease both;
}
.news-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;
    margin-top: 30px;
}
.news-card {
    background: var(--gradient-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
    display: flex; flex-direction: column; gap: 12px; transition: var(--transition); cursor: pointer;
    text-decoration: none; color: inherit;
}
.news-card:hover {
    transform: translateY(-5px); border-color: rgba(255,255,255,0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.news-meta {
    display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-muted);
}
.news-source { color: var(--accent-gold); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.news-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; line-height: 1.4; color: var(--text-primary); }
.news-summary { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-related { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px;}
.news-related::before { content: "👤"; }

/* ===== STAT CARDS ===== */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stat-card {
    background: var(--gradient-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px;
}
.stat-card-wide { grid-column: 1 / -1; }
.stat-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.stat-card-icon { font-size: 1.3rem; }
.stat-card-header h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.stat-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.stat-bar-label { font-size: 0.85rem; color: var(--text-secondary); width: 100px; flex-shrink: 0; }
.stat-bar-track { flex: 1; height: 8px; border-radius: 100px; background: rgba(255,255,255,0.05); overflow: hidden; }
.stat-bar-fill { height: 100%; border-radius: 100px; background: var(--gradient-main); transition: width 1.5s ease; }
.stat-bar-value { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); width: 40px; text-align: right; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.metric-item {
    padding: 16px; border-radius: var(--radius-md); background: rgba(255,255,255,0.02);
    border: 1px solid var(--border); text-align: center;
}
.metric-value { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.metric-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ===== TRENDS / CHART ===== */
.trends-container { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.chart-card {
    background: var(--gradient-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
}
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.chart-header h3 { font-family: var(--font-display); font-weight: 600; }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text-secondary); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
#wealth-chart { display: block; width: 100%; height: auto; max-width: 100%; }
.trends-highlights { display: flex; flex-direction: column; gap: 12px; }
.trend-card {
    background: var(--gradient-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px;
    transition: all 0.3s;
}
.trend-card:hover { border-color: var(--border-hover); }
.trend-card-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.trend-card-desc { font-size: 0.8rem; color: var(--text-secondary); }
.trend-card-value { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--accent-gold); margin-top: 6px; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.7; }
.about-features { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.about-feature { display: flex; gap: 14px; align-items: flex-start; }
.about-feature-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.about-feature strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.about-feature p { font-size: 0.85rem; color: var(--text-muted); }
.about-visual { display: flex; justify-content: center; }
.about-globe { position: relative; width: 260px; height: 260px; display: flex; align-items: center; justify-content: center; }
.globe-ring {
    position: absolute; border: 1px solid var(--border); border-radius: 50%; animation: spin-ring 20s linear infinite;
}
.ring-1 { width: 200px; height: 200px; border-color: rgba(240,178,50,0.15); }
.ring-2 { width: 240px; height: 240px; border-color: rgba(45,212,191,0.1); animation-duration: 30s; animation-direction: reverse; }
.ring-3 { width: 260px; height: 260px; border-color: rgba(167,139,250,0.08); animation-duration: 25s; }
.globe-core { font-size: 3.5rem; z-index: 1; }
@keyframes spin-ring { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ===== FOOTER ===== */
#main-footer { position: relative; z-index: 1; background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 48px 0 24px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; margin-bottom: 32px; flex-wrap: wrap; }
.footer-brand { max-width: 300px; }
.footer-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 10px; }
.footer-links-group { display: flex; flex-direction: column; gap: 8px; }
.footer-links-group h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
.footer-links-group a { font-size: 0.85rem; color: var(--text-muted); transition: color 0.3s; }
.footer-links-group a:hover { color: var(--accent-teal); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.8rem; color: var(--text-muted); }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-lg); max-width: 560px; width: 92%; max-height: 85vh;
    overflow-y: auto; position: relative; transform: translateY(30px) scale(0.95);
    transition: transform 0.35s ease; box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute; top: 16px; right: 16px; z-index: 10;
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-secondary); font-size: 1.3rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.modal-header {
    padding: 32px 28px 20px; text-align: center;
    border-bottom: 1px solid var(--border); position: relative;
}
.modal-header::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--gradient-main); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.modal-company { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }
.modal-worth-row {
    display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px;
}
.modal-worth { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--accent-gold); }
.modal-change { font-size: 0.9rem; font-weight: 600; }
.modal-body { padding: 20px 28px 28px; }
.modal-facts {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px;
}
.modal-fact {
    padding: 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
}
.modal-fact-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.modal-fact-value { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; margin-top: 2px; }
.modal-bio-title { font-family: var(--font-display); font-weight: 600; margin-bottom: 8px; font-size: 1rem; }
.modal-bio { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.podium-card, .rankings-table tbody tr { cursor: pointer; }

/* ===== HAMBURGER BUTTON ===== */
.hamburger {
    display: none; background: transparent; border: none; cursor: pointer;
    width: 40px; height: 40px; position: relative; z-index: 101;
    border-radius: var(--radius-sm);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; padding: 0;
}
.hamburger span {
    display: block; width: 22px; height: 2px; background: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== SCROLL TO TOP ===== */
.scroll-top {
    position: fixed; bottom: 28px; right: 28px; z-index: 99;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--gradient-gold); color: #0a0a0f;
    border: none; cursor: pointer; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(240,178,50,0.3);
}
.scroll-top.visible { opacity: 1; pointer-events: all; }
.scroll-top:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(240,178,50,0.4); }

/* ===== LOADING SCREEN ===== */
.loader-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-primary); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease;
}
.loader-overlay.hidden { opacity: 0; pointer-events: none; }
.loader-spinner {
    width: 48px; height: 48px; border: 3px solid var(--border);
    border-top-color: var(--accent-gold); border-radius: 50%;
    animation: spin-loader 0.8s linear infinite;
}
@keyframes spin-loader { to { transform: rotate(360deg); } }

/* =========================================================
   RESPONSIVE MEDIA QUERIES (MOBILE FIRST OPTIMIZATIONS)
   ========================================================= */

/* --- TABLET & BELOW (<= 900px) --- */
@media (max-width: 900px) {
    .hamburger { display: flex; }
    .nav-right { gap: 12px; }
    .last-updated { display: none; }
    .nav-links {
        display: flex;
        position: fixed; top: 64px; left: 0; right: 0;
        background: rgba(14,14,20,0.98);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column; padding: 18px 24px 28px; gap: 8px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 24px 48px rgba(0,0,0,0.6);
        transform: translateY(-16px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
        z-index: 100;
    }
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-link {
        padding: 12px 18px; font-size: 1rem; border-radius: var(--radius-sm);
        background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04);
    }
    .nav-link:hover, .nav-link.active {
        background: rgba(240,178,50,0.12);
        color: var(--accent-gold);
    }

    .stats-grid { grid-template-columns: 1fr; }
    .trends-container { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; gap: 36px; }
    .about-visual { order: -1; }
}

/* --- MOBILE LANDSCAPE & PHONES (<= 768px) --- */
@media (max-width: 768px) {
    /* Base Container & Spacing */
    .container { padding: 0 16px; }
    section { padding: 48px 0; }
    .section-header { margin-bottom: 24px; }
    .section-title { font-size: 1.8rem; }
    .section-desc { font-size: 0.88rem; }

    /* Nav adjustments */
    .nav-inner { padding: 0 16px; height: 60px; }
    .logo-text { font-size: 1.15rem; }
    .nav-links { top: 60px; }

    /* Hero Section */
    #hero-section {
        min-height: auto;
        padding: 92px 16px 44px;
    }
    .hero-glow { width: 300px; height: 300px; filter: blur(50px); }
    .hero-badge {
        font-size: 0.68rem;
        padding: 6px 14px;
        margin-bottom: 14px;
        letter-spacing: 1px;
    }
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.15;
        margin-bottom: 12px;
    }
    .hero-subtitle {
        font-size: 0.92rem;
        line-height: 1.55;
        margin-bottom: 24px;
        padding: 0 4px;
    }
    .hero-stats {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        gap: 8px;
        width: 100%;
        max-width: 380px;
        margin: 0 auto 28px;
        padding: 12px 10px;
        background: rgba(255,255,255,0.03);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        backdrop-filter: blur(10px);
    }
    .hero-stat { flex: 1; text-align: center; }
    .hero-stat-value { font-size: 1.25rem; font-weight: 800; }
    .hero-stat-label { font-size: 0.62rem; letter-spacing: 0.5px; }
    .hero-stat-divider { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; }
    .hero-cta { padding: 12px 28px; font-size: 0.9rem; }

    /* Filter Bar - Swipeable Horizontal Pills */
    .filter-bar {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
        padding: 4px 16px 12px;
        margin: 0 -16px 20px -16px;
        gap: 8px;
    }
    .filter-bar::-webkit-scrollbar { display: none; }
    .filter-btn {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Top 3 Podium - True 3-Step Leaderboard */
    .podium {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: flex-end;
        gap: 6px;
        margin-bottom: 24px;
        padding: 0 2px;
    }
    .podium-card {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        padding: 14px 6px 12px;
        border-radius: var(--radius-md);
    }
    .podium-card.rank-1 {
        order: 2;
        transform: translateY(-8px);
        border-color: rgba(240,178,50,0.4);
        background: linear-gradient(180deg, rgba(240,178,50,0.12) 0%, rgba(22,22,31,0.95) 100%);
        box-shadow: 0 8px 24px rgba(240,178,50,0.18);
    }
    .podium-card.rank-2 {
        order: 1;
        border-color: rgba(148,163,184,0.25);
        background: linear-gradient(180deg, rgba(148,163,184,0.06) 0%, rgba(22,22,31,0.95) 100%);
    }
    .podium-card.rank-3 {
        order: 3;
        border-color: rgba(217,119,6,0.25);
        background: linear-gradient(180deg, rgba(217,119,6,0.06) 0%, rgba(22,22,31,0.95) 100%);
    }
    .podium-rank {
        width: 24px;
        height: 24px;
        font-size: 0.72rem;
        margin-bottom: 6px;
    }
    .avatar-photo.avatar-lg, .avatar-fallback.avatar-lg {
        width: 44px;
        height: 44px;
        font-size: 0.95rem;
        margin: 0 auto 6px;
    }
    .podium-card.rank-1 .avatar-photo.avatar-lg,
    .podium-card.rank-1 .avatar-fallback.avatar-lg {
        width: 52px;
        height: 52px;
        font-size: 1.15rem;
    }
    .podium-name {
        font-size: 0.78rem;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 2px;
    }
    .podium-company {
        font-size: 0.65rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 4px;
    }
    .podium-worth {
        font-size: 1rem;
        font-weight: 800;
    }
    .podium-card.rank-1 .podium-worth {
        font-size: 1.15rem;
    }
    .podium-change {
        font-size: 0.68rem;
        margin-top: 2px;
        white-space: nowrap;
    }

    /* Rankings Table - Sticky Mobile Scroll */
    .table-mobile-hint { display: flex; }
    .rankings-table-wrapper {
        border-radius: var(--radius-md);
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--border);
    }
    .rankings-table {
        min-width: 660px;
    }
    .rankings-table th, .rankings-table td {
        padding: 10px 8px;
        font-size: 0.82rem;
    }
    .rankings-table th:first-child,
    .rankings-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 3;
        background: #14141d;
        min-width: 42px;
        width: 42px;
        text-align: center;
        border-right: 1px solid rgba(255,255,255,0.04);
    }
    .rankings-table th:nth-child(2),
    .rankings-table td:nth-child(2) {
        position: sticky;
        left: 42px;
        z-index: 3;
        background: #14141d;
        min-width: 140px;
        max-width: 160px;
        box-shadow: 4px 0 8px rgba(0,0,0,0.45);
        border-right: 1px solid var(--border);
    }
    .rankings-table thead th:first-child,
    .rankings-table thead th:nth-child(2) {
        background: #191924;
        z-index: 4;
    }
    .rankings-table tbody tr:hover td:first-child,
    .rankings-table tbody tr:hover td:nth-child(2) {
        background: var(--bg-card-hover);
    }
    .name-cell { gap: 8px; }
    .avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
    .name-info-name {
        font-size: 0.84rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100px;
    }
    .name-info-age { font-size: 0.68rem; }
    .worth-cell { font-size: 0.88rem; white-space: nowrap; }
    .change-cell { font-size: 0.78rem; white-space: nowrap; }
    .stock-cell { font-size: 0.78rem; white-space: nowrap; }
    .stock-ticker { font-size: 0.65rem; padding: 2px 4px; margin-right: 4px; }
    .stock-price { font-size: 0.8rem; }
    .industry-badge { font-size: 0.68rem; padding: 2px 8px; white-space: nowrap; }
    .country-cell { font-size: 0.8rem; white-space: nowrap; }

    /* Stats Grid */
    .stat-card { padding: 18px; border-radius: var(--radius-md); }
    .stat-card-header { margin-bottom: 14px; }
    .stat-card-header h3 { font-size: 1rem; }
    .stat-bar-row { gap: 8px; margin-bottom: 10px; }
    .stat-bar-label { width: 85px; font-size: 0.78rem; }
    .stat-bar-value { width: 35px; font-size: 0.75rem; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .metric-item { padding: 12px 8px; }
    .metric-value { font-size: 1.2rem; }
    .metric-label { font-size: 0.72rem; }

    /* Trends */
    .chart-card { padding: 16px; }
    .chart-header { margin-bottom: 12px; }
    .chart-header h3 { font-size: 0.95rem; }
    .chart-legend { gap: 8px; }
    .legend-item { font-size: 0.7rem; }
    .trends-highlights { gap: 10px; }
    .trend-card { padding: 14px; }
    .trend-card-title { font-size: 0.85rem; }
    .trend-card-desc { font-size: 0.78rem; }
    .trend-card-value { font-size: 1rem; }

    /* About */
    .about-text { font-size: 0.88rem; line-height: 1.6; }
    .about-features { gap: 12px; margin-top: 18px; }
    .about-feature { gap: 12px; }
    .about-feature-icon { font-size: 1.15rem; }
    .about-feature strong { font-size: 0.88rem; }
    .about-feature p { font-size: 0.8rem; }
    .about-visual { display: flex; justify-content: center; }
    .about-globe { width: 180px; height: 180px; }
    .ring-1 { width: 140px; height: 140px; }
    .ring-2 { width: 165px; height: 165px; }
    .ring-3 { width: 180px; height: 180px; }
    .globe-core { font-size: 2.4rem; }

    /* Footer */
    #main-footer { padding: 36px 0 20px; }
    .footer-top {
        flex-direction: column;
        gap: 24px;
        text-align: center;
        align-items: center;
    }
    .footer-brand { max-width: 100%; text-align: center; }
    .footer-links-group { align-items: center; }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 6px;
        padding-top: 16px;
    }
}

/* --- SMALL MOBILES (<= 600px) --- */
@media (max-width: 600px) {
    .ticker-label {
        padding: 10px 12px;
        font-size: 0.68rem;
        letter-spacing: 0.5px;
    }
    .ticker-content { gap: 24px; padding: 10px 0; }
    .ticker-item { font-size: 0.8rem; }

    .pulse-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .pulse-card { padding: 12px 10px; }
    .pulse-card-label { font-size: 0.7rem; }
    .pulse-card-value { font-size: 1.15rem; }
    .pulse-card-change { font-size: 0.72rem; }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .news-card { padding: 16px; gap: 8px; }
    .news-title { font-size: 0.96rem; }
    .news-summary { font-size: 0.82rem; -webkit-line-clamp: 2; }

    /* Modal Mobile */
    .modal {
        width: 95%;
        max-height: 90vh;
        border-radius: var(--radius-lg);
    }
    .modal-header { padding: 22px 16px 14px; }
    .avatar-photo.avatar-xl, .avatar-fallback.avatar-xl {
        width: 64px; height: 64px; font-size: 1.4rem; margin-bottom: 8px;
    }
    .modal-name { font-size: 1.25rem; }
    .modal-company { font-size: 0.8rem; }
    .modal-worth { font-size: 1.45rem; }
    .modal-change { font-size: 0.8rem; }
    .modal-body { padding: 14px 16px 20px; }
    .modal-facts {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 12px;
    }
    .modal-fact { padding: 8px 10px; }
    .modal-fact-label { font-size: 0.65rem; }
    .modal-fact-value { font-size: 0.85rem; }
    .modal-bio-title { font-size: 0.9rem; }
    .modal-bio { font-size: 0.84rem; line-height: 1.6; }
    .modal-close {
        top: 10px; right: 10px;
        width: 32px; height: 32px; font-size: 1.1rem;
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* --- EXTRA NARROW SCREENS (<= 380px) --- */
@media (max-width: 380px) {
    .hero-title { font-size: 1.85rem; }
    .hero-stats { max-width: 310px; padding: 10px 4px; }
    .hero-stat-value { font-size: 1.1rem; }
    .hero-stat-label { font-size: 0.58rem; }
    .pulse-card-value { font-size: 1rem; }
    .section-title { font-size: 1.5rem; }

    .podium-card { padding: 10px 4px 10px; }
    .podium-rank { width: 20px; height: 20px; font-size: 0.65rem; margin-bottom: 4px; }
    .avatar-photo.avatar-lg, .avatar-fallback.avatar-lg { width: 38px; height: 38px; font-size: 0.85rem; }
    .podium-card.rank-1 .avatar-photo.avatar-lg,
    .podium-card.rank-1 .avatar-fallback.avatar-lg { width: 44px; height: 44px; font-size: 0.95rem; }
    .podium-name { font-size: 0.72rem; }
    .podium-worth { font-size: 0.9rem; }
    .podium-card.rank-1 .podium-worth { font-size: 1.02rem; }
    .podium-change { font-size: 0.62rem; }
}

