/* NO-CAP - Global Stylesheet */
/* ===================================
   🎨 CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   =================================== */

:root {
    /* Color Palette */
    --color-primary: #667eea;
    --color-primary-dark: #764ba2;
    --color-secondary: #4facfe;
    --color-secondary-dark: #00f2fe;

    --color-accent: #ff6b6b;
    --color-accent-dark: #ee5a52;

    --color-success: #4CAF50;
    --color-success-dark: #45a049;
    --color-warning: #FF9800;
    --color-warning-dark: #F57C00;
    --color-danger: #f44336;
    --color-danger-dark: #da190b;

    /* Glass Morphism */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-bg-hover: rgba(255, 255, 255, 0.2);
    --glass-bg-active: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: rgba(31, 38, 135, 0.37);

    /* White Overlays */
    --white-10: rgba(255, 255, 255, 0.1);
    --white-20: rgba(255, 255, 255, 0.2);
    --white-30: rgba(255, 255, 255, 0.3);
    --white-50: rgba(255, 255, 255, 0.5);
    --white-60: rgba(255, 255, 255, 0.6);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-90: rgba(255, 255, 255, 0.9);

    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
    --spacing-2xl: 40px;

    /* Border Radius */
    --radius-sm: 5px;
    --radius-md: 10px;
    --radius-lg: 15px;
    --radius-xl: 20px;
    --radius-round: 50%;

    /* Typography */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.9rem;
    --font-size-sm: 1rem;
    --font-size-md: 1.1rem;
    --font-size-lg: 1.2rem;
    --font-size-xl: 1.4rem;
    --font-size-2xl: 1.8rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: clamp(2.5rem, 8vw, 4rem);

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 600;
    --font-weight-bold: 700;
    --font-weight-black: 800;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px var(--glass-shadow);
    --shadow-xl: 0 12px 40px rgba(31, 38, 135, 0.5);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-Index Scale */
    --z-background: -1;
    --z-base: 1;
    --z-dropdown: 10;
    --z-sticky: 100;
    --z-fixed: 1000;
    --z-modal: 2000;
    --z-notification: 9999;

    /* Blur Effects */
    --blur-sm: 10px;
    --blur-md: 15px;
    --blur-lg: 20px;
}

/* ===================================
   🎯 BASE RESET & GLOBAL STYLES
   =================================== */

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: white;
}

/* ===================================
   🌌 ANIMATED BACKGROUND
   =================================== */

.background-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: var(--z-background);
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--white-10);
    border-radius: var(--radius-round);
    will-change: transform, opacity;
}

/* Optional: Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .particle {
        animation: none !important;
        opacity: 0.2;
    }
}

/* Keep animations for users who don't prefer reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .particle {
        animation: float 6s ease-in-out infinite;
    }

    .particle:nth-child(1) {
        width: 80px;
        height: 80px;
        left: 10%;
        animation-delay: 0s;
    }
    .particle:nth-child(2) {
        width: 120px;
        height: 120px;
        left: 70%;
        animation-delay: 1s;
    }
    .particle:nth-child(3) {
        width: 60px;
        height: 60px;
        left: 30%;
        animation-delay: 2s;
    }
    .particle:nth-child(4) {
        width: 100px;
        height: 100px;
        left: 80%;
        animation-delay: 3s;
    }
    .particle:nth-child(5) {
        width: 40px;
        height: 40px;
        left: 50%;
        animation-delay: 4s;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(0px) rotate(180deg);
        opacity: 0.3;
    }
    75% {
        transform: translateY(-10px) rotate(270deg);
        opacity: 0.6;
    }
}

/* ===================================
   📦 CONTAINER SYSTEM
   =================================== */

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: var(--z-base);
}

.screen {
    display: none;
    min-height: 100vh;
    padding: var(--spacing-lg);
}

.screen.active {
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.6s ease-out;
}

/* Disable animation for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .screen.active {
        animation: none;
    }
}

/* ===================================
   🎴 CARD COMPONENTS
   =================================== */

/* Base Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Disable hover transform for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .glass-card:hover {
        transform: none;
    }
}

/* Category Card */
.category-card {
    background: var(--white-10);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-radius: var(--radius-lg);
    padding: 25px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    position: relative;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--white-50);
}

.category-card.selected {
    border-color: var(--color-secondary);
    background: rgba(79, 172, 254, 0.2);
    transform: scale(1.02);
}

.category-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.category-emoji {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    display: block;
}

.category-title {
    color: white;
    font-size: 1.3rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: 8px;
}

.category-subtitle {
    color: var(--white-70);
    font-size: var(--font-size-xs);
    line-height: 1.4;
}

