:root {
    --bg-main: #07090e;
    --bg-card: #11151f;
    --bg-hover: #181d2a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-green: #089981;
    --accent-red: #f23645;
    --accent-neutral: #999999;
    --accent-blue: #f59e0b; /* All primary blue accents are now GOLD */
    --accent-gold: #f59e0b;
    --accent-gold-hover: #d97706;
    --border-color: #1e2433;
    --border-glow: rgba(245, 158, 11, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    position: relative;
    min-height: 100vh;
}

/* Background Grid & Glowing Orbs */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(30, 36, 51, 0.25) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 36, 51, 0.25) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 0;
}

.glow-gold {
    top: -120px;
    left: 15%;
    width: 550px;
    height: 550px;
    background: rgba(245, 158, 11, 0.14);
    animation: pulseGlow 8s ease-in-out infinite alternate;
}

.glow-blue {
    top: 450px;
    right: 5%;
    width: 600px;
    height: 600px;
    background: rgba(245, 158, 11, 0.08);
    animation: pulseGlow 10s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translateY(0); opacity: 0.7; }
    100% { transform: scale(1.15) translateY(-20px); opacity: 1; }
}

.navbar {
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(17, 21, 31, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.logo span {
    color: var(--accent-gold);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.input-dark {
    background-color: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
}

.input-dark:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.btn-primary, .btn-gold, .auth-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #07090e !important;
    border: none;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-weight: 700 !important;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover, .btn-gold:hover, .auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45);
    color: #000000 !important;
}

.btn-primary:disabled, .auth-btn:disabled {
    background: #334155;
    color: #94a3b8 !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.dashboard {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.status-bar {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.status-item {
    display: flex;
    flex-direction: column;
}

.status-item .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.status-item .value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.card h2 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.consensus-value {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin: 1rem 0;
}

.direction-long { color: var(--accent-green); }
.direction-short { color: var(--accent-red); }
.direction-neutral { color: var(--accent-neutral); }

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.details-grid div {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
}

.details-grid .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.details-grid .value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
}

.tp-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.badge {
    padding: 0.3rem 0.6rem;
    background-color: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.ai-models {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.model-box {
    background: rgba(255,255,255,0.02);
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-box h3 {
    font-size: 0.9rem;
    font-weight: normal;
}

.model-box .direction {
    font-weight: bold;
}

.model-box .confidence {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.charts-card {
    grid-column: 1 / -1;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-blue);
}

.chart-container {
    width: 100%;
    background-color: #131722;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
}

.chart-img {
    display: none;
    max-width: 100%;
    height: auto;
}

.chart-img.active {
    display: block;
}

.chart-placeholder {
    color: var(--text-secondary);
}

.disclaimer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

/* Leverage Selector Pill Styling */
.leverage-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.leverage-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.leverage-select-custom {
    background: rgba(0, 0, 0, 0.4);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.leverage-select-custom:focus {
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* Futuristic AI Scanner Radar Loading Overlay */
/* Sleek Mobile-Optimized AI Scanner Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(7, 9, 14, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
    box-sizing: border-box;
}

.loading-overlay.hidden {
    display: none;
}

.scanner-emblem-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.8rem;
}

.spinner-ring {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 3px solid rgba(245, 158, 11, 0.12);
    border-top: 3px solid #f59e0b;
    border-right: 3px solid #d97706;
    animation: goldSpin 1.4s linear infinite;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

@keyframes goldSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.scanner-gold-ingot {
    width: 80px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(245, 158, 11, 0.5));
    animation: goldFloatPulse 3s ease-in-out infinite alternate;
}

@keyframes goldFloatPulse {
    0% { transform: translateY(0) scale(0.95); filter: drop-shadow(0 8px 15px rgba(245, 158, 11, 0.4)); }
    100% { transform: translateY(-8px) scale(1.08); filter: drop-shadow(0 15px 30px rgba(245, 158, 11, 0.7)); }
}

.scanner-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: #ffffff;
    margin-bottom: 8px;
    text-transform: uppercase;
    text-align: center;
}

.scanner-status {
    color: var(--accent-gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 22px;
    text-align: center;
    max-width: 90%;
}

.scanner-progress-track {
    width: 260px;
    max-width: 85vw;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.scanner-progress-bar {
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
    animation: progressScan 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes progressScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

.reasons {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.02);
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.reasons ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

/* Legal Footer Links */
.footer-links {
    margin-top: 0.8rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: 1fr !important;
        width: 100% !important;
        gap: 1.5rem !important;
    }

    .left-column {
        width: 100% !important;
    }

    .charts-card {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .nav-links a {
        margin: 0;
        font-size: 0.85rem;
    }

    .nav-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 1rem;
    }

    .status-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
        padding: 0.8rem;
        width: 100%;
        box-sizing: border-box;
    }

    .dashboard {
        padding: 0.8rem;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .card {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .consensus-value {
        font-size: 2rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .model-box {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.8rem;
        font-size: 0.85rem;
    }

    .tp-badges {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    #trialBanner > div {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    #bannerTrialKey {
        width: 100% !important;
    }

    .tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 8px;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .chart-container {
        min-height: 250px;
        width: 100%;
    }

    .chart-img {
        width: 100%;
        height: auto;
    }
}
