/* =========================================================
   Matrix Wave — Luxury White & Gold Theme
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    --bg: #ffffff;
    --bg-alt: #faf9f7;
    --gold: #c9a84c;
    --gold-light: #e8d48b;
    --gold-dark: #a67c00;
    --gold-glow: rgba(201,168,76,0.12);
    --gold-border: rgba(201,168,76,0.25);
    --accent-cyan: #38bdf8;
    --accent-purple: #a78bfa;
    --accent-rose: #fb7185;
    --accent-emerald: #34d399;
    --text-main: #1a1a2e;
    --text-secondary: #555568;
    --text-muted: #8e8ea0;
    --bullish: #22c55e;
    --bearish: #ef4444;
    --border: rgba(201,168,76,0.15);
    --card-bg: #ffffff;
    --surface: #f8f7f4;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
    --shadow-gold: 0 4px 20px rgba(201,168,76,0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   Animated Background Orbs
   ========================================================= */

.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.18;
    will-change: transform;
}

.bg-orb--gold {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--gold-light), transparent 70%);
    top: -10%;
    right: -5%;
    animation: orbFloat1 20s ease-in-out infinite;
}

.bg-orb--cyan {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
    top: 40%;
    left: -8%;
    animation: orbFloat2 25s ease-in-out infinite;
}

.bg-orb--purple {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--accent-purple), transparent 70%);
    bottom: -5%;
    right: 10%;
    animation: orbFloat3 22s ease-in-out infinite;
}

.bg-orb--rose {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent-rose), transparent 70%);
    top: 60%;
    left: 50%;
    opacity: 0.10;
    animation: orbFloat4 28s ease-in-out infinite;
}

.bg-orb--emerald {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-emerald), transparent 70%);
    top: 15%;
    left: 30%;
    opacity: 0.10;
    animation: orbFloat5 24s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-60px, 40px) scale(1.05); }
    50% { transform: translate(-30px, 80px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -30px) scale(1.08); }
    50% { transform: translate(80px, 20px) scale(0.92); }
    75% { transform: translate(20px, -50px) scale(1.04); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, -60px) scale(1.06); }
    66% { transform: translate(50px, -30px) scale(0.94); }
}

@keyframes orbFloat4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    30% { transform: translate(-70px, 40px) scale(1.1); }
    60% { transform: translate(40px, -50px) scale(0.9); }
}

@keyframes orbFloat5 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40% { transform: translate(60px, 60px) scale(1.05); }
    70% { transform: translate(-40px, 30px) scale(0.95); }
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* =========================================================
   Matrix Canvas Background
   ========================================================= */

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.06;
    mix-blend-mode: multiply;
}

/* =========================================================
   Navigation
   ========================================================= */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.nav::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 10%, var(--gold) 30%, var(--accent-cyan) 50%, var(--accent-purple) 70%, transparent 90%);
    background-size: 200% 100%;
    animation: navGlow 8s linear infinite;
    opacity: 0.4;
}

@keyframes navGlow {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.nav.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-icon {
    font-size: 24px;
    color: var(--gold);
    filter: drop-shadow(0 0 4px rgba(201,168,76,0.3));
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-main);
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 16px; }

.lang-switch {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
}

.lang-switch button {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.lang-switch button:hover { color: var(--text-main); }

.lang-switch button.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-main);
    border-radius: 1px;
    transition: var(--transition);
}

/* =========================================================
   Hero Section
   ========================================================= */

.hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px 40px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(201,168,76,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 40%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(56,189,248,0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-content { max-width: 560px; }

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--gold-glow);
    border: 1px solid var(--gold-border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-dark);
    letter-spacing: 0.5px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}

.hero-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.hero-title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-main);
    margin-bottom: 16px;
}

.hero-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--accent-cyan), var(--gold-dark));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-desc {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    box-shadow: var(--shadow-gold);
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201,168,76,0.3);
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn-hero-secondary:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 28px;
}

