/**
 * NBA Guess - Main Application Styles
 * Custom styles for dark theme and modern UI
 */

:root {
    /* Color System */
    --app-bg: #0f1419;
    --card-bg: #1a1f2e;
    --border-color: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;

    /* Feedback Colors */
    --correct: #10b981;
    --partial: #f59e0b;
    --incorrect: #6b7280;

    /* Accent Colors */
    --nba-blue: #1d428a;
    --nba-orange: #ff6b35;
    --primary: #3b82f6;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.5);
    --shadow-glow-amber: 0 0 20px rgba(245, 158, 11, 0.5);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
    background-color: var(--app-bg);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--app-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a5568;
}

/* Focus Styles */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Selection */
::selection {
    background-color: var(--primary);
    color: white;
}

/* Mobile Viewport Fix - Use dynamic viewport height for modals */
/* dvh = dynamic viewport height, accounts for mobile browser chrome (URL bar) */
@supports (height: 100dvh) {
    .modal-viewport-fix {
        max-height: 85dvh !important;
    }
}

/* Fallback using CSS custom property set by JavaScript */
@supports not (height: 100dvh) {
    .modal-viewport-fix {
        max-height: calc(var(--vh, 1vh) * 85) !important;
    }
}