/* FSK & Premium Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: var(--spacing-sm);
}

.badge-fsk0 {
    background: var(--color-success);
    color: white;
}

.badge-fsk16 {
    background: var(--color-warning);
    color: white;
}

.badge-fsk18 {
    background: var(--color-danger);
    color: white;
}

.badge-premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.badge-locked {
    background: var(--white-20);
    color: var(--white-70);
}

/* Difficulty Card */
.difficulty-card {
    background: var(--white-10);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
}

.difficulty-card.easy {
    border-left: 4px solid var(--color-success);
}

.difficulty-card.medium {
    border-left: 4px solid var(--color-warning);
}

.difficulty-card.hard {
    border-left: 4px solid var(--color-danger);
}

.difficulty-card.selected {
    transform: scale(1.05);
    background: var(--white-20);
}

.difficulty-card:hover {
    background: var(--white-20);
}

.difficulty-title {
    color: white;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-xs);
}

.difficulty-description {
    color: var(--white-70);
    font-size: var(--font-size-xs);
    margin-top: var(--spacing-xs);
}

.sips-indicator {
    font-size: 2rem;
    margin: var(--spacing-sm) 0;
}

/* ===================================
   🔘 BUTTON COMPONENTS
   =================================== */

/* Base Button */
.btn {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(238, 90, 82, 0.4);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: inherit;
    line-height: 1;
}

/* Shine Effect on Hover */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--white-20), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 82, 0.6);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: 3px solid var(--white-50);
    outline-offset: 2px;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

/* Button Variants */
.btn-secondary {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white-50);
    color: white;
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--white-10);
    border-color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--color-success), var(--color-success-dark));
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger), var(--color-danger-dark));
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.6);
}

.btn-warning {
    background: linear-gradient(135deg, var(--color-warning), var(--color-warning-dark));
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.btn-warning:hover {
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.6);
}

/* Button Sizes */
.btn-sm {
    padding: 12px 24px;
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: 22px 40px;
    font-size: 1.2rem;
}

/* Icon Buttons */
.btn-icon {
    padding: 12px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Disable hover/transform for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .btn:hover,
    .btn-secondary:hover,
    .btn-success:hover,
    .btn-danger:hover,
    .btn-warning:hover {
        transform: none;
    }

    .btn::before {
        transition: none;
    }
}

/* ===================================
   📝 TYPOGRAPHY
   =================================== */

.logo {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-black);
    color: white;
    text-align: center;
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

@media (prefers-reduced-motion: no-preference) {
    .logo {
        animation: logoGlow 2s ease-in-out infinite alternate;
    }
}

@keyframes logoGlow {
    from { text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3); }
    to { text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.4); }
}

.tagline {
    color: var(--white-90);
    text-align: center;
    font-size: var(--font-size-md);
    margin-bottom: var(--spacing-2xl);
    font-weight: var(--font-weight-light);
}

.screen-title {
    color: white;
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

.page-title {
    color: white;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-medium);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

.section-title {
    color: white;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-md);
}

/* ===================================
   📐 LAYOUT COMPONENTS
   =================================== */

.main-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    padding: var(--spacing-lg);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    width: 100%;
    max-width: 300px;
    margin-bottom: var(--spacing-2xl);
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

/* Navigation Buttons Container */
.nav-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    width: 100%;
}

.nav-buttons .btn {
    flex: 1;
}

/* Back Button */
.back-button {
    position: fixed;
    top: var(--spacing-lg);
    left: var(--spacing-lg);
    background: var(--white-20);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
    transition: all var(--transition-base);
    z-index: var(--z-sticky);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}

.back-button:hover {
    background: var(--white-30);
    transform: translateX(-2px);
}

.back-button:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .back-button:hover {
        transform: none;
    }
}

/* ===================================
   🔗 FOOTER LINKS
   =================================== */

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--white-70);
    text-decoration: none;
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.footer-link:hover {
    color: white;
    background: var(--white-10);
}

.footer-link:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* ===================================
   📋 GRID LAYOUTS
   =================================== */

.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    width: 100%;
    margin: var(--spacing-xl) 0;
}

.difficulty-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    width: 100%;
    margin: var(--spacing-xl) 0;
}

/* ===================================
   📝 FORM ELEMENTS
   =================================== */

/* Player Input Section */
.player-input-section {
    width: 100%;
    margin: var(--spacing-lg) 0;
}

.player-input {
    width: 100%;
    padding: var(--spacing-md);
    border-radius: 12px;
    border: 2px solid var(--white-30);
    background: var(--white-10);
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
    color: white;
    font-size: var(--font-size-sm);
    font-family: inherit;
    margin-bottom: var(--spacing-md);
    transition: all var(--transition-base);
}

.player-input::placeholder {
    color: var(--white-60);
}

.player-input:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: rgba(255, 255, 255, 0.15);
}

