:root {
    /* === OCEAN / WATER THEME PALETTE === */
    --bg-base: #020c18;
    --bg-card: rgba(4, 22, 44, 0.78);
    --bg-card-hover: rgba(6, 30, 60, 0.92);
    --bg-glass: rgba(3, 15, 32, 0.70);
    --border-color: rgba(0, 180, 255, 0.16);
    --border-glow: rgba(0, 200, 255, 0.40);

    /* Accent Colors — deep-water tones */
    --neon-cyan:      #00d4ff;
    --neon-green:     #00ffb3;
    --neon-blue:      #1a8fff;
    --ocean-teal:     #00c9b1;
    --ocean-sapphire: #0077cc;
    --deep-azure:     #0050a0;
    --electric-violet:#6b35c8;
    --crimson-red:    #ff3b6b;
    --gold-warning:   #ffba00;

    --text-main: #e8f4ff;
    --text-muted: #7aacce;
    --text-dim: #3b6080;

    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --shadow-glow-cyan:  0 0 22px rgba(0, 212, 255, 0.30);
    --shadow-glow-green: 0 0 22px rgba(0, 255, 179, 0.28);
    --shadow-glow-blue:  0 0 22px rgba(0, 119, 204, 0.30);

    --radius-sm: 7px;
    --radius-md: 12px;
    --radius-lg: 18px;

    /* Smooth transition timing */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.55;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==============================
   ANIMATED OCEAN BACKGROUND
   ============================== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(ellipse at 20% 10%, rgba(0, 100, 200, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 180, 255, 0.07) 0%, transparent 45%),
        radial-gradient(ellipse at 10% 80%, rgba(0, 201, 177, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 85%, rgba(0, 100, 200, 0.10) 0%, transparent 50%),
        linear-gradient(180deg, #020c18 0%, #030f20 50%, #020b16 100%);
    pointer-events: none;
    z-index: -2;
    animation: oceanPulse 12s ease-in-out infinite alternate;
}

/* Subtle wave overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 150, 220, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 150, 220, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
    animation: gridDrift 20s linear infinite;
}

@keyframes oceanPulse {
    0%   { filter: brightness(1); }
    50%  { filter: brightness(1.04) hue-rotate(5deg); }
    100% { filter: brightness(1.02) hue-rotate(-3deg); }
}

@keyframes gridDrift {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* ==============================
   TYPOGRAPHY UTILITIES
   ============================== */
.glow-cyan {
    color: var(--neon-cyan);
    text-shadow: 0 0 14px rgba(0, 212, 255, 0.50);
}

.glow-green {
    color: var(--neon-green);
    text-shadow: 0 0 14px rgba(0, 255, 179, 0.50);
}

.glow-crimson {
    color: var(--crimson-red);
    text-shadow: 0 0 14px rgba(255, 59, 107, 0.50);
}

.pos { color: var(--neon-green) !important; }
.neg { color: var(--crimson-red) !important; }

/* ==============================
   TOP TICKER TAPE
   ============================== */
.ticker-tape-container {
    width: 100%;
    background: linear-gradient(90deg, rgba(2, 10, 22, 0.97), rgba(3, 14, 30, 0.97));
    border-bottom: 1px solid rgba(0, 180, 255, 0.12);
    overflow: hidden;
    white-space: nowrap;
    padding: 7px 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    z-index: 100;
    box-shadow: 0 2px 18px rgba(0, 100, 200, 0.12);
}

.ticker-tape-track {
    display: inline-flex;
    gap: 36px;
    animation: tickerScroll 40s linear infinite;
    will-change: transform;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.ticker-item:hover { opacity: 0.75; }

.ticker-sym  { font-weight: 700; color: var(--text-main); }
.ticker-price { color: var(--neon-cyan); }

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==============================
   NAVIGATION BAR
   ============================== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: rgba(3, 12, 26, 0.90);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5),
                0 1px 0 rgba(0, 180, 255, 0.10);
    transition: background 0.3s var(--ease-out);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Wave-shaped logo icon */
.logo-icon-3d {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--ocean-teal));
    border-radius: 10px;
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.55),
                inset 0 1px 0 rgba(255,255,255,0.25);
    position: relative;
    transform: rotate(45deg);
    animation: logoBreath 4s ease-in-out infinite;
}