.hero-stat { text-align: center; }

.hero-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: -0.5px;
}

.hero-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 4px;
    display: block;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Float Cards in Hero */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-card-float {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 380px;
}

.float-card {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    min-width: 180px;
}

.float-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold-border);
}

.fc-1 { top: 0; left: 0; z-index: 3; animation: floatCard1 6s ease-in-out infinite; border-top: 2px solid var(--gold); }
.fc-2 { top: 80px; right: 0; z-index: 2; animation: floatCard2 7s ease-in-out infinite; border-top: 2px solid var(--accent-cyan); }
.fc-3 { bottom: 0; left: 40px; z-index: 1; animation: floatCard3 8s ease-in-out infinite; border-top: 2px solid var(--accent-purple); }

.fc-1:hover { box-shadow: 0 12px 40px rgba(201,168,76,0.15); }
.fc-2:hover { box-shadow: 0 12px 40px rgba(56,189,248,0.15); }
.fc-3:hover { box-shadow: 0 12px 40px rgba(167,139,250,0.15); }

@keyframes floatCard1 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floatCard2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes floatCard3 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.fc-icon {
    font-size: 20px;
    color: var(--gold);
    margin-bottom: 8px;
}

.fc-2 .fc-icon { color: var(--accent-cyan); }
.fc-3 .fc-icon { color: var(--accent-purple); }

.fc-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.fc-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    font-family: "Inter", monospace;
}

/* =========================================================
   Sections
   ========================================================= */

.section {
    position: relative;
    z-index: 1;
    padding: 50px 0;
}

.section-alt {
    background: var(--bg-alt);
    background-image:
        radial-gradient(ellipse 80% 50% at 20% 60%, rgba(56,189,248,0.04), transparent),
        radial-gradient(ellipse 60% 40% at 80% 30%, rgba(167,139,250,0.04), transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: var(--gold-glow);
    border: 1px solid var(--gold-border);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-dark);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    color: var(--text-main);
}

/* =========================================================
   Cards (Dashboard)
   ========================================================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card h2 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.3px;
}

.card h2::before {
    content: "";
    display: block;
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, var(--gold), var(--gold-light));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 28px;
    margin-bottom: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* AI Sentiment */
.ai-card { height: 600px; overflow: auto; }

.gauge-box {
    text-align: center;
    margin: 20px 0;
    padding: 24px;
    background: linear-gradient(135deg, var(--surface), rgba(201,168,76,0.04));
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.signal-text {
    font-size: 28px;
    font-weight: 800;
    margin: 8px 0 20px;
    letter-spacing: -0.5px;
}

.score-bar-bg {
    background: rgba(201,168,76,0.1);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.score-bar-fill {
    height: 100%;
    width: 50%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    left: 50%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-list { list-style: none; padding: 0; }

.tech-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.tech-list li:last-child { border-bottom: none; }
.tech-key { color: var(--text-muted); font-weight: 500; }

/* Chart */
.chart-card-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 600px;
}

.timeframe-toolbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.tf-btn {
    background: var(--surface);
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 6px 14px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.tf-btn:hover {
    color: var(--gold-dark);
    background: var(--gold-glow);
    border-color: var(--gold-border);
}

.tf-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(201,168,76,0.25);
}

#tv_chart_container { flex-grow: 1; width: 100%; height: 100%; }

/* =========================================================
   Analytics Section
   ========================================================= */

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.analytics-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.analytics-card::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: var(--radius);
}

.analytics-card:nth-child(1)::after { background: radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.08), transparent 70%); }
.analytics-card:nth-child(2)::after { background: radial-gradient(ellipse at 20% 80%, rgba(56,189,248,0.08), transparent 70%); }
.analytics-card:nth-child(3)::after { background: radial-gradient(ellipse at 50% 50%, rgba(167,139,250,0.08), transparent 70%); }
.analytics-card:nth-child(4)::after { background: radial-gradient(ellipse at 80% 80%, rgba(52,211,153,0.08), transparent 70%); }