.player-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Player List */
.player-list {
    list-style: none;
    margin: var(--spacing-md) 0;
}

.player-list-item {
    background: var(--white-10);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.add-player-btn {
    width: 100%;
    background: var(--white-20);
    color: white;
    border: 2px dashed var(--white-50);
    padding: var(--spacing-md);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    font-family: inherit;
}

.add-player-btn:hover {
    background: var(--white-30);
    border-style: solid;
}

.add-player-btn:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Checkbox & Radio Styles */
.checkbox-container,
.radio-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    cursor: pointer;
}

.checkbox-container input[type="checkbox"],
.radio-container input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label,
.radio-label {
    color: white;
    font-size: var(--font-size-sm);
    cursor: pointer;
}

/* ===================================
   🎮 GAME UI COMPONENTS
   =================================== */

.game-header {
    background: var(--white-10);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.current-player {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: var(--font-weight-medium);
}

.player-avatar {
    font-size: 1.8rem;
    padding: 8px;
    background: var(--white-20);
    border-radius: var(--radius-round);
}

.game-progress {
    color: var(--white-90);
    font-weight: var(--font-weight-medium);
}

/* Question Card */
.question-card {
    margin-bottom: var(--spacing-xl);
    text-align: center;
    animation: slideInUp 0.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .question-card {
        animation: none;
    }
}

.question-category {
    background: rgba(79, 172, 254, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    display: inline-block;
    margin-bottom: var(--spacing-lg);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-xs);
}

.question-text {
    color: white;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    margin: 0;
}

/* Voting Section */
.voting-section {
    margin: var(--spacing-xl) 0;
}

.vote-question {
    color: white;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.vote-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.vote-btn {
    padding: var(--spacing-md);
    border: 2px solid var(--white-30);
    background: var(--white-10);
    color: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    font-family: inherit;
}

.vote-btn.selected {
    border-color: var(--color-secondary);
    background: rgba(79, 172, 254, 0.3);
    transform: scale(1.05);
}

.vote-btn:hover {
    background: var(--white-20);
}

.vote-btn:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .vote-btn.selected {
        transform: none;
    }
}

/* Answer Buttons (Yes/No) */
.answer-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
}

/* ===================================
   📊 RESULTS COMPONENTS
   =================================== */

.results-section {
    margin-top: var(--spacing-xl);
}

.result-item {
    background: var(--white-10);
    padding: var(--spacing-md);
    border-radius: 12px;
    margin-bottom: var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.result-name {
    font-weight: var(--font-weight-medium);
}

.result-sips {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    padding: 5px 12px;
    border-radius: var(--radius-xl);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-xs);
}

.result-score {
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
}

/* Leaderboard */
.leaderboard {
    margin: var(--spacing-xl) 0;
}

.leaderboard-item {
    background: var(--white-10);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.leaderboard-rank {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    min-width: 40px;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-md);
}

.leaderboard-stats {
    font-size: var(--font-size-xs);
    color: var(--white-70);
    margin-top: 4px;
}

/* ===================================
   🔔 NOTIFICATIONS & MODALS
   =================================== */

/* Toast Notifications */
.notification {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    color: white;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    z-index: var(--z-notification);
    transform: translateX(calc(100% + var(--spacing-lg)));
    transition: transform var(--transition-base);
    max-width: 300px;
    box-shadow: var(--shadow-lg);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, var(--color-success), var(--color-success-dark));
}

.notification.error {
    background: linear-gradient(135deg, var(--color-danger), var(--color-danger-dark));
}

.notification.warning {
    background: linear-gradient(135deg, var(--color-warning), var(--color-warning-dark));
}

.notification.info {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
}

/* Modal Base */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: var(--z-modal);
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    color: #333;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    margin-bottom: var(--spacing-lg);
}

.modal-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: #333;
    margin-bottom: var(--spacing-sm);
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: var(--spacing-sm);
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    margin-bottom: var(--spacing-lg);
}

.modal-footer {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* Privacy Notice */
.privacy-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    padding: var(--spacing-lg);
    color: white;
    text-align: center;
    transform: translateY(100%);
    transition: transform var(--transition-base);
    z-index: var(--z-fixed);
}

.privacy-notice.show {
    transform: translateY(0);
}

.privacy-text {
    font-size: var(--font-size-xs);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

.privacy-text a {
    color: var(--color-secondary);
    text-decoration: none;
}

.privacy-text a:hover {
    text-decoration: underline;
}

.privacy-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.privacy-buttons .btn {
    padding: 12px 24px;
    font-size: var(--font-size-xs);
}

/* ===================================
   ⏳ LOADING STATES
   =================================== */

.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: var(--z-modal);
}

.loading.show {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--white-30);
    border-top: 3px solid white;
    border-radius: var(--radius-round);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
}

