/* TurnajSystem — Hlavní styly (design tokens + index).
   Po refaktoru obsahuje :root tokens + dark mode + @import index.
   Komponenty viz base.css, components.css, responsive.css, accessibility.css, themes/.

   POZOR: @import MUSÍ být na začátku CSS souboru (CSS spec), jinak je browser
   ignoruje. Tokeny v :root jsou globální a dostupné importovaným stylesheets
   bez ohledu na jejich umístění zde. */

@import url('./base.css');
@import url('./components.css');
@import url('./responsive.css');
@import url('./accessibility.css');
@import url('./themes/colorblind.css');

:root {
    --primary: #dc143c;
    --primary-dark: #b01030;
    --secondary: #06cef9;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;

    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;

    --radius: 8px;

    /* Light mode (default pro zpětnou kompatibilitu) */
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #333333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --table-stripe: #f8f9fa;
    --input-bg: #ffffff;
    --modal-bg: #ffffff;
    --hover-bg: #f0f0f0;

    /* Aliasy pro zpětnou kompatibilitu */
    --dark: #343a40;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --border: #dee2e6;

    /* === Design System Tokeny === */

    /* Glow & Gradient */
    --primary-glow: rgba(220, 20, 60, 0.15);
    --secondary-glow: rgba(6, 206, 249, 0.15);
    --gradient-primary: linear-gradient(135deg, #dc143c, #ff2d55);
    --gradient-bg: linear-gradient(135deg, #f0f2f5 0%, #e8edf2 50%, #dce4ed 100%);
    --gradient-card: linear-gradient(135deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));

    /* Spacing scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 150ms var(--ease-out);
    --transition-normal: 250ms var(--ease-out);
    --transition-slow: 400ms var(--ease-out);

    /* Typography scale */
    --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;
    --text-5xl: 3.5rem;

    /* Shadows - layered */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* Glass */
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-blur: blur(20px);

    /* Radius scale */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Medal colors (rankings, achievements) */
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --gold-warm: #d4a520;

    /* Alpha variants (často reusable v badges, hovers) */
    --primary-bg-soft: rgba(220, 20, 60, 0.1);
    --primary-bg-medium: rgba(220, 20, 60, 0.15);
    --primary-bg-strong: rgba(220, 20, 60, 0.3);
    --secondary-bg-soft: rgba(6, 206, 249, 0.1);
    --secondary-bg-medium: rgba(6, 206, 249, 0.15);
    --secondary-bg-strong: rgba(6, 206, 249, 0.25);
    --success-bg-soft: rgba(40, 167, 69, 0.15);
    --success-bg-medium: rgba(40, 167, 69, 0.2);
    --success-bg-strong: rgba(40, 167, 69, 0.3);
    --warning-bg-soft: rgba(255, 193, 7, 0.13);
    --danger-bg-soft: rgba(220, 53, 69, 0.1);
    --danger-bg-medium: rgba(220, 53, 69, 0.2);
    --danger-bg-strong: rgba(220, 53, 69, 0.25);
    --gold-bg-soft: rgba(255, 215, 0, 0.15);
    --silver-bg-soft: rgba(192, 192, 192, 0.15);
    --bronze-bg-soft: rgba(205, 127, 50, 0.15);

    /* Status text colors (success/warning/danger semantic aliases) */
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-danger-light: #ff6b7a;
    --color-warning: #ffc107;

    /* Text na barevném pozadí (buttons, badges, gradient headers) — vždy bílá.
       NEPOUŽÍVAT --white — v dark mode je to rgba(255,255,255,0.06) pro glass effect! */
    --text-on-color: #ffffff;
}

/* Dark mode */
[data-theme="dark"] {
    --bg: #1a1a2e;
    --card-bg: rgba(255, 255, 255, 0.06);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.4);
    --table-stripe: rgba(255, 255, 255, 0.03);
    --input-bg: rgba(255, 255, 255, 0.08);
    --modal-bg: #1e1e3a;
    --hover-bg: rgba(255, 255, 255, 0.08);

    --white: rgba(255, 255, 255, 0.06);
    --light: #1a1a2e;
    --dark: #ffffff;
    --gray: rgba(255, 255, 255, 0.5);
    --border: rgba(255, 255, 255, 0.1);

    --gradient-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);
}