.analytics-card:hover::after { opacity: 1; }

.analytics-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--gold-border);
    transform: translateY(-4px);
}

.analytics-card:nth-child(1):hover { border-color: rgba(201,168,76,0.35); }
.analytics-card:nth-child(2):hover { border-color: rgba(56,189,248,0.35); }
.analytics-card:nth-child(3):hover { border-color: rgba(167,139,250,0.35); }
.analytics-card:nth-child(4):hover { border-color: rgba(52,211,153,0.35); }

.analytics-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.analytics-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.analytics-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

.analytics-value.gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.analytics-card canvas {
    width: 100% !important;
    border-radius: 8px;
}

/* =========================================================
   Features Section
   ========================================================= */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--accent-cyan), transparent);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(201,168,76,0.06);
    border-color: var(--gold-border);
}

.feature-card:nth-child(2):hover { box-shadow: var(--shadow-lg), 0 0 30px rgba(56,189,248,0.06); }
.feature-card:nth-child(4):hover { box-shadow: var(--shadow-lg), 0 0 30px rgba(167,139,250,0.06); }
.feature-card:nth-child(5):hover { box-shadow: var(--shadow-lg), 0 0 30px rgba(52,211,153,0.06); }

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--gold-glow);
    border: 1px solid var(--gold-border);
    border-radius: 14px;
    font-size: 22px;
    color: var(--gold);
    margin-bottom: 20px;
    transition: var(--transition);
}

.feature-card:nth-child(2) .feature-icon { background: rgba(56,189,248,0.1); border-color: rgba(56,189,248,0.25); color: var(--accent-cyan); }
.feature-card:nth-child(4) .feature-icon { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.25); color: var(--accent-purple); }
.feature-card:nth-child(5) .feature-icon { background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.25); color: var(--accent-emerald); }
.feature-card:nth-child(6) .feature-icon { background: rgba(251,113,133,0.1); border-color: rgba(251,113,133,0.25); color: var(--accent-rose); }

.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* =========================================================
   News & IB Grid
   ========================================================= */

.news-ib-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.news-summary {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: -8px;
    margin-bottom: 20px;
    background: var(--gold-glow);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-border);
}

/* =========================================================
   IB Register
   ========================================================= */

#ib-register { margin-top: 0; }

.ib-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ib-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.ib-subtitle {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tab {
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.tab:hover {
    background: var(--gold-glow);
    border-color: var(--gold-border);
    color: var(--gold-dark);
}

.tab.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-color: transparent;
    color: #fff;
}

.hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 15px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* =========================================================
   Tables
   ========================================================= */

.table-scroll { overflow-x: auto; }
.table-scroll.table-compact { overflow-y: auto; max-height: 230px; }

table { width: 100%; border-collapse: separate; border-spacing: 0; }

th, td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

th {
    color: var(--text-muted);
    background: var(--surface);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
}

th:first-child { border-top-left-radius: 8px; }
th:last-child { border-top-right-radius: 8px; }
tr:last-child td { border-bottom: none; }

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--gold-glow);
}

.ta-right { text-align: right; }

.text-bull { color: var(--bullish); font-weight: 600; }
.text-bear { color: var(--bearish); font-weight: 600; }
.text-neutral { color: var(--text-muted); }

