/* =====================================================
   SCREW SORT PUZZLE - MAIN CSS
   Design System Variables, Reset, Typography
   ===================================================== */

:root {
    /* ===== SCREW COLORS ===== */
    --color-screw-red: #E53935;
    --color-screw-blue: #1E88E5;
    --color-screw-green: #43A047;
    --color-screw-yellow: #FDD835;
    --color-screw-purple: #8E24AA;
    --color-screw-orange: #FB8C00;
    --color-screw-pink: #D81B60;
    --color-screw-cyan: #00ACC1;

    /* ===== UI COLORS ===== */
    --color-bg-primary: #1a1a2e;
    --color-bg-secondary: #16213e;
    --color-bg-tertiary: #0f3460;
    --color-bg-card: rgba(255, 255, 255, 0.05);
    --color-bg-glass: rgba(255, 255, 255, 0.1);
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #b8b8b8;
    --color-text-muted: #6c6c6c;
    
    --color-accent-primary: #e94560;
    --color-accent-secondary: #0f3460;
    --color-accent-success: #4ade80;
    --color-accent-warning: #fbbf24;
    --color-accent-error: #ef4444;
    
    /* ===== GAME SPECIFIC ===== */
    --color-plate: #4a5568;
    --color-plate-hole: #2d3748;
    --color-container-wood: #8B4513;
    --color-container-wood-light: #A0522D;
    --color-container-wild: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff);
    
    /* ===== SHADOWS ===== */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(233, 69, 96, 0.5);
    --shadow-screw: 0 4px 8px rgba(0, 0, 0, 0.6);
    
    /* ===== SPACING ===== */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* ===== TYPOGRAPHY ===== */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Fredoka One', cursive;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    
    /* ===== BORDERS ===== */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* ===== TRANSITIONS ===== */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* ===== Z-INDEX ===== */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-overlay: 400;
    --z-toast: 500;
    --z-tutorial: 600;
}

/* ===== CSS RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

.text-gradient {
    background: linear-gradient(135deg, var(--color-accent-primary), var(--color-screw-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.text-center { text-align: center; }
.text-muted { color: var(--color-text-secondary); }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-primary);
}

/* ===== SELECTION ===== */
::selection {
    background: var(--color-accent-primary);
    color: white;
}

/* ===== FOCUS STYLES ===== */
:focus-visible {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 2px;
}

/* ===== GOOGLE FONTS IMPORT ===== */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Poppins:wght@300;400;500;600;700&display=swap');
