/* ============================================
   PredictAPI - Global Styles
   ============================================ */

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

:root {
    /* Backgrounds */
    --bg-primary: #09090b;
    --bg-secondary: #0f0f12;
    --bg-card: #141419;
    --bg-card-hover: #1a1a21;
    --bg-sidebar: #0c0c0f;

    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;

    /* Colors */
    --accent: #10b981;
    --accent-hover: #059669;
    --up: #22c55e;
    --up-bg: rgba(34, 197, 94, 0.1);
    --down: #ef4444;
    --down-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Borders */
    --border: #27272a;
    --border-light: #3f3f46;

    /* Spacing */
    --sidebar-width: 240px;
    --navbar-height: 56px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

code, pre {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   Utilities
   ============================================ */

.text-up { color: var(--up); }
.text-down { color: var(--down); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.bg-up { background: var(--up-bg); }
.bg-down { background: var(--down-bg); }

.mono { font-family: 'JetBrains Mono', monospace; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

/* ============================================
   Forms
   ============================================ */

.input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

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

.input::placeholder {
    color: var(--text-muted);
}

/* ============================================
   Badge / Tag
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-up {
    background: var(--up-bg);
    color: var(--up);
}

.badge-down {
    background: var(--down-bg);
    color: var(--down);
}

.badge-neutral {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* ============================================
   Live Indicator
   ============================================ */

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--up);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }
}
