@charset "UTF-8";

:root {
    /* --- COLOR PALETTE --- */
            --primary: #6366F1;
            --primary-dark: #4F46E5;
            --primary-light: #818CF8;
            
            --accent: #8B5CF6;
            
            --violet: #7C3AED;
            --violet-shadow: #6D28D9;
            
            /* --- SURFACE COLORS --- */
            --glass-bg: rgba(255, 255, 255, 0.15);
            --glass-border: rgba(255, 255, 255, 0.2);
            --surface: rgba(255, 255, 255, 0.25);
            --surface-hover: rgba(255, 255, 255, 0.35);
            --surface-active: rgba(255, 255, 255, 0.45);
            
            /* --- TYPOGRAPHY --- */
            --text-main: #0F172A;
            --text-muted: #475569;
            --font-main: 'Nunito', sans-serif;
            
            /* --- STATUS --- */
            --success: #10B981;
            --success-dark: #059669;
            --success-shadow: #047857;
            
            --danger: #EF4444;
            --danger-dark: #DC2626;
            --danger-shadow: #B91C1C;
            
            --info: #3B82F6;
            --info-shadow: #2563EB;
            
            --warning: #FBBF24;
            --warning-dark: #F59E0B;
            --warning-shadow: #D97706;

            /* --- DIFFICULTY COLORS --- */
            --diff-easy: #14B8A6;
            --diff-easy-rgb: 20, 184, 166;
            --diff-medium: #F59E0B;
            --diff-medium-rgb: 245, 158, 11;
            --diff-hard: #F97316;
            --diff-hard-rgb: 249, 115, 22;
            --diff-extreme: #EC4899;
            --diff-extreme-rgb: 236, 72, 153;

            /* --- SHAPES & SPACING --- */
            --radius-card: 26px;
            --radius-btn: 20px;
            --radius-input: 18px;
            --radius-tag: 12px;
            
            --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255,255,255,0.12) inset, 0 1px 0 rgba(255,255,255,0.2) inset;
            --shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255,255,255,0.15) inset, 0 1px 0 rgba(255,255,255,0.25) inset;
            --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255,255,255,0.08) inset;
            --shadow-btn: 0 4px 20px rgba(99, 102, 241, 0.25), 0 0 0 1px rgba(255,255,255,0.12) inset, 0 1px 0 rgba(255,255,255,0.15) inset;
            --shadow-btn-hover: 0 8px 28px rgba(99, 102, 241, 0.35), 0 0 0 1px rgba(255,255,255,0.18) inset, 0 1px 0 rgba(255,255,255,0.25) inset;
            --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.25);
            --shadow-overlay: 0 25px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.1) inset; 
        }

        * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; }

        /* Custom Scrollbar */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { 
            background: rgba(255,255,255,0.2); 
            border-radius: 10px; 
            transition: background 0.3s ease;
        }
        ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

        body {
            font-family: var(--font-main);
            background: linear-gradient(135deg, #1a2332 0%, #263347 25%, #334766 50%, #4a5d7a 75%, #6b7d99 100%);
            height: 100dvh;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            color: var(--text-main);
        }
        html { scroll-behavior: smooth; }
        
        /* Better touch interaction */
        @media (hover: none) {
            .btn:active { transform: scale(0.97); }
            .card-choice:active { transform: scale(0.98); }
            .chip:active { transform: scale(0.97); }
            .game-term:active:not(.locked) { transform: scale(0.98); }
        }
        
        /* Reduce motion for users who prefer it */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }
        
        /* === MOBILE OPTIMIERUNGEN === */
        @media (max-width: 400px) {
            /* Kleinere Schriften auf sehr kleinen Screens */
            h1 { font-size: 2.6rem !important; }
            h2 { font-size: 1.4rem !important; }
            .subtitle { font-size: 0.9rem !important; }
            
            /* Reduzierte Paddings */
            .screen { padding: 16px !important; }
            .settings-card { padding: 18px !important; }
            .btn:not(.btn-timer-container) { padding: 14px 20px !important; font-size: 0.95rem !important; }
            
            /* Chip-Grid: 1 Spalte auf sehr kleinen Screens */
            .chip-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
            .chip { height: 46px !important; font-size: 0.85rem !important; }
        }
        
        @media (max-width: 340px) {
            h1 { font-size: 2.2rem !important; }
            .pass-guesser-name, .pass-reader-name { font-size: 1.4rem !important; }
            .pass-guesser-avatar, .pass-reader-avatar { font-size: 3rem !important; }
        }

        /* Noise Texture - deaktiviert wegen Performance */
        /* body::after {
            content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background-image: url("data:image/svg+xml,...");
            pointer-events: none; z-index: 1; opacity: 0.4;
        } */
        
        /* Background Shapes - statisch (Animation deaktiviert wegen Flicker) */
        .bg-shape {
            position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.15; z-index: 0;
            pointer-events: none;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }
        .shape-1 { top: -10%; left: -10%; width: 60vh; height: 60vh; background: #6366F1; }
        .shape-2 { bottom: -10%; right: -10%; width: 70vh; height: 70vh; background: #8B5CF6; }
        .shape-3 { top: 40%; left: 40%; width: 50vh; height: 50vh; background: #3B82F6; }

        /* --- APP CONTAINER --- */
        .app-container {
            width: 100%; max-width: 480px; height: 100%; position: relative;
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            box-shadow: 0 30px 80px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.15), inset 0 1px 0 rgba(255,255,255,0.25);
            overflow: hidden; z-index: 10; display: flex; flex-direction: column;
            transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            transform: translateZ(0);
        }
        
        .app-container.correction-active {
            box-shadow: 0 0 0 4px var(--info), 0 30px 80px rgba(0,0,0,0.2);
        }

        @media (min-width: 500px) {
            .app-container { height: 92vh; max-height: 900px; border-radius: 44px; }
        }

        /* --- SCREEN TRANSITIONS --- */
        .screen {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            display: flex; flex-direction: column; padding: 24px;
            background: rgba(255, 255, 255, 0.03);
            /* backdrop-filter entfernt wegen Mobile Chrome Flicker-Bug */
            transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            opacity: 0; transform: scale(0.98) translateY(8px);
            pointer-events: none; overflow-y: auto; overflow-x: hidden;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }

        .screen.active {
            opacity: 1; transform: scale(1) translateY(0); pointer-events: all; z-index: 10;
        }

        #screen-game { overflow: hidden; }

        /* --- TOAST NOTIFICATIONS --- */
        #toast-container {
            position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
            z-index: 2000; display: flex; flex-direction: column; align-items: center; gap: 10px;
            pointer-events: none; width: 90%;
        }

        .toast {
            background: rgba(15, 23, 42, 0.95); color: white; padding: 14px 24px;
            border-radius: 16px; font-size: 0.95rem; font-weight: 600;
            box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.08) inset;
            opacity: 0; transform: translateY(20px) scale(0.95);
            transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
            display: flex; align-items: center; gap: 12px; 
            border: 1px solid rgba(255,255,255,0.1);
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }

        .toast.visible { opacity: 1; transform: translateY(0) scale(1); }
        .toast i { transition: transform 0.2s ease; }
        .toast.visible i { animation: iconPulse 0.6s ease 0.2s; }
        @keyframes iconPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.15); }
        }
        .toast i { font-size: 1.2rem; color: rgba(255,255,255,0.95); filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
        .toast-success { background: rgba(16, 185, 129, 0.85); }
        .toast-success i { color: white; }
        .toast-error { background: rgba(239, 68, 68, 0.85); }
        .toast-error i { color: white; }
        .toast-warning { background: rgba(251, 191, 36, 0.85); color: #1E293B; }
        .toast-warning i { color: #1E293B; }

        /* --- TYPOGRAPHY --- */
        h1 { 
            font-size: 3.2rem; font-weight: 800; line-height: 1.1; 
            background: linear-gradient(135deg, #FFFFFF 0%, rgba(255,255,255,0.85) 100%);
            -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
            letter-spacing: -1.5px; margin-bottom: 10px; 
            filter: drop-shadow(0 2px 10px rgba(255,255,255,0.1));
        }
        h2 { 
            font-size: 1.7rem; font-weight: 700; margin-bottom: 8px; color: rgba(255,255,255,0.95); 
            letter-spacing: -0.5px; line-height: 1.3; display: flex; align-items: center; gap: 10px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.15);
        }
        .subtitle { 
            color: rgba(255,255,255,0.7); font-weight: 500; font-size: 1rem; margin-bottom: 24px; 
            line-height: 1.6; text-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }
        
        .nav-header { display: flex; align-items: center; margin-bottom: 12px; position: relative; }
        .nav-back {
            background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255,255,255,0.15); width: 46px; height: 46px;
            border-radius: 16px; display: flex; align-items: center; justify-content: center;
            font-size: 1.2rem; color: rgba(255,255,255,0.9); cursor: pointer; margin-right: 16px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            box-shadow: var(--shadow-sm);
        }
        .nav-back:hover { 
            background: rgba(255, 255, 255, 0.15); 
            border-color: rgba(255,255,255,0.25);
            transform: translateX(-3px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.12);
        }
        .nav-back:active { transform: translateX(-3px) scale(0.95); transition-duration: 0.1s; }
        .nav-back:focus-visible { outline: 2px solid rgba(255,255,255,0.5); outline-offset: 3px; }

        /* Stepper */
        .setup-progress { display: flex; gap: 6px; margin-bottom: 24px; justify-content: center; }
        .step-dot { 
            width: 10px; height: 10px; border-radius: 50%; 
            background: rgba(255,255,255,0.25); 
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border: 2px solid transparent;
        }
        .step-dot.active { 
            background: var(--primary); 
            transform: scale(1.3); 
            box-shadow: 0 0 12px rgba(99, 102, 241, 0.6), 0 0 0 3px rgba(99, 102, 241, 0.2); 
            animation: dotPulse 2s ease-in-out infinite; 
        }
        .step-dot.completed { 
            background: var(--success); 
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); 
            border-color: rgba(16, 185, 129, 0.3);
        }
        @keyframes dotPulse {
            0%, 100% { box-shadow: 0 0 12px rgba(99, 102, 241, 0.6), 0 0 0 3px rgba(99, 102, 241, 0.2); }
            50% { box-shadow: 0 0 18px rgba(99, 102, 241, 0.8), 0 0 0 5px rgba(99, 102, 241, 0.15); }
        }


        /* --- BUTTONS --- */
        .btn {
            width: 100%; padding: 17px 24px; border-radius: var(--radius-btn);
            font-size: 1.05rem; font-weight: 700; border: none; cursor: pointer;
            display: flex; align-items: center; justify-content: center; gap: 10px;
            position: relative; transform: scale(1);
            transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            margin-bottom: 12px; letter-spacing: 0.3px; overflow: hidden;
            box-shadow: var(--shadow-btn);
        }
        .btn::before {
            content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .btn:hover::before { left: 100%; }
        .btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-btn-hover); }
        .btn:active { transform: translateY(-1px) scale(0.98); transition-duration: 0.1s; }
        .btn:focus-visible { outline: 2px solid rgba(255,255,255,0.5); outline-offset: 3px; }
        .btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; filter: grayscale(0.6); pointer-events: none; }

        /* Variants */
        .btn-primary { 
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white; 
            box-shadow: var(--shadow-btn);
            text-shadow: 0 1px 2px rgba(0,0,0,0.15);
        }
        .btn-primary:hover {
            background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
            box-shadow: var(--shadow-btn-hover), var(--shadow-glow);
        }
        .btn-secondary { 
            background: rgba(255, 255, 255, 0.08); 
            color: rgba(255,255,255,0.9); 
            border: 1px solid rgba(255,255,255,0.15);
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            box-shadow: var(--shadow-sm);
        }
        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.12);
            border-color: rgba(255,255,255,0.25);
            color: white;
            box-shadow: 0 6px 20px rgba(0,0,0,0.12);
        }
        .btn-danger { 
            background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%); 
            color: white; 
            box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25);
            text-shadow: 0 1px 2px rgba(0,0,0,0.15);
        }
        .btn-danger:hover {
            box-shadow: 0 8px 28px rgba(239, 68, 68, 0.35), 0 0 20px rgba(239, 68, 68, 0.2);
        }
        .btn-info { 
            background: linear-gradient(135deg, var(--info) 0%, var(--info-shadow) 100%); 
            color: white; 
            box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
            text-shadow: 0 1px 2px rgba(0,0,0,0.15);
        }
        .btn-info:hover {
            box-shadow: 0 8px 28px rgba(59, 130, 246, 0.35), 0 0 20px rgba(59, 130, 246, 0.2);
        }

        /* Close Button */
        .btn-close-game {
            position: absolute; top: 24px; right: 24px; width: 46px; height: 46px;
            border-radius: 16px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255,255,255,0.15);
            color: rgba(255,255,255,0.7); font-size: 1.3rem;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 20;
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            box-shadow: var(--shadow-sm);
        }
        .btn-close-game:hover { 
            background: rgba(239, 68, 68, 0.2); 
            color: white; 
            transform: scale(1.08) rotate(90deg); 
            border-color: rgba(239, 68, 68, 0.4);
            box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
        }
        .btn-close-game:active { transform: scale(1.05) rotate(90deg); transition-duration: 0.1s; }
        .btn-close-game:focus-visible { outline: 2px solid rgba(239, 68, 68, 0.6); outline-offset: 3px; }

        /* Timer Button */
        .btn-timer-container { background: rgba(248, 113, 113, 0.12); color: white; padding: 0; overflow: hidden; border: 1px solid rgba(248, 113, 113, 0.25); }
        .btn-timer-bar { position: absolute; top: 0; left: 0; bottom: 0; width: 100%; background: linear-gradient(135deg, #F87171 0%, #EF4444 100%); z-index: 1; transition: width 1s linear; transform-origin: left; }
        .btn-timer-bar.critical { background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%); animation: pulseRed 0.5s infinite; }
        .btn-timer-container.critical { border-color: rgba(239, 68, 68, 0.4); animation: shakeSlight 0.3s infinite; }
        @keyframes shakeSlight { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
        .btn-timer-content { position: relative; z-index: 2; width: 100%; height: 100%; padding: 18px; display: flex; justify-content: center; align-items: center; gap: 10px; text-shadow: 0 1px 2px rgba(0,0,0,0.15); font-weight: 800; }
        @keyframes pulseRed { 0% { background: var(--danger); } 50% { background: var(--danger-dark); } 100% { background: var(--danger); } }
        .btn-primary.anim-pulse { animation: pulseSoft 2s infinite; }
        @keyframes pulseSoft { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }

        /* --- BOTTOM BAR --- */
        .bottom-bar {
            margin-top: auto; padding-top: 20px;
            background: transparent;
            z-index: 20; flex-shrink: 0;
        }

        /* --- INPUTS --- */
        .input-group { margin-bottom: 14px; animation: slideUp 0.3s ease-out backwards; position: relative; }
        .player-row {
            display: flex; align-items: center; background: rgba(255, 255, 255, 0.08); padding: 10px 14px;
            border-radius: var(--radius-input); border: 1px solid rgba(255,255,255,0.12);
            box-shadow: var(--shadow-sm);
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .player-row:focus-within { 
            border-color: var(--primary); 
            transform: translateY(-3px); 
            background: rgba(255, 255, 255, 0.12);
            box-shadow: 0 8px 28px rgba(99, 102, 241, 0.2), 0 0 0 3px rgba(99, 102, 241, 0.12);
        }
        .player-row.input-error { border-color: var(--danger); animation: shake 0.4s ease-in-out; }
        @keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

        .player-num { 
            font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.75); 
            margin-right: 12px; background: rgba(255, 255, 255, 0.15); padding: 2px 8px; 
            border-radius: 10px; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
            text-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }
        .avatar {
            width: 50px; height: 50px; background: rgba(255, 255, 255, 0.1); border-radius: 16px;
            display: flex; align-items: center; justify-content: center; font-size: 1.9rem;
            flex-shrink: 0; margin-right: 14px; cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; 
            border: 2px solid rgba(255,255,255,0.15);
            backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
            box-shadow: var(--shadow-sm);
        }
        .avatar:hover { 
            background: rgba(99, 102, 241, 0.2); 
            border-color: var(--primary);
            transform: scale(1.08) translateY(-2px);
            box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25), 0 0 15px rgba(99, 102, 241, 0.15);
        }
        .avatar:focus-visible { outline: 2px solid rgba(99, 102, 241, 0.6); outline-offset: 3px; }
        .avatar.anim-bounce { animation: bounceKey 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        @keyframes bounceKey { 
            0% { transform: scale(1) rotate(0deg); } 
            50% { transform: scale(1.15) rotate(5deg); } 
            100% { transform: scale(1) rotate(0deg); } 
        }
        
        .avatar::after {
            content: '✎'; position: absolute; bottom: -4px; right: -4px;
            background: var(--primary); color: #78350F; font-size: 0.7rem; padding: 3px 5px; border-radius: 6px;
            opacity: 1; transform: scale(1); box-shadow: 0 2px 4px rgba(0,0,0,0.15); font-weight: 700;
        }
        input[type="text"] {
            flex: 1; border: none; outline: none; font-size: 1.1rem; font-family: var(--font-main); 
            font-weight: 600; color: rgba(255,255,255,0.98); background: transparent; padding: 8px 0;
            text-shadow: 0 1px 2px rgba(0,0,0,0.1);
            line-height: 1.5;
            transition: color 0.2s ease;
        }
        input[type="text"]:focus-visible { outline: none; }
        input[type="text"]::placeholder { 
            color: rgba(255,255,255,0.6); 
            text-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }
        input[type="text"]:focus {
            text-shadow: 0 1px 3px rgba(0,0,0,0.15);
        }
        .btn-icon-small {
            width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
            border: none; background: rgba(239, 68, 68, 0.2); color: rgba(255,255,255,0.9); border-radius: 12px; cursor: pointer; font-size: 1.2rem; transition: all 0.2s;
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(239, 68, 68, 0.3);
        }
        .btn-icon-small:hover { background: rgba(239, 68, 68, 0.3); transform: scale(1.05); }
        .btn-icon-small:focus-visible { outline: 2px solid rgba(239, 68, 68, 0.5); outline-offset: 2px; }

        .btn-add-player { 
            border: 2px dashed rgba(255,255,255,0.2); background: rgba(255,255,255,0.03); 
            color: rgba(255,255,255,0.8); box-shadow: none; border-radius: var(--radius-card);
            text-shadow: 0 1px 2px rgba(0,0,0,0.1);
            transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .btn-add-player:hover { 
            border-color: var(--primary); 
            border-style: solid;
            color: white; 
            background: rgba(99, 102, 241, 0.12); 
            transform: translateY(-3px); 
            box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
        }
        .btn-add-player:active { transform: scale(0.98); transition-duration: 0.1s; }
        .btn-add-player:focus-visible { outline: 2px solid rgba(99, 102, 241, 0.5); outline-offset: 3px; }

        /* --- SETTINGS --- */
        .settings-card {
            background: rgba(255, 255, 255, 0.06); border-radius: var(--radius-card); padding: 24px; margin-bottom: 18px;
            box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 12px; 
            border: 1px solid rgba(255,255,255,0.1);
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            animation: cardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
        }
        .settings-card:hover {
            background: rgba(255, 255, 255, 0.09);
            border-color: rgba(255,255,255,0.15);
            box-shadow: var(--shadow-card-hover);
            transform: translateY(-2px);
        }
        @keyframes cardFadeIn {
            0% { opacity: 0; transform: translateY(12px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        .setting-header { 
            display: flex; justify-content: space-between; align-items: center; font-weight: 700; 
            font-size: 1.1rem; color: rgba(255,255,255,0.98); 
            text-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }
        .setting-meta {
            font-size: 0.95rem; color: rgba(255,255,255,0.85); background: rgba(255, 255, 255, 0.1); 
            font-weight: 500; padding: 14px 18px; border-radius: var(--radius-tag); 
            line-height: 1.5; display: flex; align-items: center; gap: 10px; 
            border: 1px solid rgba(255,255,255,0.15);
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
            text-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }
        .setting-meta i { color: rgba(255,255,255,0.9); font-size: 1.2rem; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
        
        input[type=range] {
            width: 100%; height: 10px; background: linear-gradient(to right, #818CF8 0%, #818CF8 var(--val), rgba(255,255,255,0.15) var(--val), rgba(255,255,255,0.15) 100%);
            border-radius: 10px; outline: none; -webkit-appearance: none; appearance: none; margin: 16px 0 8px 0; 
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.2);
        }
        input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none; appearance: none; width: 28px; height: 28px; 
            background: rgba(255,255,255,0.98); border: 3px solid #818CF8; border-radius: 50%; 
            cursor: grab; box-shadow: 0 4px 12px rgba(129, 140, 248, 0.4), 0 0 0 1px rgba(255,255,255,0.3) inset, 0 0 15px rgba(129, 140, 248, 0.3); 
            transition: transform 0.1s, border-color 0.2s;
        }
        input[type=range]::-webkit-slider-thumb:hover { 
            border-color: #A5B4FC; 
            transform: scale(1.1); 
            box-shadow: 0 6px 16px rgba(129, 140, 248, 0.5), 0 0 0 1px rgba(255,255,255,0.4) inset, 0 0 20px rgba(129, 140, 248, 0.4); 
        }
        input[type=range]::-webkit-slider-thumb:active { 
            cursor: grabbing; 
            border-color: #6366F1; 
        }
        input[type=range]:focus-visible { outline: 2px solid rgba(129, 140, 248, 0.5); outline-offset: 4px; border-radius: 10px; }

        /* --- CHIPS --- */
        .chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
        .chip {
            padding: 0 16px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 16px;
            text-align: left; font-weight: 600; font-size: 0.95rem; color: rgba(255,255,255,0.92); cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; display: flex; align-items: center; height: 52px; z-index: 1;
            backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(255,255,255,0.1);
            text-shadow: 0 1px 2px rgba(0,0,0,0.1);
            line-height: 1.4;
        }
        .chip span:not(.chip-bg-icon) { position: relative; z-index: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .chip-bg-icon {
            position: absolute; right: 8px; top: 50%; transform: translateY(-50%) rotate(0deg);
            font-size: 1.8rem; opacity: 0.1; pointer-events: none; z-index: 0; transition: all 0.3s;
        }
        .chip:hover { 
            border-color: rgba(255,255,255,0.3); 
            transform: translateY(-3px) scale(1.02); 
            background: rgba(255, 255, 255, 0.15);
            box-shadow: 0 4px 16px rgba(0,0,0,0.12), inset 0 0 0 1px rgba(255,255,255,0.15);
        }
        .chip:hover .chip-bg-icon { opacity: 0.3; transform: translateY(-50%) rotate(15deg) scale(1.15); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
        .chip:active { transform: translateY(-1px) scale(0.98); }
        .chip:focus-visible { outline: 2px solid rgba(255,255,255,0.4); outline-offset: 2px; border-radius: 18px; }
        .chip.active { 
            background: rgba(99, 102, 241, 0.3); 
            border-color: var(--primary); 
            color: white; 
            box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35), inset 0 0 0 1px rgba(255,255,255,0.15), 0 0 20px rgba(99, 102, 241, 0.2);
            transform: translateY(-2px);
        }
        .chip.active .chip-bg-icon { opacity: 0.35; }
        
        /* Category chips - modern elegant toggle design */
        #cat-container .chip {
            position: relative;
            padding-left: 48px;
        }
        #cat-container .chip::before {
            content: '';
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            border-radius: 6px;
            border: 2px solid rgba(255,255,255,0.3);
            background: rgba(255,255,255,0.05);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 3;
        }
        #cat-container .chip {
            --checkbox-left: 16px;
            --checkbox-width: 20px;
        }
        #cat-container .chip.active {
            background: rgba(16, 185, 129, 0.2);
            border-color: rgba(16, 185, 129, 0.4);
            border-width: 2px;
            color: rgba(255,255,255,0.98);
            box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25), inset 0 0 0 1px rgba(16, 185, 129, 0.2), 0 0 0 1px rgba(255,255,255,0.1);
        }
        #cat-container .chip.active::before {
            background: var(--success);
            border-color: var(--success);
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4), inset 0 0 0 1px rgba(255,255,255,0.2);
        }
        #cat-container .chip.active::after {
            content: '✓';
            position: absolute;
            left: calc(var(--checkbox-left, 16px) + var(--checkbox-width, 20px) / 2);
            top: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 0.75rem;
            font-weight: 900;
            z-index: 4;
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
        }
        #cat-container .chip:not(.active) {
            background: rgba(71, 85, 105, 0.2);
            border-color: rgba(148, 163, 184, 0.25);
            border-width: 2px;
            color: rgba(203, 213, 225, 0.85);
            box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(255,255,255,0.05);
        }
        #cat-container .chip:not(.active)::before {
            background: rgba(148, 163, 184, 0.2);
            border-color: rgba(148, 163, 184, 0.4);
        }
        #cat-container .chip:not(.active) .chip-bg-icon {
            opacity: 0.08;
        }
        #cat-container .chip:not(.active):hover {
            background: rgba(71, 85, 105, 0.25);
            border-color: rgba(148, 163, 184, 0.35);
            color: rgba(203, 213, 225, 0.95);
        }
        #cat-container .chip.active:hover {
            background: rgba(16, 185, 129, 0.25);
            border-color: rgba(16, 185, 129, 0.5);
            box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3), inset 0 0 0 1px rgba(16, 185, 129, 0.25), 0 0 0 1px rgba(255,255,255,0.15);
        }
        
        /* Difficulty chips - modern elegant toggle design matching categories */
        #diff-container .chip {
            position: relative;
            padding-left: 48px;
        }
        #diff-container .chip::before {
            content: '';
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            border-radius: 6px;
            border: 2px solid rgba(255,255,255,0.3);
            background: rgba(255,255,255,0.05);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 3;
        }
        #diff-container .chip {
            --checkbox-left: 16px;
            --checkbox-width: 20px;
        }
        #diff-container .chip.active::before {
            box-shadow: 0 2px 8px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(255,255,255,0.2);
        }
        #diff-container .chip.active::after {
            content: '✓';
            position: absolute;
            left: calc(var(--checkbox-left, 16px) + var(--checkbox-width, 20px) / 2);
            top: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 0.75rem;
            font-weight: 900;
            z-index: 4;
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
        }
        #diff-container .chip:not(.active) {
            background: rgba(71, 85, 105, 0.2);
            border-color: rgba(148, 163, 184, 0.25);
            border-width: 2px;
            color: rgba(203, 213, 225, 0.85);
            box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(255,255,255,0.05);
        }
        #diff-container .chip:not(.active)::before {
            background: rgba(148, 163, 184, 0.2);
            border-color: rgba(148, 163, 184, 0.4);
        }
        #diff-container .chip:not(.active):hover {
            background: rgba(71, 85, 105, 0.25);
            border-color: rgba(148, 163, 184, 0.35);
            color: rgba(203, 213, 225, 0.95);
        }
        #diff-container .chip.diff-einfach.active::before {
            background: var(--diff-easy);
            border-color: var(--diff-easy);
            box-shadow: 0 2px 8px rgba(var(--diff-easy-rgb), 0.4), inset 0 0 0 1px rgba(255,255,255,0.2);
        }
        #diff-container .chip.diff-mittel.active::before {
            background: var(--diff-medium);
            border-color: var(--diff-medium);
            box-shadow: 0 2px 8px rgba(var(--diff-medium-rgb), 0.4), inset 0 0 0 1px rgba(255,255,255,0.2);
        }
        #diff-container .chip.diff-schwierig.active::before {
            background: var(--diff-hard);
            border-color: var(--diff-hard);
            box-shadow: 0 2px 8px rgba(var(--diff-hard-rgb), 0.4), inset 0 0 0 1px rgba(255,255,255,0.2);
        }
        #diff-container .chip.diff-extrem.active::before {
            background: linear-gradient(135deg, #F472B6 0%, var(--diff-extreme) 100%);
            border-color: var(--diff-extreme);
            box-shadow: 0 2px 8px rgba(var(--diff-extreme-rgb), 0.5), inset 0 0 0 1px rgba(255,255,255,0.3);
        }
        #diff-container .chip.diff-einfach.active {
            background: rgba(var(--diff-easy-rgb), 0.2);
            border-color: rgba(var(--diff-easy-rgb), 0.4);
            border-width: 2px;
            color: rgba(255,255,255,0.98);
            box-shadow: 0 4px 16px rgba(var(--diff-easy-rgb), 0.25), inset 0 0 0 1px rgba(var(--diff-easy-rgb), 0.2), 0 0 0 1px rgba(255,255,255,0.1);
        }
        #diff-container .chip.diff-mittel.active {
            background: rgba(var(--diff-medium-rgb), 0.2);
            border-color: rgba(var(--diff-medium-rgb), 0.4);
            border-width: 2px;
            color: rgba(255,255,255,0.98);
            box-shadow: 0 4px 16px rgba(var(--diff-medium-rgb), 0.25), inset 0 0 0 1px rgba(var(--diff-medium-rgb), 0.2), 0 0 0 1px rgba(255,255,255,0.1);
        }
        #diff-container .chip.diff-schwierig.active {
            background: rgba(var(--diff-hard-rgb), 0.2);
            border-color: rgba(var(--diff-hard-rgb), 0.4);
            border-width: 2px;
            color: rgba(255,255,255,0.98);
            box-shadow: 0 4px 16px rgba(var(--diff-hard-rgb), 0.25), inset 0 0 0 1px rgba(var(--diff-hard-rgb), 0.2), 0 0 0 1px rgba(255,255,255,0.1);
        }
        #diff-container .chip.diff-extrem.active {
            background: rgba(var(--diff-extreme-rgb), 0.15);
            border-color: rgba(var(--diff-extreme-rgb), 0.35);
            border-width: 2px;
            color: rgba(255,255,255,0.98);
            box-shadow: 0 4px 16px rgba(var(--diff-extreme-rgb), 0.2), inset 0 0 0 1px rgba(var(--diff-extreme-rgb), 0.15), 0 0 0 1px rgba(255,255,255,0.1);
        }
        #diff-container .chip.diff-einfach.active:hover {
            background: rgba(var(--diff-easy-rgb), 0.25);
            border-color: rgba(var(--diff-easy-rgb), 0.5);
            box-shadow: 0 6px 20px rgba(var(--diff-easy-rgb), 0.3), inset 0 0 0 1px rgba(var(--diff-easy-rgb), 0.25), 0 0 0 1px rgba(255,255,255,0.15);
        }
        #diff-container .chip.diff-mittel.active:hover {
            background: rgba(var(--diff-medium-rgb), 0.25);
            border-color: rgba(var(--diff-medium-rgb), 0.5);
            box-shadow: 0 6px 20px rgba(var(--diff-medium-rgb), 0.3), inset 0 0 0 1px rgba(var(--diff-medium-rgb), 0.25), 0 0 0 1px rgba(255,255,255,0.15);
        }
        #diff-container .chip.diff-schwierig.active:hover {
            background: rgba(var(--diff-hard-rgb), 0.25);
            border-color: rgba(var(--diff-hard-rgb), 0.5);
            box-shadow: 0 6px 20px rgba(var(--diff-hard-rgb), 0.3), inset 0 0 0 1px rgba(var(--diff-hard-rgb), 0.25), 0 0 0 1px rgba(255,255,255,0.15);
        }
        #diff-container .chip.diff-extrem.active:hover {
            background: rgba(var(--diff-extreme-rgb), 0.2);
            border-color: rgba(var(--diff-extreme-rgb), 0.45);
            box-shadow: 0 6px 20px rgba(var(--diff-extreme-rgb), 0.25), inset 0 0 0 1px rgba(var(--diff-extreme-rgb), 0.2), 0 0 0 1px rgba(255,255,255,0.15);
        }
        .chip-icon { font-size: 1.1rem; margin-right: 8px; position: relative; z-index: 2; }

        /* --- PASS DEVICE --- */
        .pass-wrapper { 
            flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; 
            gap: clamp(20px, 5vw, 32px); padding: clamp(12px, 3vw, 24px) 0; 
        }
        .pass-card-base {
            width: 100%; border-radius: var(--radius-card); 
            padding: clamp(18px, 4vw, 28px) clamp(16px, 4vw, 24px); 
            display: flex; align-items: center; gap: clamp(12px, 3vw, 20px); position: relative; 
            animation: fadeInSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-card);
        }
        .pass-card-base:hover {
            transform: translateY(-6px) scale(1.01);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255,255,255,0.2) inset, 0 1px 0 rgba(255,255,255,0.3) inset;
        }
        .pass-floating-label {
            position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
            font-weight: 800; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.2px;
            padding: 6px 16px; border-radius: 12px; white-space: nowrap; z-index: 5;
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255,255,255,0.2);
        }
        
        .pass-guesser-card { 
            background: rgba(255, 255, 255, 0.08); 
            border: 1px solid rgba(59, 130, 246, 0.3); 
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
        }
        .pass-guesser-card .pass-floating-label { 
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(37, 99, 235, 0.9) 100%); 
            color: white; 
            box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35), inset 0 0 0 1px rgba(255,255,255,0.2);
        }
        .pass-guesser-card:hover {
            border-color: rgba(59, 130, 246, 0.4);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255,255,255,0.2), 0 1px 0 rgba(255,255,255,0.3) inset, 0 0 30px rgba(59, 130, 246, 0.2);
        }
        .pass-guesser-avatar { 
            font-size: clamp(2.8rem, 10vw, 4rem); 
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.3));
            flex-shrink: 0;
        }
        .pass-guesser-card:hover .pass-guesser-avatar { 
            transform: scale(1.12) rotate(5deg); 
            filter: drop-shadow(0 6px 16px rgba(59, 130, 246, 0.4));
        }
        .pass-guesser-info { text-align: left; flex: 1; min-width: 0; overflow: hidden; }
        .pass-guesser-name { 
            font-size: clamp(1.3rem, 5vw, 1.8rem); font-weight: 700; color: rgba(255,255,255,0.98); 
            line-height: 1.2; text-shadow: 0 1px 3px rgba(0,0,0,0.2);
            margin-bottom: 6px;
            word-break: break-word;
        }
        .pass-guesser-action { 
            margin-top: 8px; 
            background: rgba(59, 130, 246, 0.2); 
            border: 1px solid rgba(59, 130, 246, 0.3);
            color: rgba(255,255,255,0.95); 
            padding: 6px 12px; border-radius: 10px; font-size: 0.85rem; font-weight: 600; 
            display: inline-flex; align-items: center; gap: 6px; 
            text-shadow: 0 1px 2px rgba(0,0,0,0.15);
            line-height: 1.4;
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2), inset 0 0 0 1px rgba(255,255,255,0.1);
        }

        .pass-reader-card { 
            background: rgba(255, 255, 255, 0.08); 
            border: 1px solid rgba(99, 102, 241, 0.3); 
            animation-delay: 0.15s; 
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
        }
        .pass-reader-card:hover {
            border-color: rgba(99, 102, 241, 0.4);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255,255,255,0.2), 0 1px 0 rgba(255,255,255,0.3) inset, 0 0 30px rgba(99, 102, 241, 0.2);
        }
        .pass-reader-card .pass-floating-label { 
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(79, 70, 229, 0.9) 100%); 
            color: white; 
            box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35), inset 0 0 0 1px rgba(255,255,255,0.2);
        }
        .pass-reader-avatar { 
            font-size: clamp(2.8rem, 10vw, 4rem); 
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
            flex-shrink: 0;
        }
        .pass-reader-card:hover .pass-reader-avatar { 
            transform: scale(1.12) rotate(-5deg); 
            filter: drop-shadow(0 6px 16px rgba(99, 102, 241, 0.4));
        }
        .pass-reader-info { text-align: left; flex: 1; min-width: 0; overflow: hidden; }
        .pass-reader-name { 
            font-size: clamp(1.3rem, 5vw, 1.8rem); font-weight: 700; color: rgba(255,255,255,0.98); 
            line-height: 1.2; text-shadow: 0 1px 3px rgba(0,0,0,0.2);
            margin-bottom: 6px;
            word-break: break-word;
        }
        .pass-reader-action { 
            margin-top: 8px; 
            background: rgba(99, 102, 241, 0.2); 
            border: 1px solid rgba(99, 102, 241, 0.3);
            color: rgba(255,255,255,0.95); 
            padding: 6px 12px; border-radius: 10px; font-size: 0.85rem; font-weight: 600; 
            display: inline-flex; align-items: center; gap: 6px; 
            text-shadow: 0 1px 2px rgba(0,0,0,0.15);
            line-height: 1.4;
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
            box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2), inset 0 0 0 1px rgba(255,255,255,0.1);
        }

        /* --- CATEGORY CHOICE --- */
        #screen-choice {
            justify-content: center;
        }
        .choice-grid { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
        .card-choice {
            background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-card);
            padding: 18px 22px; position: relative; overflow: hidden; cursor: pointer;
            box-shadow: var(--shadow-card); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex; flex-direction: row; align-items: center; text-align: left; justify-content: flex-start; gap: 16px;
            transform: translateY(20px); opacity: 0; animation: cardEntrance 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
        }
        .card-choice::before {
            content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
            transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .card-choice:hover::before { left: 100%; }
        .card-choice:hover { 
            transform: translateY(-5px) scale(1.02); 
            box-shadow: var(--shadow-card-hover);
            border-color: rgba(255,255,255,0.2);
        }
        .card-choice:active { transform: scale(0.98); transition-duration: 0.1s; }
        .card-choice:focus-visible { outline: 2px solid rgba(255,255,255,0.4); outline-offset: 3px; }
        .card-choice[data-diff="einfach"]:hover { box-shadow: 0 20px 45px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.2) inset, 0 0 30px rgba(var(--diff-easy-rgb), 0.2); }
        .card-choice[data-diff="mittel"]:hover { box-shadow: 0 20px 45px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.2) inset, 0 0 30px rgba(var(--diff-medium-rgb), 0.2); }
        .card-choice[data-diff="schwierig"]:hover { box-shadow: 0 20px 45px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.2) inset, 0 0 30px rgba(var(--diff-hard-rgb), 0.2); }
        .card-choice[data-diff="extrem"]:hover { box-shadow: 0 20px 45px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.2) inset, 0 0 30px rgba(var(--diff-extreme-rgb), 0.2); }
        .card-choice:active { transform: translateY(-4px) scale(1.01); }
        
        .card-choice[data-diff="einfach"] { border-color: var(--diff-easy); background: rgba(var(--diff-easy-rgb), 0.15); }
        .card-choice[data-diff="mittel"] { border-color: var(--diff-medium); background: rgba(var(--diff-medium-rgb), 0.15); }
        .card-choice[data-diff="schwierig"] { border-color: var(--diff-hard); background: rgba(var(--diff-hard-rgb), 0.15); }
        .card-choice[data-diff="extrem"] { border-color: var(--diff-extreme); background: rgba(var(--diff-extreme-rgb), 0.15); }

        .card-content { z-index: 2; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 1; }
        .card-title { 
            font-family: var(--font-main); font-size: 1.4rem; font-weight: 700; 
            color: rgba(255,255,255,0.98); display: block; letter-spacing: 0.02em; 
            text-transform: uppercase; line-height: 1.2; 
            text-shadow: 0 1px 3px rgba(0,0,0,0.15);
        }
        .choice-icon-circle { 
            width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,0.1); 
            box-shadow: var(--shadow-sm); 
            display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0; 
            backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
            transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            border: 1px solid rgba(255,255,255,0.08);
        }
        .card-choice:hover .choice-icon-circle {
            transform: scale(1.08) rotate(8deg);
            background: rgba(255,255,255,0.15);
            box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        }
        .card-choice[data-diff="einfach"]:hover .choice-icon-circle { box-shadow: 0 6px 20px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.25), 0 0 20px rgba(var(--diff-easy-rgb), 0.25); }
        .card-choice[data-diff="mittel"]:hover .choice-icon-circle { box-shadow: 0 6px 20px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.25), 0 0 20px rgba(var(--diff-medium-rgb), 0.25); }
        .card-choice[data-diff="schwierig"]:hover .choice-icon-circle { box-shadow: 0 6px 20px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.25), 0 0 20px rgba(var(--diff-hard-rgb), 0.25); }
        .card-choice[data-diff="extrem"]:hover .choice-icon-circle { box-shadow: 0 6px 20px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.25), 0 0 20px rgba(var(--diff-extreme-rgb), 0.25); }
        
        .diff-badge { 
            display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 10px; 
            font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; 
            background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.95); 
            text-shadow: 0 1px 2px rgba(0,0,0,0.15);
            line-height: 1.3;
            border: 1px solid rgba(255,255,255,0.08);
        }
        .card-choice[data-diff="einfach"] .diff-badge { color: rgba(255,255,255,0.95); background: rgba(var(--diff-easy-rgb), 0.3); }
        .card-choice[data-diff="mittel"] .diff-badge { color: rgba(255,255,255,0.95); background: rgba(var(--diff-medium-rgb), 0.3); }
        .card-choice[data-diff="schwierig"] .diff-badge { color: rgba(255,255,255,0.95); background: rgba(var(--diff-hard-rgb), 0.3); }
        .card-choice[data-diff="extrem"] .diff-badge { color: rgba(255,255,255,0.95); background: rgba(var(--diff-extreme-rgb), 0.3); }

        .choice-separator { 
            display: flex; align-items: center; justify-content: center; width: 100%; margin: 18px 0; 
            color: rgba(255,255,255,0.5); font-weight: 700; font-size: 0.8rem; 
            text-transform: uppercase; letter-spacing: 2.5px; gap: 18px; 
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
        }
        .choice-separator::before, .choice-separator::after { 
            content: ''; flex: 1; height: 1px; 
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
            border-radius: 1px; 
        }

        .card-choice.random { 
            background: rgba(255, 255, 255, 0.08); 
            border: 1px solid rgba(139, 92, 246, 0.3); 
            color: white; justify-content: flex-start; text-align: left; 
            padding: 16px 20px; margin-top: 4px; gap: 16px; 
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            box-shadow: var(--shadow-card), 0 0 30px rgba(139, 92, 246, 0.15);
        }
        .card-choice.random::before { 
            background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
        }
        .card-choice.random .choice-icon-circle { 
            background: rgba(139, 92, 246, 0.2); 
            border: 1px solid rgba(139, 92, 246, 0.3);
            color: white; 
            box-shadow: 0 4px 12px rgba(0,0,0,0.12), inset 0 0 0 1px rgba(255,255,255,0.15);
        }
        .card-choice.random .card-title { color: white; font-size: 1.4rem; margin-bottom: 0; }
        .card-choice.random .diff-badge { 
            background: rgba(139, 92, 246, 0.3); 
            border: 1px solid rgba(139, 92, 246, 0.4);
            color: white; 
        }
        .card-choice.random:hover { 
            transform: translateY(-6px) scale(1.03); 
            border-color: rgba(139, 92, 246, 0.4);
            box-shadow: 0 20px 45px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.2) inset, 0 0 30px rgba(139, 92, 246, 0.2);
        }
        .card-choice.random:hover .choice-icon-circle {
            background: rgba(139, 92, 246, 0.25);
            box-shadow: 0 6px 20px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.25), 0 0 20px rgba(139, 92, 246, 0.25);
        }

        @keyframes cardEntrance { to { opacity: 1; transform: translateY(0); } }

        /* --- GAME UI --- */
        #game-header-row { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
        #game-cat-badge { 
            background: rgba(255, 255, 255, 0.12); padding: 8px 16px; border-radius: 14px; 
            font-weight: 700; font-size: 0.9rem; color: rgba(255,255,255,0.95); 
            text-transform: uppercase; letter-spacing: 0.5px; 
            backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); 
            border: 1px solid rgba(255,255,255,0.2);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(255,255,255,0.1);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            text-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }
        #game-diff-badge {
            background: rgba(255, 255, 255, 0.12); padding: 8px 16px; border-radius: 14px; 
            font-weight: 700; font-size: 0.9rem; color: rgba(255,255,255,0.95); 
            text-transform: uppercase; letter-spacing: 0.5px; 
            backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); 
            border: 1px solid rgba(255,255,255,0.2);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(255,255,255,0.1);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            text-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }
        #game-diff-badge[data-diff="einfach"] {
            background: rgba(var(--diff-easy-rgb), 0.2); border-color: var(--diff-easy);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(255,255,255,0.15), 0 0 15px rgba(var(--diff-easy-rgb), 0.2);
        }
        #game-diff-badge[data-diff="mittel"] {
            background: rgba(var(--diff-medium-rgb), 0.2); border-color: var(--diff-medium);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(255,255,255,0.15), 0 0 15px rgba(var(--diff-medium-rgb), 0.2);
        }
        #game-diff-badge[data-diff="schwierig"] {
            background: rgba(var(--diff-hard-rgb), 0.2); border-color: var(--diff-hard);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(255,255,255,0.15), 0 0 15px rgba(var(--diff-hard-rgb), 0.2);
        }
        #game-diff-badge[data-diff="extrem"] {
            background: rgba(var(--diff-extreme-rgb), 0.2); border-color: var(--diff-extreme);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(255,255,255,0.15), 0 0 15px rgba(var(--diff-extreme-rgb), 0.2);
        }
        .btn-pause { 
            width: 50px; height: 50px; border-radius: 50%; 
            background: rgba(255, 255, 255, 0.08); color: rgba(255,255,255,0.85); 
            font-size: 1.3rem; display: flex; align-items: center; justify-content: center; 
            cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); 
            border: 1px solid rgba(255,255,255,0.15);
            box-shadow: var(--shadow-sm);
        }
        .btn-pause:hover { 
            background: rgba(255, 255, 255, 0.15); 
            color: rgba(255,255,255,1);
            border-color: rgba(255,255,255,0.25);
            transform: scale(1.1) rotate(90deg);
            box-shadow: 0 6px 20px rgba(0,0,0,0.12);
        }
        .btn-pause:active { transform: scale(0.9); transition-duration: 0.1s; }
        .btn-pause:focus-visible { outline: 2px solid rgba(255,255,255,0.5); outline-offset: 3px; }
        #game-card-title { 
            flex-shrink: 0; text-align: center; font-size: clamp(1.9rem, 4.5vh, 2.5rem); 
            margin: 0 0 20px 0; color: rgba(255,255,255,0.98); line-height: 1.3; 
            background: linear-gradient(45deg, rgba(255,255,255,1), rgba(255,255,255,0.9)); 
            -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; 
            text-shadow: 0 2px 20px rgba(255,255,255,0.15), 0 1px 3px rgba(0,0,0,0.2); 
            transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
            font-weight: 700;
        }
        #word-list-container { flex: 1; display: flex; flex-direction: column; gap: 1.5vh; overflow: hidden; padding: 4px 16px 4px 4px; min-height: 0; margin-bottom: 10px; transition: opacity 0.5s ease; }
        
        #screen-game.intro-mode #word-list-container { opacity: 0; pointer-events: none; }
        #screen-game.intro-mode #game-card-title { transform: translateY(calc(35vh - 50%)); }
        #screen-game.intro-mode #game-header-row, #screen-game.intro-mode .bottom-bar { opacity: 0; transition: opacity 0.5s; }

        .game-term { 
            flex: 1; min-height: 0; background: rgba(255, 255, 255, 0.08); padding: 0 24px; border-radius: 18px; 
            font-size: clamp(1rem, 2.6vh, 1.5rem); font-weight: 600; display: flex; justify-content: space-between; 
            align-items: center; box-shadow: var(--shadow-sm); 
            cursor: pointer; opacity: 1; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
            border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.98); 
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            text-shadow: 0 1px 2px rgba(0,0,0,0.15);
            line-height: 1.4;
            overflow: hidden;
        }
        .game-term span {
            flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            min-width: 0; display: block;
        }
        .game-term:hover:not(.locked):not(.checked) {
            background: rgba(255, 255, 255, 0.12);
            border-color: rgba(255,255,255,0.2);
            transform: translateX(6px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.1), 0 0 0 2px rgba(99, 102, 241, 0.15);
        }
        .game-term:focus-visible:not(.locked) { outline: 2px solid rgba(99, 102, 241, 0.5); outline-offset: 3px; }
        .game-term.locked { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.5); }
        .game-term i { opacity: 0; transform: scale(0.5); transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); color: white; font-size: 1.4rem; }
        .game-term.checked { 
            background: rgba(16, 185, 129, 0.25); 
            border-color: rgba(16, 185, 129, 0.4); 
            color: white; opacity: 1; 
            box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25), inset 0 0 0 1px rgba(16, 185, 129, 0.2), 0 0 0 1px rgba(255,255,255,0.1); 
            transform: translateX(12px); 
            backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        }
        .game-term.checked:hover {
            background: rgba(16, 185, 129, 0.3);
            border-color: rgba(16, 185, 129, 0.5);
            transform: translateX(16px);
            box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3), inset 0 0 0 1px rgba(16, 185, 129, 0.25), 0 0 0 3px rgba(16, 185, 129, 0.2);
        }
        .game-term.checked span { text-decoration: none; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
        .game-term.checked i { opacity: 1; transform: scale(1.1); animation: checkPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        @keyframes checkPop {
            0% { transform: scale(0.5) rotate(-180deg); opacity: 0; }
            50% { transform: scale(1.2) rotate(10deg); }
            100% { transform: scale(1.1) rotate(0deg); opacity: 1; }
        }

        /* --- SUMMARY SCREEN --- */
        #screen-summary {
            --sum-scale: clamp(0.85, calc(0.7 + 0.3 * (100vh - 500px) / 300), 1.1);
        }
        .summary-header {
            text-align: center;
            margin-bottom: clamp(2px, 1vh, 8px);
        }
        .summary-header h2 {
            margin: 0;
            font-size: clamp(1.2rem, 4vw, 1.5rem);
            color: rgba(255,255,255,0.95);
        }
        
        .summary-hero {
            text-align: center;
            padding: clamp(6px, 1.5vh, 16px) 0;
            animation: fadeInSlideUp 0.5s ease-out;
        }
        .summary-guesser {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: clamp(6px, 2vw, 10px);
            margin-bottom: clamp(4px, 1vh, 10px);
        }
        .summary-guesser-avatar {
            font-size: clamp(1.5rem, 5vw, 2rem);
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
        }
        .summary-guesser-name {
            font-size: clamp(0.9rem, 3vw, 1.1rem);
            font-weight: 700;
            color: rgba(255,255,255,0.9);
        }
        .summary-points-display {
            margin-bottom: clamp(6px, 1.5vh, 14px);
        }
        .summary-points {
            font-size: clamp(2.5rem, 12vw, 4rem);
            font-weight: 800;
            line-height: 1;
            color: rgba(255,255,255,0.98);
            text-shadow: 0 3px 15px rgba(99, 102, 241, 0.4), 0 1px 8px rgba(0,0,0,0.2);
        }
        .summary-points-label {
            font-size: clamp(0.65rem, 2vw, 0.8rem);
            font-weight: 600;
            color: rgba(255,255,255,0.5);
            text-transform: uppercase;
            letter-spacing: 1.5px;
            margin-top: 2px;
        }
        .summary-breakdown {
            display: flex;
            justify-content: center;
            gap: clamp(6px, 2vw, 10px);
            flex-wrap: wrap;
        }
        .breakdown-item {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: clamp(4px, 1vw, 7px) clamp(8px, 2vw, 12px);
            background: rgba(255,255,255,0.06);
            border-radius: 8px;
            font-size: clamp(0.65rem, 2vw, 0.75rem);
            font-weight: 600;
            color: rgba(255,255,255,0.75);
            border: 1px solid rgba(255,255,255,0.06);
            transition: all 0.2s ease;
        }
        .breakdown-item i {
            color: var(--primary-light);
            font-size: clamp(0.7rem, 2.2vw, 0.85rem);
            opacity: 0.9;
        }
        .breakdown-item.hidden { display: none; }
        
        .summary-progress-card {
            background: rgba(255,255,255,0.06);
            border-radius: clamp(14px, 3vw, 20px);
            padding: clamp(10px, 2vh, 16px) clamp(12px, 3vw, 20px);
            margin: clamp(6px, 1.5vh, 12px) 0;
            border: 1px solid rgba(255,255,255,0.08);
            animation: fadeInSlideUp 0.5s ease-out 0.15s backwards;
        }
        .progress-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: clamp(6px, 1.2vh, 10px);
        }
        .progress-label {
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 700;
            font-size: clamp(0.7rem, 2.2vw, 0.85rem);
            color: rgba(255,255,255,0.85);
        }
        .progress-label i {
            color: #FCD34D;
            font-size: clamp(0.8rem, 2.5vw, 1rem);
        }
        .progress-values {
            font-weight: 700;
            font-size: clamp(0.75rem, 2.3vw, 0.9rem);
            color: rgba(255,255,255,0.65);
        }
        .progress-bar-container {
            height: clamp(6px, 1.2vh, 10px);
            background: rgba(255,255,255,0.08);
            border-radius: 10px;
            overflow: hidden;
            position: relative;
        }
        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
            border-radius: 10px;
            transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            position: relative;
            overflow: hidden;
        }
        .progress-bar-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
            animation: progressShimmer 1.5s ease-out 0.5s forwards;
        }
        @keyframes progressShimmer {
            0% { left: -100%; opacity: 1; }
            100% { left: 100%; opacity: 0; }
        }
        .progress-hint {
            text-align: center;
            font-size: clamp(0.6rem, 1.8vw, 0.75rem);
            color: rgba(255,255,255,0.45);
            margin-top: clamp(6px, 1vh, 10px);
            font-weight: 600;
            letter-spacing: 0.3px;
        }
        .progress-hint.close { color: #FCD34D; }
        .progress-hint.very-close { color: #10B981; font-weight: 700; }
        
        .summary-ranking-card {
            padding: clamp(12px, 2.5vw, 18px);
            display: flex;
            flex-direction: column;
            animation: fadeInSlideUp 0.5s ease-out 0.3s backwards;
            position: relative;
            transition: all 0.3s ease;
            flex: 1;
            min-height: 0;
        }
        .summary-ranking-card.expanded {
            position: absolute;
            bottom: 76px;
            left: 0;
            right: 0;
            top: auto;
            max-height: calc(100% - 96px);
            z-index: 50;
            margin: 0;
            box-shadow: 0 -8px 30px rgba(0,0,0,0.25), var(--shadow-card);
            border-radius: var(--radius-card) var(--radius-card) 0 0;
        }
        .ranking-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: clamp(8px, 1.5vh, 14px);
            font-weight: 800;
            font-size: clamp(0.7rem, 2vw, 0.8rem);
            text-transform: uppercase;
            letter-spacing: 1.2px;
            color: rgba(255,255,255,0.55);
            cursor: pointer;
            padding: 2px 0;
            transition: color 0.2s;
        }
        .ranking-header:hover {
            color: rgba(255,255,255,0.75);
        }
        .ranking-header > span:first-child i {
            margin-right: 6px;
        }
        .ranking-expand-hint {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: clamp(0.6rem, 1.8vw, 0.7rem);
            color: rgba(255,255,255,0.45);
            transition: all 0.2s;
            font-weight: 600;
        }
        .ranking-expand-hint:hover {
            color: rgba(255,255,255,0.65);
        }
        .ranking-expand-hint i {
            transition: transform 0.3s ease;
            font-size: 0.8em;
        }
        .summary-ranking-card.expanded .ranking-expand-hint i {
            transform: rotate(180deg);
        }
        .ranking-expand-hint.hidden {
            display: none;
        }
        #ranking-list {
            display: flex;
            flex-direction: column;
            gap: clamp(4px, 1vh, 8px);
            overflow: hidden;
            transition: max-height 0.3s ease;
        }
        #ranking-list.ranking-collapsed {
            max-height: 200px;
        }
        #ranking-list.ranking-collapsed .ranking-item:nth-child(n+4) {
            display: none;
        }
        .summary-ranking-card.expanded #ranking-list {
            max-height: none;
            overflow-y: auto;
            flex: 1;
        }
        .summary-ranking-card.expanded #ranking-list .ranking-item {
            display: flex !important;
        }

        /* --- RANKING ITEMS --- */
        .ranking-item { 
            display: flex; 
            align-items: center; 
            background: rgba(255, 255, 255, 0.05); 
            padding: clamp(8px, 1.5vh, 12px) clamp(10px, 2.5vw, 16px); 
            border-radius: clamp(10px, 2vw, 14px);
            transition: all 0.25s ease; 
            border: 1px solid rgba(255,255,255,0.08);
            animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
        }
        .ranking-item:hover {
            transform: translateX(3px);
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255,255,255,0.12);
        }
        .ranking-item.current-guesser {
            border-color: rgba(99, 102, 241, 0.35);
            background: rgba(99, 102, 241, 0.12);
        }
        .rank-pos { 
            font-weight: 700; 
            width: clamp(28px, 8vw, 38px); 
            color: rgba(255,255,255,0.55); 
            font-size: clamp(0.85rem, 2.5vw, 1rem); 
            display: flex; 
            align-items: center;
            flex-shrink: 0;
        }
        .rank-info { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
        .rank-name { 
            font-weight: 600; 
            font-size: clamp(0.85rem, 2.5vw, 0.95rem); 
            color: rgba(255,255,255,0.95); 
            line-height: 1.25;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .rank-delta {
            font-size: clamp(0.55rem, 1.6vw, 0.65rem);
            font-weight: 700;
            color: #6EE7B7;
            text-shadow: 0 0 8px rgba(110, 231, 183, 0.3);
        }
        .rank-delta.zero { color: rgba(255,255,255,0.4); text-shadow: none; }
        .rank-score { 
            font-weight: 700; 
            color: rgba(255,255,255,0.95); 
            font-size: clamp(0.95rem, 2.8vw, 1.1rem); 
            margin-left: clamp(6px, 1.5vw, 10px);
            flex-shrink: 0;
        }
        .rank-1 { 
            border: 1px solid rgba(251, 191, 36, 0.35); 
            background: rgba(251, 191, 36, 0.12); 
        } 
        .rank-1 .rank-pos { color: #FCD34D; }
        .rank-2 { 
            border: 1px solid rgba(255,255,255,0.2); 
            background: rgba(255,255,255,0.06); 
        } 
        .rank-2 .rank-pos { color: rgba(255,255,255,0.65); }
        .rank-3 { 
            border: 1px solid rgba(251, 146, 60, 0.35); 
            background: rgba(251, 146, 60, 0.12); 
        } 
        .rank-3 .rank-pos { color: #FDBA74; }
        .rank-medal { 
            font-size: clamp(1rem, 3vw, 1.25rem); 
            margin-right: 2px; 
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15)); 
        }

        @keyframes slideUp { 
            0% { opacity: 0; transform: translateY(20px) scale(0.98); } 
            100% { opacity: 1; transform: translateY(0) scale(1); } 
        }
        @keyframes fadeInSlideUp {
            0% { opacity: 0; transform: translateY(15px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        @keyframes bounceSoft { 
            0%, 100% { transform: translateY(0) scale(1); } 
            50% { transform: translateY(-8px) scale(1.02); } 
        }
        @keyframes pulse { 
            0%, 100% { transform: scale(1); opacity: 1; } 
            50% { transform: scale(1.03); opacity: 0.9; } 
        }
        @keyframes spin { 
            0% { transform: rotate(0deg); } 
            100% { transform: rotate(360deg); } 
        }
        @keyframes cardEntrance { 
            0% { opacity: 0; transform: translateY(20px) scale(0.96); }
            100% { opacity: 1; transform: translateY(0) scale(1); } 
        }
        @keyframes shimmer {
            0% { background-position: -1000px 0; }
            100% { background-position: 1000px 0; }
        }
        .winner-bg-anim { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 150%; height: 150%; z-index: -1; background: conic-gradient(from 0deg, rgba(99, 102, 241, 0.12), transparent 40%, rgba(139, 92, 246, 0.12) 80%, transparent); }
        .winner-title { font-size: 3.2rem; margin-bottom: 10px; font-weight: 800; background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.85) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 2px 10px rgba(255,255,255,0.15)); letter-spacing: -1px; }
        .winner-trophy { font-size: 3.5rem; margin-bottom: -18px; position: relative; z-index: 2; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); }
        .winner-avatar { 
            font-size: 7rem; margin: 10px 0 30px 0; 
            background: rgba(255, 255, 255, 0.15); width: 160px; height: 160px; border-radius: 50%; 
            display: flex; align-items: center; justify-content: center; 
            box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3), inset 0 0 0 1px rgba(255,255,255,0.3), 0 0 40px rgba(99, 102, 241, 0.2); 
            border: 3px solid rgba(99, 102, 241, 0.4); position: relative; z-index: 1; 
            backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }
        /* Home Screen Layout */
        #screen-home {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            text-align: center;
        }
        .home-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        .home-logo-container {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 16px;
        }
        .home-logo {
            width: clamp(200px, 60vw, 300px);
            height: auto;
            object-fit: contain;
            position: relative;
            z-index: 1;
            filter: drop-shadow(0 8px 24px rgba(0,0,0,0.2));
        }
        .home-logo-glow { 
            position: absolute; 
            width: 280px; height: 280px; 
            background: radial-gradient(circle, var(--primary) 0%, transparent 70%); 
            opacity: 0.2; 
            filter: blur(50px); 
            z-index: 0;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        
        /* --- HOME FOOTER --- */
        #screen-home .bottom-bar {
            padding-bottom: 44px; /* Platz für Footer */
        }
        .home-footer {
            position: absolute;
            bottom: 16px;
            left: 0;
            right: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 0.75rem;
            color: rgba(255,255,255,0.45);
            font-weight: 500;
        }
        .home-footer .footer-divider {
            color: rgba(255,255,255,0.25);
        }
        .home-footer .footer-link {
            background: none;
            border: none;
            color: rgba(255,255,255,0.5);
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 6px;
            transition: all 0.2s ease;
            font-family: inherit;
        }
        .home-footer .footer-link:hover {
            color: rgba(255,255,255,0.8);
            background: rgba(255,255,255,0.08);
        }
        .home-footer .footer-link:active {
            transform: scale(0.97);
        }
        
        .hidden { display: none !important; opacity: 0; pointer-events: none; }
        .slot-text { display: inline-block; animation: slotSpin 0.5s linear infinite; }
        @keyframes slotSpin { 0% { opacity: 1; transform: translateY(0); } 49% { opacity: 0; transform: translateY(-20px); } 50% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }

        /* --- OVERLAYS --- */
        .help-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(15, 23, 42, 0.9); 
            display: flex; align-items: center; justify-content: center;
            z-index: 3000; padding: 24px;
            opacity: 0; pointer-events: none;
            transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }
        .help-overlay:not(.hidden) {
            opacity: 1; pointer-events: all;
        }
        .help-card {
            background: rgba(255, 255, 255, 0.15); border-radius: var(--radius-card);
            padding: clamp(20px, 5vw, 32px); max-width: 400px; width: calc(100% - 32px);
            box-shadow: var(--shadow-overlay); border: 1px solid rgba(255,255,255,0.18);
            max-height: 85vh; overflow-y: auto;
            transform: scale(0.92) translateY(10px); 
            transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
            backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            opacity: 0;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }
        .help-overlay:not(.hidden) .help-card {
            transform: scale(1) translateY(0);
            opacity: 1;
        }
        .help-item {
            display: flex; gap: clamp(10px, 3vw, 16px); margin-bottom: clamp(14px, 3vw, 20px); align-items: flex-start;
        }
        .help-icon {
            font-size: clamp(1.5rem, 5vw, 2rem); flex-shrink: 0; color: rgba(255,255,255,0.95);
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
        }
        .help-text h4 {
            font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; color: rgba(255,255,255,0.95);
        }
        .help-text p {
            color: rgba(255,255,255,0.7); font-size: 0.95rem; line-height: 1.5;
        }

        /* --- AVATAR SELECTION --- */
        .avatar-grid {
            display: grid; 
            grid-template-columns: repeat(5, 1fr); 
            gap: 10px;
            margin: 16px 0;
            max-width: 100%;
        }
        /* Responsive Avatar-Grid */
        @media (max-width: 360px) {
            .avatar-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 8px;
            }
        }
        @media (max-width: 300px) {
            .avatar-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }
        .avatar-option {
            aspect-ratio: 1; background: rgba(255, 255, 255, 0.06); border: 2px solid rgba(255,255,255,0.12);
            border-radius: 14px; display: flex; align-items: center; justify-content: center;
            font-size: clamp(1.5rem, 5vw, 2.2rem); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-sm);
            backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
            min-width: 0;
        }
        .avatar-option:hover:not(.disabled) {
            border-color: var(--primary); 
            transform: scale(1.1) translateY(-4px); 
            box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3), 0 0 20px rgba(99, 102, 241, 0.2); 
            background: rgba(99, 102, 241, 0.2);
        }
        .avatar-option:focus-visible:not(.disabled) { outline: 2px solid rgba(99, 102, 241, 0.6); outline-offset: 3px; }
        .avatar-option:active:not(.disabled) {
            transform: scale(0.96);
            transition-duration: 0.1s;
        }
        .avatar-option.disabled {
            opacity: 0.25; cursor: not-allowed; filter: grayscale(1);
        }

        /* --- PAUSE OVERLAY --- */
        .pause-overlay {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(15, 23, 42, 0.98); 
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            z-index: 100; opacity: 0; pointer-events: none;
            transition: opacity 0.35s ease;
            padding: 24px;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }
        .pause-overlay:not(.hidden) {
            opacity: 1; pointer-events: all;
        }
        .pause-card {
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: var(--radius-card);
            padding: clamp(28px, 6vw, 40px);
            max-width: 340px;
            width: 100%;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255,255,255,0.08);
            transform: scale(0.9) translateY(20px);
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .pause-overlay:not(.hidden) .pause-card {
            transform: scale(1) translateY(0);
            opacity: 1;
        }
        .pause-icon {
            width: clamp(70px, 18vw, 90px);
            height: clamp(70px, 18vw, 90px);
            margin: 0 auto clamp(16px, 4vw, 24px);
            background: rgba(99, 102, 241, 0.15);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: clamp(2.2rem, 8vw, 3rem);
            border: 2px solid rgba(99, 102, 241, 0.3);
            box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2), inset 0 0 20px rgba(99, 102, 241, 0.1);
            animation: pausePulse 2s ease-in-out infinite;
        }
        @keyframes pausePulse {
            0%, 100% { box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2), inset 0 0 20px rgba(99, 102, 241, 0.1); }
            50% { box-shadow: 0 8px 40px rgba(99, 102, 241, 0.35), inset 0 0 25px rgba(99, 102, 241, 0.15); }
        }
        .pause-title {
            font-size: clamp(1.6rem, 6vw, 2rem);
            font-weight: 800;
            color: rgba(255, 255, 255, 0.95);
            margin-bottom: clamp(6px, 1.5vw, 10px);
            letter-spacing: -0.5px;
        }
        .pause-subtitle {
            font-size: clamp(0.8rem, 2.5vw, 0.9rem);
            color: rgba(255, 255, 255, 0.5);
            margin-bottom: clamp(20px, 5vw, 32px);
            font-weight: 500;
        }
        .pause-actions {
            display: flex;
            flex-direction: column;
            gap: clamp(10px, 2.5vw, 14px);
        }
        .pause-actions .btn {
            width: 100%;
            justify-content: center;
        }
        .pause-actions .btn-primary {
            background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
            box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
        }
        .pause-actions .btn-primary:hover {
            box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255,255,255,0.25);
        }
        .pause-divider {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: clamp(6px, 1.5vw, 10px) 0;
            color: rgba(255, 255, 255, 0.3);
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .pause-divider::before,
        .pause-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        }
        .pause-secondary-actions {
            display: flex;
            flex-direction: column;
            gap: clamp(8px, 2vw, 10px);
        }
        .pause-secondary-actions .btn {
            padding: 14px 20px;
            font-size: 0.85rem;
        }