.logo-icon-3d::after {
    content: '';
    position: absolute;
    inset: 5px;
    background: var(--bg-base);
    border-radius: 4px;
}

@keyframes logoBreath {
    0%, 100% { box-shadow: 0 0 18px rgba(0, 212, 255, 0.55); }
    50%       { box-shadow: 0 0 28px rgba(0, 212, 255, 0.80), 0 0 50px rgba(0, 201, 177, 0.30); }
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-family: var(--font-mono);
}

.brand-badge {
    font-size: 0.63rem;
    background: rgba(0, 212, 255, 0.12);
    color: var(--neon-cyan);
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid rgba(0, 212, 255, 0.30);
    margin-left: 6px;
    font-family: var(--font-mono);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 18px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.pulse-green {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    animation: pulseGreen 2s ease-in-out infinite;
}

@keyframes pulseGreen {
    0%, 100% { transform: scale(0.92); opacity: 0.75; }
    50%       { transform: scale(1.25); opacity: 1; box-shadow: 0 0 20px var(--neon-green); }
}

/* Nav Center Search */
.nav-center {
    flex: 1;
    max-width: 520px;
    margin: 0 24px;
}

.search-box-wrapper { position: relative; width: 100%; }

.search-box-wrapper input {
    width: 100%;
    background: rgba(4, 18, 38, 0.88);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px 10px 44px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    transition: all 0.3s var(--ease-out);
}

.search-box-wrapper input::placeholder { color: var(--text-dim); }

.search-box-wrapper input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-glow-cyan), inset 0 0 20px rgba(0, 212, 255, 0.04);
    background: rgba(5, 22, 48, 0.96);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s;
}

.search-box-wrapper input:focus + .search-icon,
.search-box-wrapper:focus-within .search-icon {
    color: var(--neon-cyan);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(4, 16, 34, 0.98);
    backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65),
                0 0 0 1px rgba(0, 212, 255, 0.06),
                inset 0 1px 0 rgba(0, 212, 255, 0.08);
    max-height: 380px;
    overflow-y: auto;
    z-index: 150;
    animation: fadeSlideDown 0.18s var(--ease-out);
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-hidden { display: none; }

.suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

.suggestion-item:hover { background: rgba(0, 212, 255, 0.08); }
.suggestion-item:last-child { border-bottom: none; }

.sugg-sym  { font-weight: 700; font-family: var(--font-mono); color: var(--neon-cyan); width: 72px; }
.sugg-name { flex: 1; font-size: 0.85rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px; }
.sugg-sector { font-size: 0.73rem; color: var(--text-muted); background: rgba(0, 180, 255, 0.07); padding: 2px 8px; border-radius: 5px; border: 1px solid rgba(0, 180, 255, 0.14); }

/* Nav Right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.market-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(4, 18, 38, 0.85);
    border: 1px solid rgba(0, 180, 255, 0.14);
    padding: 6px 14px;
    border-radius: 24px;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    transition: border-color 0.2s;
}

.market-pill:hover { border-color: rgba(0, 212, 255, 0.35); }
.pill-label { color: var(--text-muted); }

.nav-icon-btn {
    background: rgba(4, 18, 38, 0.85);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.22s var(--ease-out);
}

.nav-icon-btn svg { width: 18px; height: 18px; }

.nav-icon-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: var(--shadow-glow-cyan);
    transform: translateY(-1px);
}

.badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, var(--neon-green), var(--ocean-teal));
    color: #020c18;
    font-size: 0.62rem;
    font-weight: 800;
    font-family: var(--font-mono);
    width: 19px;
    height: 19px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(0, 255, 179, 0.50);
}

/* Auth buttons */
.auth-section { display: flex; align-items: center; gap: 10px; }