.loading-overlay.show {
    display: flex;
}

/* ===================================
   🎬 ANIMATIONS
   =================================== */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.5s ease-out;
}

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

/* Disable animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .slide-in-up,
    .slide-in-down,
    .scale-in {
        animation: none;
    }
}

/* ===================================
   ⚖️ LEGAL PAGES
   =================================== */

.legal-page {
    background: #f9f9f9;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 0;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    background: white;
    min-height: 100vh;
}

.legal-back-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    text-decoration: none;
    color: #555;
    font-weight: var(--font-weight-bold);
    padding: 6px 12px;
    border-radius: 6px;
    background: #e0e0e0;
    transition: background var(--transition-fast);
    margin-bottom: 16px;
    border: none;
    cursor: pointer;
}

.legal-back-button:hover {
    background: #ccc;
}

.legal-back-button:focus-visible {
    outline: 2px solid #666;
    outline-offset: 2px;
}

.legal-title {
    text-align: center;
    color: #2c3e50;
    font-size: 26px;
    margin: 20px 0 30px 0;
    font-weight: var(--font-weight-bold);
}

.legal-content p {
    line-height: 1.6;
    margin-bottom: 16px;
    color: #444;
}

.legal-content h2 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin: 25px 0 15px 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

.legal-content h3 {
    color: #34495e;
    font-size: 1.2rem;
    margin: 20px 0 10px 0;
}

.legal-content a {
    color: #3498db;
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.legal-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

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

/* Mobile Optimizations */
@media (max-width: 768px) {
    .screen {
        padding: var(--spacing-md);
    }

    .glass-card {
        padding: 25px 20px;
    }

    .logo {
        font-size: 3rem;
    }

    .category-grid,
    .difficulty-grid {
        gap: var(--spacing-md);
    }

    .nav-buttons {
        flex-direction: column;
    }

    .nav-buttons .btn {
        width: 100%;
    }

    .back-button {
        top: var(--spacing-md);
        left: var(--spacing-md);
        padding: 8px 12px;
        font-size: var(--font-size-xs);
    }

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

    .vote-buttons {
        grid-template-columns: repeat(3, 1fr);
    }

    .game-header {
        flex-direction: column;
        text-align: center;
    }

    .notification {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        left: var(--spacing-sm);
        max-width: none;
    }

    .modal {
        padding: var(--spacing-md);
    }

    .modal-content {
        padding: var(--spacing-lg);
    }

    .legal-container {
        padding: 16px;
    }

    .legal-title {
        font-size: 22px;
    }

    .legal-back-button {
        font-size: 14px;
        padding: 5px 10px;
    }
}

/* Tablet & Desktop */
@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .difficulty-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .nav-buttons {
        max-width: 400px;
        margin: var(--spacing-xl) auto 0;
    }

    .vote-buttons {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        max-width: 600px;
        margin: 0 auto var(--spacing-lg);
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* ===================================
   ♿ ACCESSIBILITY
   =================================== */

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: white;
    color: #333;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .glass-card,
    .category-card,
    .difficulty-card {
        border: 2px solid white;
    }

    .btn {
        border: 2px solid white;
    }
}

/* ===================================
   🖨️ PRINT STYLES
   =================================== */

@media print {
    .background-particles,
    .back-button,
    .footer-links,
    .btn,
    .notification,
    .modal,
    .loading {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .glass-card {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

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

/* Display */
.hidden { display: none !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }

/* Spacing */
.mt-sm { margin-top: var(--spacing-sm) !important; }
.mt-md { margin-top: var(--spacing-md) !important; }
.mt-lg { margin-top: var(--spacing-lg) !important; }
.mt-xl { margin-top: var(--spacing-xl) !important; }

.mb-sm { margin-bottom: var(--spacing-sm) !important; }
.mb-md { margin-bottom: var(--spacing-md) !important; }
.mb-lg { margin-bottom: var(--spacing-lg) !important; }
.mb-xl { margin-bottom: var(--spacing-xl) !important; }

.p-sm { padding: var(--spacing-sm) !important; }
.p-md { padding: var(--spacing-md) !important; }
.p-lg { padding: var(--spacing-lg) !important; }
.p-xl { padding: var(--spacing-xl) !important; }

/* Text Alignment */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* Colors */
.text-white { color: white !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }

/* Flex Utilities */
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.gap-sm { gap: var(--spacing-sm) !important; }
.gap-md { gap: var(--spacing-md) !important; }
.gap-lg { gap: var(--spacing-lg) !important; }

/* Width */
.w-full { width: 100% !important; }
.w-auto { width: auto !important; }

/* Cursor */
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* Opacity */
.opacity-50 { opacity: 0.5 !important; }
.opacity-70 { opacity: 0.7 !important; }

/* End of styles.css */