/* ============================================
   DESIGN TOKENS — change these to restyle the entire site
   ============================================ */
:root {
    --bg-deep: #0B0E14;
    --bg-panel: #141822;
    --bg-panel-hover: #1B202C;
    --border-subtle: #232838;

    --text-primary: #E8EAED;
    --text-secondary: #9AA3B2;
    --text-muted: #5C6577;

    --accent-buy: #3DD68C;
    --accent-sell: #FF5C5C;
    --accent-neutral: #5B8DEF;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius: 10px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

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

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-neutral); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Visible keyboard focus — accessibility, never remove */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent-neutral);
    outline-offset: 2px;
}

/* ============================================
   TOP NAVIGATION
   ============================================ */
.navbar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* The signature element: animated gradient hairline, market-pulse motif */
.navbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-buy), var(--accent-neutral), var(--accent-sell), var(--accent-buy));
    background-size: 200% 100%;
    animation: pulse-line 8s linear infinite;
}

@keyframes pulse-line {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

@media (prefers-reduced-motion: reduce) {
    .navbar::after { animation: none; }
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.navbar-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.navbar-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

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

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   LAYOUT
   ============================================ */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}

.page-container.narrow {
    max-width: 440px;
    padding-top: 80px;
}

/* ============================================
   CARDS / PANELS
   ============================================ */
.card {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 32px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color 0.15s ease;
}

.form-group input:focus {
    border-color: var(--accent-neutral);
    outline: none;
}

.btn {
    display: inline-block;
    background: var(--accent-neutral);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
    width: 100%;
    text-align: center;
}

.btn:hover { opacity: 0.88; text-decoration: none; }

/* ============================================
   ALERTS / MESSAGES
   ============================================ */
.alert {
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(255, 92, 92, 0.1);
    border: 1px solid rgba(255, 92, 92, 0.3);
    color: var(--accent-sell);
}

.alert-success {
    background: rgba(61, 214, 140, 0.1);
    border: 1px solid rgba(61, 214, 140, 0.3);
    color: var(--accent-buy);
}

/* ============================================
   UTILITY
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 13px; }
.mt-16 { margin-top: 16px; }
.mono { font-family: var(--font-mono); }
/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    margin-top: 64px;
    padding: 24px;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}