/* ==============================
   APP CONTAINER LAYOUT
   ============================== */
.app-container {
    max-width: 1700px;
    margin: 22px auto;
    padding: 0 26px 70px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

/* ==============================
   GLASSMORPHISM CARD — WATER STYLE
   ============================== */
.card-glass {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.45),
        0 1px 0 rgba(0, 212, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

/* Animated top shimmer line */
.card-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.55), rgba(0, 255, 179, 0.35), transparent);
    animation: shimmerLine 6s ease-in-out infinite;
}

/* Subtle inner water ripple glow */
.card-glass::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(0, 150, 220, 0.07) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: innerRipple 8s ease-in-out infinite alternate;
}

@keyframes shimmerLine {
    0%   { left: -100%; opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

@keyframes innerRipple {
    0%   { transform: scale(0.8) translate(0,0); opacity: 0.5; }
    100% { transform: scale(1.3) translate(-15px,-15px); opacity: 1; }
}

.card-glass:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 50px rgba(0, 0, 0, 0.50),
        0 0 0 1px rgba(0, 212, 255, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Card title bar */
.card-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 180, 255, 0.10);
}

.title-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-with-icon h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--text-main), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pulse-icon { font-size: 1.1rem; }

.model-tag {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--neon-cyan);
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.22);
    padding: 3px 10px;
    border-radius: 6px;
}

/* ==============================
   GRID LAYOUTS
   ============================== */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
}

@media (max-width: 1100px) {
    .grid-2col { grid-template-columns: 1fr; }
}

/* ==============================
   BUTTONS — WATER THEME
   ============================== */
.btn {
    padding: 9px 20px;
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

/* Ripple on click */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: inherit;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.4s var(--ease-out), opacity 0.4s;
}

.btn:active::after {
    transform: scale(2.5);
    opacity: 0;
    transition: 0s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--ocean-teal) 50%, var(--neon-green) 100%);
    background-size: 200% 200%;
    color: #020c18;
    font-weight: 700;
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.38), 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: gradientShift 4s ease infinite;
}

.btn-primary:hover {
    box-shadow: 0 0 28px rgba(0, 212, 255, 0.60), 0 0 60px rgba(0, 255, 179, 0.20), 0 6px 20px rgba(0,0,0,0.3);
    transform: translateY(-2px) scale(1.02);
}

.btn-primary:active { transform: translateY(0) scale(0.98); }

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(0, 212, 255, 0.07);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
    transform: translateY(-1px);
}

.btn-sm { padding: 5px 14px; font-size: 0.78rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

.btn-toggle {
    background: rgba(4, 18, 38, 0.80);
    border: 1px solid rgba(0, 180, 255, 0.10);
    color: var(--text-muted);
    padding: 7px 15px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.22s var(--ease-out);
}

.btn-toggle.active,
.btn-toggle:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.22), inset 0 0 12px rgba(0, 212, 255, 0.04);
}

.btn-icon {
    background: rgba(4, 18, 38, 0.80);
    border: 1px solid rgba(0, 180, 255, 0.10);
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.22s var(--ease-out);
}

.btn-icon:hover {
    color: var(--text-main);
    border-color: rgba(0, 180, 255, 0.28);
    background: rgba(0, 180, 255, 0.06);
}

.button-group { display: flex; gap: 8px; }

/* ==============================
   FOOTER
   ============================== */
.app-footer {
    border-top: 1px solid rgba(0, 180, 255, 0.10);
    padding: 26px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: linear-gradient(180deg, rgba(2, 10, 20, 0.0) 0%, rgba(2, 10, 20, 0.95) 100%);
}

.footer-content {
    max-width: 1700px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-link { color: var(--neon-cyan); text-decoration: none; transition: text-shadow 0.2s; }
.footer-link:hover { text-shadow: 0 0 12px var(--neon-cyan); }
