/*
 * GLOBAL STYLES
 * Main stylesheet for the Polymarket Trading Bot Dashboard
 * Dark theme with Bloomberg terminal aesthetic
 */

/* ===========================
   CSS VARIABLES & THEME
   =========================== */
:root {
    /* Color Palette - Dark Terminal Theme */
    --bg-primary: #0a0e1a;          /* Main background - deep navy */
    --bg-secondary: #12182b;        /* Card backgrounds */
    --bg-tertiary: #1a2235;         /* Hover states */
    --bg-input: #0f1520;            /* Input fields */
    
    /* Text Colors */
    --text-primary: #e8edf4;        /* Main text */
    --text-secondary: #9ba7bd;      /* Secondary text */
    --text-muted: #6b7792;          /* Muted/disabled text */
    
    /* Accent Colors */
    --accent-primary: #3b82f6;      /* Blue - primary actions */
    --accent-secondary: #8b5cf6;    /* Purple - secondary */
    
    /* Status Colors */
    --color-success: #10b981;       /* Green - profits, wins */
    --color-danger: #ef4444;        /* Red - losses, errors */
    --color-warning: #f59e0b;       /* Orange - warnings */
    --color-info: #06b6d4;          /* Cyan - info */
    
    /* Border & Dividers */
    --border-color: #1e293b;
    --border-subtle: #1a2235;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    
    /* Spacing Scale */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 3rem;     /* 48px */
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

/* Monospace elements (numbers, prices, etc.) */
.mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* ===========================
   LAYOUT CONTAINERS
   =========================== */
.dashboard-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    min-height: 100vh;
}

/* Section spacing */
section {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-md);
}

/* ===========================
   CARD COMPONENT
   =========================== */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: border-color var(--transition-base);
}

.card:hover {
    border-color: var(--border-subtle);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.card-icon {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* ===========================
   BADGES & STATUS INDICATORS
   =========================== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ===========================
   BUTTONS
   =========================== */
button {
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

button:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

button:active {
    transform: scale(0.98);
}

button.active {
    background: var(--accent-primary);
    color: white;
}

/* ===========================
   UTILITY CLASSES
   =========================== */

/* Text colors */
.text-success {
    color: var(--color-success);
}

.text-danger {
    color: var(--color-danger);
}

.text-warning {
    color: var(--color-warning);
}

.text-info {
    color: var(--color-info);
}

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

/* Positive/Negative indicators */
.positive {
    color: var(--color-success);
}

.negative {
    color: var(--color-danger);
}

/* Display utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

/* Tablet */
@media (max-width: 1024px) {
    html {
        font-size: 15px;
    }
    
    .dashboard-container {
        padding: var(--spacing-md);
    }
    
    section {
        margin-bottom: var(--spacing-lg);
    }
}

/* Mobile */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .dashboard-container {
        padding: var(--spacing-sm);
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .dashboard-container {
        padding: var(--spacing-xs);
    }
}

/* ===========================
   SCROLLBAR STYLING
   =========================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

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

/* ===========================
   LOADING & ANIMATIONS
   =========================== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: slideIn 0.3s ease-out;
}
