/*
 * Apex Commodities — Dark Obsidian & Glowing Emerald Design System
 */

:root {
    --bg-dark: #06130d;
    --bg-surface: #091f15;
    --bg-card: rgba(15, 45, 30, 0.6);
    --bg-card-hover: rgba(20, 60, 40, 0.8);

    --apex-emerald: #00c805;
    --apex-green-dark: #064e3b;
    --apex-mint: #10b981;
    --apex-cyan: #06b6d4;

    --border-dark: #1e3a2b;
    --border-glow: rgba(0, 200, 5, 0.3);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 9999px;

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

    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--apex-emerald);
}

/* Top Announcement Banner */
.apex-top-banner {
    background: linear-gradient(90deg, #064e3b, #047857, #064e3b);
    color: #ffffff;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
}

.apex-top-banner a {
    color: #ffffff;
    text-decoration: underline;
    margin-left: 0.5rem;
}

/* Navbar */
.navbar {
    background-color: rgba(6, 19, 13, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-dark);
    padding: 1.1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-primary) !important;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.navbar-brand img.logo-img {
    height: 34px;
    width: 34px;
    object-fit: contain;
}

.nav-link {
    font-weight: 600;
    color: var(--text-secondary) !important;
    font-size: 0.94rem;
    padding: 0.45rem 1.1rem !important;
    transition: var(--transition);
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
    color: var(--apex-emerald) !important;
    background-color: var(--bg-surface);
}

/* Buttons */
.btn-apex-emerald {
    background: var(--apex-emerald);
    color: #06130d !important;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 0.7rem 1.7rem;
    border-radius: var(--radius-pill);
    border: none;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-apex-emerald:hover {
    background: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 200, 5, 0.5);
}

.btn-apex-outline {
    background: rgba(9, 31, 21, 0.6);
    border: 1px solid var(--border-dark);
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.7rem 1.7rem;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-apex-outline:hover {
    background: var(--bg-surface);
    border-color: var(--apex-emerald);
    color: var(--apex-emerald) !important;
}

/* Hero Section */
.hero-section {
    padding: 6rem 0 5rem;
    background: radial-gradient(circle at 50% 15%, rgba(0, 200, 5, 0.12) 0%, transparent 65%);
}

.hero-title {
    font-size: clamp(2.7rem, 5.5vw, 4.6rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--text-primary);
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto;
}

/* Dark Glassmorphism Cards */
.apex-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    transition: var(--transition);
    height: 100%;
}

.apex-card:hover {
    border-color: var(--apex-emerald);
    box-shadow: 0 10px 30px rgba(0, 200, 5, 0.15);
    transform: translateY(-3px);
}

.badge-gain {
    background-color: rgba(0, 200, 5, 0.15);
    color: #00c805;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
}

.badge-loss {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
}

/* Telemetry & Order Book Terminal */
.apex-terminal {
    background: #020905;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Ticker Marquee Bar */
.apex-ticker-bar {
    background-color: #030d08;
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
    padding: 0.85rem 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* Modals & Form */
.modal-content {
    background: #091f15;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.form-control, .form-select {
    background: #030d08 !important;
    border: 1px solid var(--border-dark) !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
}

.form-control:focus, .form-select:focus {
    border-color: var(--apex-emerald) !important;
    box-shadow: 0 0 0 3px var(--border-glow) !important;
}

/* Footer */
footer {
    background-color: #030d08;
    border-top: 1px solid var(--border-dark);
    padding: 4.5rem 0 2.5rem;
    margin-top: auto;
}

footer h5 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--apex-emerald);
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer ul li {
    margin-bottom: 0.75rem;
}