.impact-High {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.impact-Medium {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #d97706;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.impact-Low {
    background: var(--surface);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.date-divider td {
    background: var(--surface);
    color: var(--text-main);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Mini table (Signal history) */
.mini-table { border-collapse: collapse; table-layout: fixed; }
.mini-table th, .mini-table td { padding: 10px 12px; font-size: 12px; vertical-align: top; }
.mini-table td { white-space: normal; }
.mini-table th { position: sticky; top: 0; z-index: 1; }
.mini-table th:nth-child(1), .mini-table td:nth-child(1) { width: 34%; }
.mini-table th:nth-child(2), .mini-table td:nth-child(2) { width: 42%; }
.mini-table th:nth-child(3), .mini-table td:nth-child(3) { width: 24%; }

.sig-main { font-weight: 600; color: var(--text-main); font-size: 13px; }
.sig-sub { margin-top: 2px; font-size: 11px; color: var(--text-muted); }

/* IB Table centering */
#ib-register table th,
#ib-register table td {
    text-align: center;
    vertical-align: middle;
}

#ib-register table th:nth-child(1),
#ib-register table td:nth-child(1) {
    text-align: left;
}

#ib-register table td:nth-child(1) .broker-cell { justify-content: flex-start; }
#ib-register .ta-right { text-align: center; }

.broker-cell { display: flex; align-items: center; gap: 12px; }

.broker-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 700;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.broker-logo img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 3px; }
.broker-name { font-weight: 600; color: var(--text-main); font-size: 14px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    background: var(--surface);
    color: var(--text-main);
    font-family: "SFMono-Regular", Consolas, monospace;
    letter-spacing: 0.3px;
}

.badge-ok { color: var(--bullish); background: rgba(34,197,94,0.08); }
.badge-warn { color: #d97706; background: rgba(217,119,6,0.08); }

.actions { display: flex; gap: 8px; justify-content: center; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--surface);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover { background: var(--gold-glow); color: var(--gold-dark); }

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(201,168,76,0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201,168,76,0.35);
}

.btn-sm { padding: 7px 14px; font-size: 12px; }

/* =========================================================
   Floating Market News
   ========================================================= */

.news-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    border-radius: 100px;
    box-shadow: var(--shadow-gold);
    letter-spacing: 0.5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(201,168,76,0.35);
}

.news-fab-icon { font-size: 14px; }

.news-window {
    position: fixed;
    right: 20px;
    bottom: 75px;
    width: 420px;
    max-width: calc(100vw - 40px);
    max-height: 70vh;
    z-index: 1000;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-window.hidden { display: none; }

.news-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.news-window-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.3px;
}

.news-window-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 0 4px;
    transition: var(--transition);
}

.news-window-close:hover { color: var(--gold); }
.news-window-body { padding: 14px 18px; overflow: auto; }

.market-news-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.market-news-item:last-child { border-bottom: none; }

.market-news-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.market-news-tags { display: inline-flex; gap: 6px; }

.market-news-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--gold-glow);
    border: 1px solid var(--gold-border);
    color: var(--gold-dark);
}

.market-news-link {
    display: block;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
}

.market-news-link:hover { color: var(--gold); }
.market-news-desc { margin-top: 6px; color: var(--text-muted); font-size: 12px; line-height: 1.6; }

/* =========================================================
   Footer
   ========================================================= */

.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 32px 0;
    background: var(--bg);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
    color: var(--text-muted);
    font-size: 12px;
}

/* =========================================================
   Reveal Animations
   ========================================================= */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 100px; }
    .hero-visual { order: -1; }
    .hero-content { max-width: 100%; text-align: center; }
    .hero-desc { max-width: 100%; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-card-float { max-width: 360px; height: 320px; margin: 0 auto; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .chart-card-container { height: 500px; }
    .analytics-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .news-ib-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .hero { min-height: auto; padding: 80px 24px 40px; }
    .hero-card-float { max-width: 280px; height: 280px; }
    .float-card { padding: 16px 20px; min-width: 140px; }
    .fc-value { font-size: 18px; }
    .analytics-grid { grid-template-columns: 1fr 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .section { padding: 40px 0; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; }
    .hero-stats { flex-wrap: wrap; gap: 16px; }
    .hero-stat-divider { display: none; }
    .analytics-grid { grid-template-columns: 1fr; }
    .ai-card { height: auto; }
}
