/* ============================================
   FreeBlocks v3.19.4 - Stylesheet
   Extracted from index.html
   ============================================ */

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            user-select: none;
            -webkit-user-select: none;
            -webkit-touch-callout: none;
        }

        /* ============================================
           CSS VARIABLES - Zentrale Definitionen
           FreeBlocks v3.19.4 - Graphics Presets System
           ============================================ */
        :root {
            /* ===== BLOCK COLORS (RGB ohne Alpha) ===== */
            --color-1-start: 255, 95, 95;   /* ROT */
            --color-1-end: 220, 55, 55;
            --color-2-start: 70, 210, 200;  /* CYAN */
            --color-2-end: 40, 180, 170;
            --color-3-start: 80, 150, 245;  /* BLAU */
            --color-3-end: 50, 115, 210;
            --color-4-start: 90, 205, 120;  /* GRÜN */
            --color-4-end: 55, 175, 90;
            --color-5-start: 250, 185, 75;  /* GOLD */
            --color-5-end: 235, 155, 40;
            --color-6-start: 250, 105, 165; /* PINK */
            --color-6-end: 225, 65, 135;
            --color-7-start: 160, 115, 245; /* LILA */
            --color-7-end: 125, 80, 215;
            
            /* ===== SEMANTIC COLORS ===== */
            --color-bg-dark: rgb(13, 13, 51);
            --color-surface: rgba(20, 25, 50, 0.45);
            --color-surface-light: rgba(40, 50, 80, 0.5);
            --color-text: #ffffff;
            --color-text-muted: rgba(255, 255, 255, 0.7);
            --color-text-subtle: rgba(255, 255, 255, 0.5);
            --color-accent: rgb(102, 126, 234);
            --color-accent-glow: rgba(102, 126, 234, 0.5);
            --color-success: rgba(100, 255, 100, 0.6);
            --color-error: rgba(255, 100, 100, 0.6);
            --color-warning: rgba(255, 200, 100, 0.6);
            
            /* ===== DYNAMIT SYSTEM ===== */
            --dynamite-color: 255, 107, 107;
            --dynamite-radius: 85px;
            
            /* ===== GLASS EFFECTS ===== */
            --glass-white-10: rgba(255, 255, 255, 0.1);
            --glass-white-20: rgba(255, 255, 255, 0.2);
            --glass-white-50: rgba(255, 255, 255, 0.5);
            --glass-black-30: rgba(0, 0, 0, 0.3);
            --glass-black-50: rgba(0, 0, 0, 0.5);
            --glass-black-80: rgba(0, 0, 0, 0.8);
            
            /* ===== SHADOWS ===== */
            --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.2);
            --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.3);
            --shadow-hard: 0 12px 40px rgba(0, 0, 0, 0.4);
            --shadow-glow: 0 0 20px var(--color-accent-glow);
            --glass-shadow-board: 
                inset 0 1px 2px 0 rgba(255, 255, 255, 0.5),
                inset 0 -5px 2px 0 rgba(0, 0, 0, 0.36),
                inset 5px 4px 7px 0 rgba(255, 255, 255, 0.5);
            --glass-shadow-mini: 
                inset 0 1px 1px 0 rgba(255, 255, 255, 0.5),
                inset 0 -2px 1px 0 rgba(0, 0, 0, 0.36),
                inset 2px 2px 3px 0 rgba(255, 255, 255, 0.5);
            
            /* ===== BORDER RADIUS ===== */
            --radius-xs: 4px;
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 16px;
            --radius-xl: 24px;
            --radius-pill: 9999px;
            
            /* ===== BLUR ===== */
            --blur-light: 8px;
            --blur-medium: 16px;
            --blur-heavy: 24px;
            
            /* ===== EASINGS ===== */
            --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
            --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
            --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
            --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
            
            /* ===== ANIMATION TIMINGS ===== */
            --anim-fast: 0.15s;
            --anim-normal: 0.3s;
            --anim-slow: 0.5s;
            --anim-bounce: 0.3s;
            --anim-clear: 0.4s;
            --anim-shake: 0.35s;
            --anim-glow: 0.6s;
            --anim-fade: 0.3s;
            
            /* ===== Z-INDEX SCALE ===== */
            --z-base: 1;
            --z-above: 10;
            --z-overlay: 100;
            --z-modal: 200;
            --z-toast: 300;
            --z-max: 9999;
            
            /* ===== MENU THEME (Light) ===== */
            --menu-bg: #ffffff;
            --menu-text: #333333;
            --menu-text-muted: #888888;
            --menu-text-subtle: #aaaaaa;
            --menu-border: #eeeeee;
            --menu-section-bg: transparent;
            
            /* Menu Button Colors */
            --btn-orange-start: #f39c12;
            --btn-orange-end: #e67e22;
            --btn-purple-start: #667eea;
            --btn-purple-end: #764ba2;
            --btn-teal-start: #1abc9c;
            --btn-teal-end: #16a085;
            --btn-pink-start: #ff5f9e;
            --btn-pink-end: #ff6b81;
            
            /* Toggle States */
            --toggle-on-bg: linear-gradient(135deg, var(--btn-purple-start), var(--btn-purple-end));
            --toggle-off-bg: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
            --toggle-off-text: #8b7ebd;
            --toggle-off-border: rgba(102, 126, 234, 0.2);
            /* Flat variants for Light Mode (fake gradient for smooth transitions) */
            --toggle-on-bg-flat: linear-gradient(135deg, var(--btn-purple-start), var(--btn-purple-start));
            --toggle-off-bg-flat: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(102, 126, 234, 0.08));
            
            /* Icon Colors */
            --icon-color: #f0f0f0;
            --icon-color-hover: #ffffff;
            --icon-color-muted: rgba(255, 255, 255, 0.6);
            --icon-size-sm: 22px;
            --icon-size-md: 28px;
        }

        /* ============================================
           ICON FONT - FreeBlocks Icons v1.0.0
           ============================================ */
        @font-face {
            font-family: 'FreeBlocks Icons';
            src: url('../assets/fonts/freeblocks-icons.woff2') format('woff2'),
                 url('../assets/fonts/freeblocks-icons.woff') format('woff');
            font-weight: normal;
            font-style: normal;
            font-display: block;
        }

        [class^="icon-"], [class*=" icon-"] {
            font-family: 'FreeBlocks Icons' !important;
            font-style: normal;
            font-weight: normal;
            font-variant: normal;
            text-transform: none;
            speak: never;
            line-height: 1;
            display: inline-block;
            text-decoration: inherit;
            text-rendering: optimizeLegibility;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* Icon Classes */
        .icon-add_to_home_screen:before { content: "\f11c"; }
        .icon-android:before { content: "\f11b"; }
        .icon-apple:before { content: "\f11a"; }
        .icon-celebrate:before { content: "\f119"; }
        .icon-checkbox:before { content: "\f118"; }
        .icon-chill:before { content: "\f117"; }
        .icon-classic:before { content: "\f116"; }
        .icon-copy:before { content: "\f115"; }
        .icon-crunch:before { content: "\f114"; }
        .icon-destroy:before { content: "\f113"; }
        .icon-donate:before { content: "\f112"; }
        .icon-dot_circle:before { content: "\f111"; }
        .icon-download:before { content: "\f110"; }
        .icon-dynamite:before { content: "\f10f"; }
        .icon-dynamite2:before { content: "\f10e"; }
        .icon-fancy:before { content: "\f10d"; }
        .icon-graphics:before { content: "\f10c"; }
        .icon-heart:before { content: "\f10b"; }
        .icon-highscore:before { content: "\f10a"; }
        .icon-music_off:before { content: "\f109"; }
        .icon-music_on:before { content: "\f108"; }
        .icon-new_game:before { content: "\f107"; }
        .icon-rocket_fast:before { content: "\f106"; }
        .icon-settings:before { content: "\f105"; }
        .icon-sfx_off:before { content: "\f104"; }
        .icon-sfx_on:before { content: "\f103"; }
        .icon-sharing:before { content: "\f102"; }
        .icon-undo:before { content: "\f101"; }

        /* HTML bekommt auch den Background für Safe Area */
        html {
            background: rgb(13, 13, 51);
            /* iOS Safari viewport fix */
            height: -webkit-fill-available;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            /* Hintergrundbild - vollflächig ohne Wiederholung */
            background: url('../assets/images/palmhg_q85.webp') no-repeat center center fixed;
            background-size: cover;
            /* Fallback Gradient falls Bild nicht lädt */
            background-color: rgb(13, 13, 51);
            /* iOS Safari: dvh mit Fallback */
            min-height: 100vh;
            min-height: 100dvh;
            min-height: -webkit-fill-available;
            display: flex;
            justify-content: center;
            align-items: center;
            /* Safe Area Insets für Notch/Dynamic Island und Home Indicator */
            padding: 10px;
            padding-top: max(10px, env(safe-area-inset-top));
            padding-bottom: max(10px, env(safe-area-inset-bottom));
            padding-left: max(10px, env(safe-area-inset-left));
            padding-right: max(10px, env(safe-area-inset-right));
            overflow: hidden;
            transition: background 0.3s ease;
        }

        /* ============================================
           MIKRO-ANIMATIONEN
           ============================================ */

        /* Screen Shake - für Hammer */
        @keyframes shakeMedium {
            0%, 100% { transform: translate(0, 0) rotate(0); }
            20% { transform: translate(-5px, 2px) rotate(-0.5deg); }
            40% { transform: translate(5px, -2px) rotate(0.5deg); }
            60% { transform: translate(-3px, 1px) rotate(-0.3deg); }
            80% { transform: translate(3px, -1px) rotate(0.3deg); }
        }

        .game-container.shaking {
            animation: shakeMedium var(--anim-shake) ease-out;
        }

        /* Combo Glow - Border Glow für 2x Combo */
        @keyframes comboGlowBorder {
            0% { 
                box-shadow: 0 0 5px 2px rgba(255, 200, 100, 0);
            }
            50% { 
                box-shadow: 0 0 30px 10px rgba(255, 200, 100, 0.8),
                            0 0 60px 20px rgba(255, 150, 50, 0.4);
            }
            100% { 
                box-shadow: 0 0 5px 2px rgba(255, 200, 100, 0);
            }
        }

        .game-board.glow-border {
            animation: comboGlowBorder var(--anim-glow) ease-out;
        }

        /* Rainbow Glow für 3+ Combo */
        @keyframes comboGlowRainbow {
            0% { 
                box-shadow: 0 0 20px 5px rgba(255, 100, 100, 0.6);
            }
            33% { 
                box-shadow: 0 0 30px 10px rgba(100, 255, 100, 0.6);
            }
            66% { 
                box-shadow: 0 0 30px 10px rgba(100, 100, 255, 0.6);
            }
            100% { 
                box-shadow: 0 0 20px 5px rgba(255, 100, 100, 0);
            }
        }

        .game-board.glow-rainbow {
            animation: comboGlowRainbow 0.8s ease-out;
        }

        body.dragging {
            cursor: grabbing !important;
        }

        body.dragging * {
            cursor: grabbing !important;
        }

        .game-container {
            max-width: 500px;
            width: 100%;
            padding: 0 20px;
        }

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

        /* Start Screen */
        .start-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #162035;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            padding: 20px;
        }

        .start-background {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            max-width: 500px;
            height: 100%;
            overflow: hidden;
        }

        .start-background video,
        .start-background img {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(1.0);
            min-width: 100%;
            min-height: 100%;
            width: auto;
            height: auto;
            object-fit: cover;
            transition: filter 1.2s ease, transform 1.2s ease;
        }
        
        /* Blurred state - nach Loading */
        .start-background.blurred video,
        .start-background.blurred img {
            filter: blur(35px);
            transform: translate(-50%, -50%) scale(1.15);
        }

        .start-background img {
            z-index: 1;
            /* Immer sichtbar als Fallback/Placeholder */
        }

        .start-background video {
            z-index: 2;
            /* Video liegt über dem Bild */
        }
        
        /* Difficulty Selection */
        .difficulty-selection {
            display: none;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 20px;
        }
        
        .difficulty-selection.visible {
            display: flex;
        }
        
        /* Staggered entrance animation */
        @keyframes slideInFromRight {
            from {
                opacity: 0;
                transform: translateX(60px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        .difficulty-selection.visible .difficulty-title {
            animation: slideInFromRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            animation-delay: 0.1s;
            opacity: 0;
        }
        
        .difficulty-selection.visible .difficulty-btn:nth-child(2) {
            animation: slideInFromRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            animation-delay: 0.15s;
            opacity: 0;
        }
        
        .difficulty-selection.visible .difficulty-btn:nth-child(3) {
            animation: slideInFromRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            animation-delay: 0.2s;
            opacity: 0;
        }
        
        .difficulty-selection.visible .difficulty-btn:nth-child(4) {
            animation: slideInFromRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            animation-delay: 0.25s;
            opacity: 0;
        }
        
        /* Exit animation - slide out to left */
        .difficulty-selection.exit .difficulty-title,
        .difficulty-selection.exit .difficulty-btn {
            animation: none !important;
            transition: transform 0.35s cubic-bezier(0.4, 0, 1, 1), opacity 0.25s ease;
            transform: translateX(-80px);
            opacity: 0;
        }
        
        .difficulty-selection.exit .difficulty-btn:nth-child(2) { transition-delay: 0.03s; }
        .difficulty-selection.exit .difficulty-btn:nth-child(3) { transition-delay: 0.06s; }
        .difficulty-selection.exit .difficulty-btn:nth-child(4) { transition-delay: 0.09s; }
        
        .difficulty-btn {
            padding: 15px 50px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.25);
            border-radius: 30px;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            min-width: 220px;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        }
        
        .difficulty-btn:hover {
            transform: translateY(-3px);
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
        }
        
        .difficulty-btn:active {
            transform: translateY(0);
        }
        
        .difficulty-btn.chill {
            border-color: rgba(129, 236, 236, 0.4);
        }
        .difficulty-btn.chill:hover {
            box-shadow: 0 8px 30px rgba(129, 236, 236, 0.3);
        }
        
        .difficulty-btn.classic {
            border-color: rgba(253, 203, 110, 0.4);
        }
        .difficulty-btn.classic:hover {
            box-shadow: 0 8px 30px rgba(253, 203, 110, 0.3);
        }
        
        .difficulty-btn.crunch {
            border-color: rgba(255, 118, 117, 0.4);
        }
        .difficulty-btn.crunch:hover {
            box-shadow: 0 8px 30px rgba(255, 118, 117, 0.3);
        }
        
        /* Difficulty Icons - Gelbe Smileys */
        .difficulty-icon {
            font-size: 28px;
            text-shadow: none;
            background: radial-gradient(circle, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0) 50%);
        }
        
        /* Chill: Gold - entspannt, sonnig */
        .icon-chill.difficulty-icon {
            color: rgb(var(--color-5-start));
        }
        
        /* Classic: Orange - zwischen Gold und Rot */
        .icon-classic.difficulty-icon {
            color: rgb(var(--color-5-end));
        }
        
        /* Crunch: Rot - intensiv, schwer */
        .icon-crunch.difficulty-icon {
            color: rgb(var(--color-1-start));
        }
        
        .difficulty-label {
            font-size: 18px;
        }

        .start-content {
            position: relative;
            z-index: 3;
            width: 100%;
            max-width: 500px;
            margin: 0 auto;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            padding: 40px 20px;
            padding-top: env(safe-area-inset-top, 40px);
            padding-bottom: env(safe-area-inset-bottom, 40px);
        }
        
        /* Settings Button oben rechts auf Startscreen */
        .start-settings-btn {
            position: absolute;
            top: 20px;
            top: max(20px, env(safe-area-inset-top));
            right: 20px;
            background: transparent;
            border: none;
            width: 44px;
            height: 44px;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all var(--anim-normal) ease;
            z-index: 100;
        }
        
        .start-settings-btn.visible {
            display: flex;
        }
        
        .start-settings-btn [class^="icon-"] {
            font-size: var(--icon-size-md);
            color: var(--icon-color);
            transition: all var(--anim-normal) ease;
        }
        
        .start-settings-btn:hover {
            background: transparent;
        }
        
        .start-settings-btn:hover [class^="icon-"] {
            color: var(--icon-color-hover);
            transform: rotate(30deg);
        }
        
        /* Logo oben */
        .start-logo {
            margin-top: 20px;
            width: 100%;
            max-width: 500px;
            text-align: center;
        }
        
        .start-logo img {
            width: 65%;
            max-width: 220px;
            height: auto;
            filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
        }
        
        /* Mitte: Difficulty Selection */
        .start-center {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }
        
        .difficulty-title {
            color: rgba(255, 255, 255, 0.9);
            font-size: 18px;
            font-weight: 500;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
            margin-bottom: 5px;
        }

        .start-bottom {
            text-align: center;
            width: 100%;
            max-width: 400px;
        }
        
        .start-version {
            margin-top: 15px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.4);
        }

        .loading-container {
            margin-bottom: 20px;
        }
        
        .loading-text {
            color: rgba(255, 255, 255, 0.8);
            font-size: 14px;
            margin-bottom: 10px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        }

        .loading-bar {
            width: 100%;
            height: 6px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 3px;
            margin: 0 auto 20px;
            overflow: hidden;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
        }

        .loading-progress {
            height: 100%;
            background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
            width: 0%;
            transition: width 0.3s ease;
            box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
        }

        .start-message {
            margin-top: 10px;
            animation: fadeIn 0.8s ease;
        }

        .start-message p {
            color: rgba(255, 255, 255, 0.9);
            font-size: 16px;
            margin: 8px 0;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
            font-weight: 500;
        }

        .donate-link {
            color: rgba(255, 234, 167, 0.9);
            text-decoration: none;
            font-size: 16px;
            transition: all 0.3s ease;
            display: inline-block;
            margin-top: 10px;
        }

        .donate-link:hover {
            color: #ffeaa7;
            transform: translateY(-2px);
            text-decoration: none;
        }

        .start-button {
            padding: 15px 50px;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
            backdrop-filter: blur(10px);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 30px;
            font-size: 18px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            animation: fadeIn 0.5s ease;
            box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
            margin-bottom: 15px;
        }

        .start-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
            background: linear-gradient(135deg, rgba(102, 126, 234, 1), rgba(118, 75, 162, 1));
        }

        .header {
            display: grid;
            grid-template-columns: 1fr 2fr 1fr;
            align-items: center;
            margin-bottom: 20px;
            padding: 0 10px;
            gap: 10px;
        }

        .highscore-display {
            color: #ffeaa7;
            font-size: 18px;
            font-weight: bold;
            text-align: left;
        }

        .score-display {
            text-align: center;
        }

        .score-label {
            font-size: 12px;
            opacity: 0.7;
            margin-bottom: 2px;
            color: #a0aec0;
        }

        .score-value {
            font-size: 32px;
            font-weight: bold;
            color: #fff;
            text-shadow: 0 2px 4px var(--glass-black-30);
            transition: transform 0.15s var(--ease-out-back), 
                        color 0.15s ease;
        }
        
        .score-value.score-pulse {
            animation: scorePulse 0.3s var(--ease-out-back);
        }
        
        @keyframes scorePulse {
            0% { transform: scale(1); color: #fff; }
            40% { transform: scale(1.15); color: #ffeb3b; }
            100% { transform: scale(1); color: #fff; }
        }

        .hamburger-menu {
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            justify-self: end;
            z-index: 100;
        }

        .hamburger-menu [class^="icon-"] {
            font-size: var(--icon-size-md);
            color: var(--icon-color);
            transition: all var(--anim-normal) ease;
        }
        
        .hamburger-menu:hover [class^="icon-"] {
            color: var(--icon-color-hover);
            transform: rotate(30deg);
        }

        .menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--glass-black-50);
            display: none;
            z-index: 2500;
            animation: fadeIn var(--anim-fade) ease;
            padding: 10px;
        }

        .menu-overlay.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .menu-content {
            background: var(--menu-bg);
            border-radius: var(--radius-xl);
            width: 100%;
            max-width: 500px;
            max-height: calc(100vh - 20px);
            max-height: calc(100dvh - 20px);
            display: flex;
            flex-direction: column;
            box-shadow: var(--shadow-hard);
            position: relative;
            animation: slideUp 0.3s var(--ease-out-expo);
            overflow: hidden;
        }
        
        @media (max-width: 420px) {
            .menu-overlay {
                padding: 0;
            }
            .menu-content {
                border-radius: 0;
                max-height: 100vh;
                max-height: 100dvh;
                max-width: 100%;
            }
        }

        /* Menu Header - fixed, nicht scrollen */
        .menu-header {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            padding-top: max(20px, env(safe-area-inset-top));
            position: relative;
            flex-shrink: 0;
            border-bottom: 1px solid var(--menu-border);
        }

        .menu-logo {
            text-align: center;
        }

        .menu-logo img {
            height: 45px;
            width: auto;
        }

        .menu-close {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            font-size: 32px;
            color: var(--menu-text-subtle);
            cursor: pointer;
            padding: 5px;
            line-height: 1;
            transition: color var(--anim-fast);
        }

        .menu-close:hover {
            color: var(--menu-text);
        }

        /* Menu Body - scrollbar */
        .menu-body {
            flex: 1;
            display: flex;
            flex-direction: column;
            padding: 0 24px 20px;
            padding-bottom: max(20px, env(safe-area-inset-bottom));
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        /* Menu Sections */
        .menu-section {
            padding: 20px 0;
            border-top: 1px solid var(--menu-border);
        }

        .menu-section:first-child {
            border-top: none;
            padding-top: 20px;
        }

        .menu-section-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--menu-text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
            text-align: center;
        }

        .menu-section-subtitle {
            font-size: 12px;
            color: var(--menu-text-subtle);
            text-align: center;
            margin-top: 10px;
        }

        /* New Game Button */
        .menu-btn-newgame {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            padding: 16px 24px;
            background: linear-gradient(135deg, var(--btn-orange-start), var(--btn-orange-end));
            color: white;
            border: none;
            border-radius: var(--radius-pill);
            font-size: 18px;
            font-weight: 700;
            cursor: pointer;
            transition: all var(--anim-normal) ease;
            box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
        }

        .menu-btn-newgame:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(243, 156, 18, 0.5);
        }

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

        .menu-btn-newgame [class^="icon-"] {
            font-size: 24px;
            animation: wiggle 2s ease-in-out infinite;
        }

        @keyframes wiggle {
            0%, 100% { transform: rotate(0deg); }
            25% { transform: rotate(-10deg); }
            75% { transform: rotate(10deg); }
        }

        /* Settings Row */
        .menu-settings-row {
            display: flex;
            gap: 10px;
            margin-bottom: 12px;
        }

        /* Toggle Buttons */
        .menu-btn-toggle {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 16px;
            border-radius: var(--radius-pill);
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all var(--anim-normal) ease;
        }

        .menu-btn-toggle [class^="icon-"] {
            font-size: 20px;
        }

        /* Toggle ON State */
        .menu-btn-toggle.on {
            background: var(--toggle-on-bg);
            color: white;
            border: 1px solid transparent;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
        }

        .menu-btn-toggle.on:hover {
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.45);
            transform: translateY(-1px);
        }

        /* Toggle OFF State - subtil aber erkennbar */
        .menu-btn-toggle.off {
            background: var(--toggle-off-bg);
            color: var(--toggle-off-text);
            border: 1px solid var(--toggle-off-border);
            box-shadow: none;
        }

        .menu-btn-toggle.off:hover {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
            border-color: rgba(102, 126, 234, 0.35);
        }

        /* Snappy Mode - flat buttons (fake gradient für smooth transition) */
        .light-mode .menu-btn-toggle.on {
            background: linear-gradient(135deg, var(--btn-purple-start), var(--btn-purple-start));
            box-shadow: none;
        }

        .light-mode .menu-btn-toggle.on:hover {
            box-shadow: none;
            transform: none;
        }

        .light-mode .menu-btn-toggle.off {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(102, 126, 234, 0.08));
        }

        .light-mode .menu-btn-toggle.off:hover {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(102, 126, 234, 0.12));
        }

        /* Subsection Labels */
        .menu-subsection-label {
            font-size: 11px;
            font-weight: 500;
            color: var(--menu-text-subtle);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
            margin-top: 16px;
        }

        .menu-subsection-label:first-of-type {
            margin-top: 0;
        }

        /* ============================================
           GRAPHICS 3-WAY PRESET TOGGLE
           ============================================ */
        .graphics-preset-toggle {
            position: relative;
            width: 100%;
            background: var(--toggle-off-bg);
            border: 1px solid var(--toggle-off-border);
            border-radius: var(--radius-pill);
            padding: 4px;
            display: flex;
            cursor: pointer;
            transition: all var(--anim-normal) ease;
        }

        .graphics-preset-toggle:hover {
            border-color: rgba(102, 126, 234, 0.35);
        }

        /* Sliding Pill */
        .graphics-preset-pill {
            position: absolute;
            top: 4px;
            left: 4px;
            width: calc(33.333% - 4px);
            height: calc(100% - 8px);
            background: var(--toggle-on-bg);
            border-radius: var(--radius-pill);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
            transition: left 0.35s var(--ease-out-expo),
                        background var(--anim-normal) ease,
                        box-shadow var(--anim-normal) ease;
            pointer-events: none;
        }

        /* Pill positions via data-active */
        .graphics-preset-toggle[data-active="full"] .graphics-preset-pill {
            left: 4px;
        }

        .graphics-preset-toggle[data-active="light"] .graphics-preset-pill {
            left: calc(33.333% + 2px);
        }

        .graphics-preset-toggle[data-active="custom"] .graphics-preset-pill {
            left: calc(66.666%);
        }

        /* Labels */
        .graphics-preset-label {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 12px 0;
            font-size: 15px;
            font-weight: 600;
            color: var(--toggle-off-text);
            transition: color 0.25s ease;
            position: relative;
            z-index: 1;
            user-select: none;
        }

        .graphics-preset-label.active {
            color: white;
        }

        /* ============================================
           CUSTOM OPTIONS PANEL (Collapsible)
           ============================================ */
        .custom-options-panel {
            overflow: hidden;
            max-height: 0;
            opacity: 0;
            transition:
                max-height 0.4s var(--ease-out-expo),
                opacity 0.3s var(--ease-in-out);
        }

        .custom-options-panel.open {
            max-height: 600px;
            opacity: 1;
        }

        .custom-options-inner {
            background: rgba(102, 126, 234, 0.04);
            border-radius: var(--radius-lg);
            padding: 16px;
            margin-top: 16px;
            border: 1px solid var(--toggle-off-border);
        }

        /* Custom Option Row */
        .custom-option {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid rgba(102, 126, 234, 0.1);
        }

        .custom-option:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .custom-option:first-child {
            padding-top: 0;
        }

        .custom-option-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .custom-option-label {
            font-size: 14px;
            font-weight: 600;
            color: var(--menu-text);
        }

        .custom-option-desc {
            font-size: 11px;
            color: var(--menu-text-muted);
        }

        /* ============================================
           iOS-STYLE SWITCH (checkbox-based)
           ============================================ */
        .ios-switch {
            position: relative;
            width: 44px;
            height: 26px;
            flex-shrink: 0;
            cursor: pointer;
        }

        .ios-switch input {
            opacity: 0;
            width: 0;
            height: 0;
            position: absolute;
        }

        .ios-switch-slider {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: #e0e0e0;
            border-radius: 13px;
            transition: background var(--anim-fast) var(--ease-in-out);
        }

        .ios-switch-slider::before {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 22px;
            height: 22px;
            background: white;
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
            transition: left var(--anim-fast) var(--ease-out-back);
        }

        .ios-switch input:checked + .ios-switch-slider {
            background: linear-gradient(135deg, var(--btn-purple-start), var(--btn-purple-end));
        }

        .ios-switch input:checked + .ios-switch-slider::before {
            left: 20px;
        }

        /* ============================================
           LIGHT MODE - Flat buttons, no gradients
           ============================================ */
        .light-mode .menu-btn-toggle.on {
            background: var(--toggle-on-bg-flat);
            box-shadow: none;
        }

        .light-mode .menu-btn-toggle.off {
            background: var(--toggle-off-bg-flat);
        }

        .light-mode .graphics-preset-pill {
            background: var(--toggle-on-bg-flat);
            box-shadow: none;
        }

        .light-mode .menu-btn-newgame {
            background: linear-gradient(135deg, var(--btn-orange-start), var(--btn-orange-start));
            box-shadow: none;
        }

        .light-mode .menu-btn-install {
            background: linear-gradient(135deg, var(--btn-teal-start), var(--btn-teal-start));
            box-shadow: none;
        }

        .light-mode .menu-btn-kofi {
            background: linear-gradient(135deg, var(--btn-pink-start), var(--btn-pink-start));
            box-shadow: none;
        }

        .light-mode .ios-switch input:checked + .ios-switch-slider {
            background: linear-gradient(135deg, var(--btn-purple-start), var(--btn-purple-start));
        }

        /* Install Button */
        .menu-btn-install {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            padding: 14px 24px;
            background: linear-gradient(135deg, var(--btn-teal-start), var(--btn-teal-end));
            color: white;
            border: none;
            border-radius: var(--radius-pill);
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all var(--anim-normal) ease;
            box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
        }

        .menu-btn-install:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(26, 188, 156, 0.5);
        }

        .menu-btn-install [class^="icon-"] {
            font-size: 20px;
        }

        /* Credits */
        .menu-credits {
            font-size: 13px;
            color: var(--menu-text-muted);
            text-align: center;
            line-height: 1.6;
            margin-bottom: 15px;
        }

        .menu-credits .icon-heart {
            color: #e74c3c;
            font-size: 12px;
        }

        /* Ko-fi Button */
        .menu-btn-kofi {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            padding: 14px 24px;
            background: linear-gradient(135deg, var(--btn-pink-start), var(--btn-pink-end));
            color: white;
            border: none;
            border-radius: var(--radius-pill);
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all var(--anim-normal) ease;
            box-shadow: 0 4px 15px rgba(255, 95, 158, 0.4);
        }

        .menu-btn-kofi:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 95, 158, 0.5);
        }

        .menu-btn-kofi [class^="icon-"] {
            font-size: 20px;
        }
        
        .menu-btn-debug {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            padding: 12px 20px;
            background: rgba(100, 100, 120, 0.3);
            color: rgba(255, 255, 255, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: var(--radius-pill);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all var(--anim-normal) ease;
        }
        
        .menu-btn-debug:hover {
            background: rgba(100, 100, 120, 0.5);
            color: rgba(255, 255, 255, 0.8);
        }
        
        .menu-btn-debug.active {
            background: rgba(80, 200, 120, 0.3);
            color: #50c878;
            border-color: rgba(80, 200, 120, 0.3);
        }
        
        .menu-btn-debug [class^="icon-"] {
            font-size: 16px;
        }

        /* Version Footer */
        .menu-version {
            text-align: center;
            font-size: 11px;
            color: var(--menu-text-subtle);
            padding: 15px 0;
            margin-top: auto;
        }

        .menu-version a {
            text-decoration: none;
        }

        /* ===== SNAPPY MODE - Alle Buttons flat ===== */
        .light-mode .menu-btn-newgame {
            background: linear-gradient(135deg, var(--btn-orange-start), var(--btn-orange-start));
            box-shadow: none;
        }
        .light-mode .menu-btn-newgame:hover {
            box-shadow: none;
            transform: none;
        }

        .light-mode .menu-btn-install {
            background: linear-gradient(135deg, var(--btn-teal-start), var(--btn-teal-start));
            box-shadow: none;
        }
        .light-mode .menu-btn-install:hover {
            box-shadow: none;
            transform: none;
        }

        .light-mode .menu-btn-kofi {
            background: linear-gradient(135deg, var(--btn-pink-start), var(--btn-pink-start));
            box-shadow: none;
        }
        .light-mode .menu-btn-kofi:hover {
            box-shadow: none;
            transform: none;
        }

        /* Legacy classes removed - using new structure */

        /* Install Overlay */
        .install-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            display: none;
            z-index: 1001;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .install-overlay.active {
            display: flex;
        }

        .install-content {
            background: linear-gradient(135deg, #3a4a6c, #2a3a5c);
            border-radius: 20px;
            padding: 30px;
            width: 100%;
            max-width: 400px;
            text-align: center;
            position: relative;
        }

        .install-close {
            position: absolute;
            top: 15px;
            right: 15px;
            background: transparent;
            border: none;
            font-size: 28px;
            color: #f0f0f0;
            cursor: pointer;
        }

        .install-content h3 {
            color: #ffeaa7;
            margin-bottom: 20px;
            font-size: 20px;
        }

        .install-content p {
            color: #e2e8f0;
            margin: 15px 0;
            line-height: 1.6;
        }

        .install-step {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 12px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            margin: 10px 0;
            text-align: left;
        }

        .install-step-icon {
            font-size: 24px;
            min-width: 40px;
            text-align: center;
        }

        .install-step-text {
            color: #e2e8f0;
            font-size: 14px;
        }

        .install-already {
            color: #68d391;
            font-size: 14px;
            margin-top: 15px;
        }

        .install-now-btn {
            width: 100%;
            padding: 15px 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            border-radius: 12px;
            color: white;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            margin: 15px 0;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .install-now-btn:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
        }

        .install-now-btn:active {
            transform: scale(0.98);
        }

        /* Ko-fi Overlay */
        .kofi-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            display: none;
            z-index: 1001;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .kofi-overlay.active {
            display: flex;
        }

        .kofi-content {
            background: linear-gradient(135deg, #3a4a6c, #2a3a5c);
            border-radius: 20px;
            padding: 20px;
            width: 100%;
            max-width: 500px;
            max-height: 80vh;
            overflow: auto;
            position: relative;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        }

        .kofi-close {
            position: absolute;
            top: 15px;
            right: 15px;
            background: rgba(0, 0, 0, 0.8);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            font-size: 24px;
            color: #ffffff;
            cursor: pointer;
            z-index: 10;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        
        .kofi-close:hover {
            background: rgba(0, 0, 0, 0.9);
            transform: scale(1.1);
        }
        
        .kofi-direct-link {
            display: inline-block;
            background: linear-gradient(135deg, #ff5e5b, #ff9966);
            color: white;
            text-decoration: none;
            padding: 15px 30px;
            border-radius: 12px;
            font-size: 18px;
            font-weight: 600;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        
        .kofi-direct-link:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 20px rgba(255, 94, 91, 0.4);
        }
        
        /* Game Content Entrance Animation */
        @keyframes gameElementSlideIn {
            from {
                opacity: 0;
                transform: translateX(60px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        .game-container.entering .game-logo {
            animation: gameElementSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            animation-delay: 0.05s;
            opacity: 0;
        }
        
        .game-container.entering .header {
            animation: gameElementSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            animation-delay: 0.1s;
            opacity: 0;
        }
        
        .game-container.entering .game-board {
            animation: gameElementSlideIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            animation-delay: 0.15s;
            opacity: 0;
        }
        
        .game-container.entering .block-preview-container {
            animation: gameElementSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            animation-delay: 0.2s;
            opacity: 0;
        }
        
        .game-container.entering .controls {
            animation: gameElementSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            animation-delay: 0.25s;
            opacity: 0;
        }

        /* Game Logo - BIGGER */
        .game-logo {
            text-align: center;
            margin-bottom: 15px;
        }

        .game-logo img {
            width: 65%;
            max-width: 220px;
            height: auto;
            object-fit: contain;
        }

        .game-board {
            position: relative;
            padding: 12px;
            /* LEICHTES TRANSLUZENTES BRETT */
            background: rgba(20, 25, 50, 0.45);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-radius: 18px;
            margin-bottom: 20px;
            aspect-ratio: 1;
            /* SUBTILER SCHATTEN - leicht und edel */
            box-shadow: 
                inset 0 1px 0 rgba(255, 255, 255, 0.08),
                0 8px 32px rgba(0, 0, 0, 0.25),
                0 2px 8px rgba(0, 0, 0, 0.15);
            /* Zarter Glasrand */
            border: 1px solid rgba(120, 160, 220, 0.15);
            transition: background 0.3s ease;
            box-sizing: border-box;
        }

        /* LAYER SYSTEM */
        .grid-layer, .stones-layer, .preview-layer {
            position: absolute;
            top: 12px;
            left: 12px;
            right: 12px;
            bottom: 12px;
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            grid-template-rows: repeat(8, 1fr);
            gap: 3px;
            pointer-events: none;
        }
        
        .grid-layer {
            z-index: 1;
            pointer-events: auto; /* Grid braucht Events für Hit-Detection */
        }
        
        .stones-layer {
            z-index: 2;
        }

        /* ============================================
           SMOKE CANVAS - Canvas Line-Clear Effekte
           Liegt ÜBER den Steinen (z-index: 10)
           ============================================ */
        #smokeCanvas {
            position: absolute;
            top: 12px;
            left: 12px;
            right: 12px;
            bottom: 12px;
            pointer-events: none;
            z-index: 10;
        }

        /* Grid-Zelle (statisch, ändert sich nie) */
        .grid-cell {
            background: rgba(60, 70, 120, 0.35);
            border-radius: 8px;
            border: 1px solid rgba(150, 140, 200, 0.15);
            box-shadow: 
                inset 1px 1px 4px rgba(255, 255, 255, 0.08),
                inset -1px -1px 4px rgba(0, 0, 0, 0.15);
            box-sizing: border-box;
        }

        /* Gesetzter Stein */
        .stone {
            border-radius: 8px;
            box-sizing: border-box;
            /* Keine clearing-transition mehr - APNG übernimmt den Effekt */
        }
        
        /* Clearing: Stein wird sofort unsichtbar, APNG zeigt den Effekt */
        .stone.clearing {
            visibility: hidden;
        }
        
        .stone.bouncing {
            animation: stoneBounce 0.3s ease;
        }
        
        /* Performance: Pseudo-Elemente folgen instant beim Bounce */
        .stone.bouncing::before,
        .stone.bouncing::after,
        .stone.bouncing .glint {
            transition: none !important;
        }
        
        /* ============================================
           DYNAMIT ZIELKREIS SYSTEM
           ============================================ */
        
        /* Container für Zielkreis-Elemente */
        .dynamite-target-area {
            position: fixed;
            pointer-events: none;
            z-index: 100;
            display: none;
        }
        
        .dynamite-target-area.active {
            display: block;
        }
        
        /* Radial Gradient Highlight - Screen Blend für Glow-Effekt */
        .dynamite-target-glow {
            position: absolute;
            left: 0;
            top: 0;
            width: 200px;
            height: 200px;
            transform: translate(-50%, -50%);
            background: radial-gradient(
                circle,
                rgba(var(--dynamite-color), 0.35) 0%,
                rgba(var(--dynamite-color), 0.2) 30%,
                rgba(var(--dynamite-color), 0.1) 50%,
                transparent 70%
            );
            mix-blend-mode: screen;
            pointer-events: none;
        }
        
        /* Äußerer Kreis - folgt elliptischer Umlaufbahn */
        .dynamite-target-circle {
            position: absolute;
            width: 150px;
            height: 150px;
            left: 0;
            top: 0;
            /* Zentrierung via margin, nicht transform (kollidiert mit offset-path) */
            margin-left: -75px;
            margin-top: -75px;
            border: 2px dashed rgba(var(--dynamite-color), 0.6);
            border-radius: 50%;
            box-shadow: 0 0 15px rgba(var(--dynamite-color), 0.2);
            
            /* Elliptische Umlaufbahn für organisches "Eiern" */
            offset-path: ellipse(12px 8px at 50% 50%);
            offset-rotate: 0deg;
            animation: 
                dynamiteOrbitPath 4s linear infinite,
                dynamiteMorphShape 6s ease-in-out infinite;
        }
        
        /* Kontinuierliche Bewegung entlang des elliptischen Pfads */
        @keyframes dynamiteOrbitPath {
            0% { offset-distance: 0%; }
            100% { offset-distance: 100%; }
        }
        
        /* Form-Morphing - langsamer, unabhängiger Rhythmus */
        @keyframes dynamiteMorphShape {
            0%, 100% { border-radius: 48% 52% 50% 50%; }
            25% { border-radius: 50% 48% 52% 50%; }
            50% { border-radius: 52% 50% 48% 52%; }
            75% { border-radius: 50% 52% 50% 48%; }
        }
        
        /* Dynamit Icon in der Mitte */
        .dynamite-target-icon {
            position: absolute;
            left: 0;
            top: 0;
            width: 36px;
            height: 36px;
            transform: translate(-50%, -50%);
            display: flex;
            align-items: center;
            justify-content: center;
            animation: dynamiteIconBreathe 2.5s ease-in-out infinite;
            filter: drop-shadow(0 0 12px rgba(var(--dynamite-color), 0.8));
        }
        
        .dynamite-target-icon [class^="icon-"] {
            font-size: 32px;
            color: rgba(var(--dynamite-color), 1);
        }
        
        @keyframes dynamiteIconBreathe {
            0%, 100% { transform: translate(-50%, -50%) scale(1); }
            50% { transform: translate(-50%, -50%) scale(1.1); }
        }
        
        /* Explosion Canvas Layer */
        #explosionCanvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 200;
        }
        
        /* Snappy Mode: Reduzierte Animationen */
        .light-mode .dynamite-target-circle {
            animation: none;
            border-radius: 50%;
            offset-path: none;
            /* Ohne offset-path brauchen wir transform für Zentrierung */
            transform: translate(-50%, -50%);
            margin-left: 0;
            margin-top: 0;
        }
        
        .light-mode .dynamite-target-icon {
            animation: none;
        }
        
        @keyframes stoneBounce {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.15); }
        }

        .block-preview-container {
            display: flex;
            justify-content: space-around;
            gap: 10px;
            margin-bottom: 20px;
            min-height: 100px;
            height: 100px;
            max-height: 100px;
            align-items: center;
            flex-wrap: nowrap;
            padding: 10px;
            border-radius: 15px;
            background: rgba(20, 25, 50, 0.45);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            overflow: hidden;
            position: relative;
            z-index: 1;
        }

        .block-preview {
            padding: 10px;
            cursor: grab;
            transition: opacity 0.3s ease;
            touch-action: none;
            position: relative;
            min-width: 70px;
            min-height: 70px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .block-preview::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            min-width: 70px;
            min-height: 70px;
            z-index: 1;
        }

        .block-preview:hover {
            opacity: 0.9;
        }

        .block-preview:active {
            cursor: grabbing;
            opacity: 0.8;
        }

        .block-preview.dragging {
            opacity: 0.5;
            cursor: grabbing;
        }

        .block-preview.used {
            display: none;
        }

        .mini-grid {
            display: grid;
            gap: 2px;
            pointer-events: none;
            position: relative;
            z-index: 2;
        }

        .mini-cell {
            width: 15px;
            height: 15px;
            border-radius: 3px;
        }

        .controls {
            display: flex;
            gap: 10px;
            justify-content: center;
            padding: 10px 0;
            margin-top: 5px;
        }

        .btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px 24px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 25px;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 
                0 6px 20px rgba(0, 0, 0, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
            position: relative;
            overflow: visible;
            flex: 1;
            min-width: 0;
            white-space: nowrap;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }
        
        .btn [class^="icon-"] {
            font-size: 18px;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 
                0 10px 30px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
        }

        @media (max-width: 400px) {
            .btn {
                padding: 12px 18px;
                font-size: 13px;
            }
            
            .controls {
                gap: 8px;
            }
        }

        .btn:before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.5s, height 0.5s;
        }

        .btn:active:before {
            width: 200%;
            height: 200%;
        }

        .btn-undo {
            background: linear-gradient(135deg, 
                rgba(137, 247, 254, 0.85), 
                rgba(102, 166, 255, 0.85));
            color: white;
        }

        .btn-undo:hover {
            background: linear-gradient(135deg, 
                rgba(137, 247, 254, 1), 
                rgba(102, 166, 255, 1));
            box-shadow: 0 8px 25px rgba(102, 166, 255, 0.4);
        }

        .btn-undo:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            background: rgba(150, 150, 150, 0.5);
            transform: none !important;
            box-shadow: none !important;
        }

        .btn-hammer {
            background: linear-gradient(135deg, 
                rgba(250, 112, 154, 0.85), 
                rgba(254, 225, 64, 0.85));
            color: white;
            position: relative;
        }

        .btn-hammer:hover {
            background: linear-gradient(135deg, 
                rgba(250, 112, 154, 1), 
                rgba(254, 225, 64, 1));
            box-shadow: 0 8px 25px rgba(250, 112, 154, 0.4);
        }

        .btn-hammer.ready {
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.85; }
        }

        .btn-hammer:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            background: rgba(150, 150, 150, 0.5);
            transform: none !important;
            box-shadow: none !important;
        }

        .hammer-count {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #ff3b3b;
            color: white;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
            z-index: 10;
        }

        .btn-new-game {
            background: linear-gradient(135deg, #f093fb, #f5576c);
            color: white;
        }

        .game-over {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            animation: fadeIn 0.3s ease;
        }

        .game-over-content {
            background: white;
            padding: 30px;
            border-radius: 20px;
            text-align: center;
            max-width: 350px;
            width: 90%;
            animation: slideUp 0.5s ease;
        }

        .game-over-content .btn {
            margin: 10px 5px;
            width: calc(100% - 10px);
        }

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

        .game-over h2 {
            color: #f5576c;
            margin-bottom: 20px;
            font-size: 32px;
        }

        .game-over p {
            margin: 10px 0;
            font-size: 18px;
            color: #666;
        }

        .game-over .final-score {
            font-size: 36px;
            font-weight: bold;
            color: #667eea;
            margin: 20px 0;
        }

        /* ============================================
           TINTED GLASS STYLE 
           Vereinheitlicht mit CSS Variables
           ============================================ */
        
        /* Board Cell & Stone Farben */
        .color-1, .stone.color-1 { background: linear-gradient(145deg, rgba(var(--color-1-start), 0.55), rgba(var(--color-1-end), 0.5)) !important; }
        .color-2, .stone.color-2 { background: linear-gradient(145deg, rgba(var(--color-2-start), 0.55), rgba(var(--color-2-end), 0.5)) !important; }
        .color-3, .stone.color-3 { background: linear-gradient(145deg, rgba(var(--color-3-start), 0.55), rgba(var(--color-3-end), 0.5)) !important; }
        .color-4, .stone.color-4 { background: linear-gradient(145deg, rgba(var(--color-4-start), 0.55), rgba(var(--color-4-end), 0.5)) !important; }
        .color-5, .stone.color-5 { background: linear-gradient(145deg, rgba(var(--color-5-start), 0.55), rgba(var(--color-5-end), 0.5)) !important; }
        .color-6, .stone.color-6 { background: linear-gradient(145deg, rgba(var(--color-6-start), 0.55), rgba(var(--color-6-end), 0.5)) !important; }
        .color-7, .stone.color-7 { background: linear-gradient(145deg, rgba(var(--color-7-start), 0.55), rgba(var(--color-7-end), 0.5)) !important; }
        
        /* Stone shadows */
        .stone.color-1, .stone.color-2, .stone.color-3, .stone.color-4,
        .stone.color-5, .stone.color-6, .stone.color-7 {
            box-shadow: var(--glass-shadow-board);
        }
        
        /* Mini-Cells (Block-Auswahl unten) - gemeinsamer Shadow */
        .mini-cell.color-1, .mini-cell.color-2, .mini-cell.color-3,
        .mini-cell.color-4, .mini-cell.color-5, .mini-cell.color-6, .mini-cell.color-7 {
            border-radius: 3px !important;
            box-shadow: var(--glass-shadow-mini) !important;
        }
        
        /* Mini-Cell Farben */
        .mini-cell.color-1 { background: linear-gradient(145deg, rgba(var(--color-1-start), 0.6), rgba(var(--color-1-end), 0.55)) !important; }
        .mini-cell.color-2 { background: linear-gradient(145deg, rgba(var(--color-2-start), 0.6), rgba(var(--color-2-end), 0.55)) !important; }
        .mini-cell.color-3 { background: linear-gradient(145deg, rgba(var(--color-3-start), 0.6), rgba(var(--color-3-end), 0.55)) !important; }
        .mini-cell.color-4 { background: linear-gradient(145deg, rgba(var(--color-4-start), 0.6), rgba(var(--color-4-end), 0.55)) !important; }
        .mini-cell.color-5 { background: linear-gradient(145deg, rgba(var(--color-5-start), 0.6), rgba(var(--color-5-end), 0.55)) !important; }
        .mini-cell.color-6 { background: linear-gradient(145deg, rgba(var(--color-6-start), 0.6), rgba(var(--color-6-end), 0.55)) !important; }
        .mini-cell.color-7 { background: linear-gradient(145deg, rgba(var(--color-7-start), 0.6), rgba(var(--color-7-end), 0.55)) !important; }

        .hammer-effect {
            position: fixed;
            pointer-events: none;
            z-index: 999;
            animation: hammerSmash 0.6s ease-out;
        }

        .hammer-overlay {
            transition: transform 0.2s ease, opacity 0.3s ease;
            background: linear-gradient(135deg, rgba(50, 50, 50, 0.9), rgba(100, 0, 0, 0.8));
        }

        @keyframes hammerSmash {
            0% { 
                transform: rotate(-45deg) scale(0.5);
                opacity: 0;
            }
            50% {
                transform: rotate(0deg) scale(1.5);
                opacity: 1;
            }
            100% {
                transform: rotate(45deg) scale(0);
                opacity: 0;
            }
        }

        .combo-indicator {
            position: fixed;
            top: 45%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 28px;
            font-weight: bold;
            color: #fff;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
            pointer-events: none;
            z-index: 999;
            animation: fadeInOut 0.8s ease-out forwards;
        }
        
        .combo-indicator-long {
            position: fixed;
            top: 45%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 32px;
            font-weight: bold;
            color: #ffeaa7;
            text-shadow: 0 2px 20px rgba(255, 234, 167, 0.5);
            pointer-events: none;
            z-index: 999;
            animation: fadeInOutLong 1.5s ease-out forwards;
        }
        
        @keyframes fadeInOutLong {
            0% {
                opacity: 0;
                transform: translate(-50%, -45%) scale(0.9);
            }
            10% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1.05);
            }
            70% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
            100% {
                opacity: 0;
                transform: translate(-50%, -55%) scale(0.95);
            }
        }
        
        /* Points Popup - floating score indicator */
        .points-popup {
            position: fixed;
            font-size: 24px;
            font-weight: bold;
            color: #4ade80;
            text-shadow: 
                0 2px 10px rgba(74, 222, 128, 0.5),
                0 0 20px rgba(74, 222, 128, 0.3);
            pointer-events: none;
            z-index: 500;
            animation: pointsFloat 1.4s var(--ease-out-expo) forwards;
        }
        
        @keyframes pointsFloat {
            0% {
                opacity: 1;
                transform: translateY(0) scale(0.8);
            }
            15% {
                opacity: 1;
                transform: translateY(-10px) scale(1.1);
            }
            60% {
                opacity: 1;
                transform: translateY(-35px) scale(1);
            }
            100% {
                opacity: 0;
                transform: translateY(-60px) scale(1);
            }
        }

        @keyframes fadeInOut {
            0% {
                opacity: 0;
                transform: translate(-50%, -45%) scale(0.9);
            }
            15% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1.05);
            }
            70% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
            100% {
                opacity: 0;
                transform: translate(-50%, -55%) scale(0.95);
            }
        }

        /* ============================================
           MOBILE TEST MODE
           ============================================ */
        
        /* Test Bar - positioniert von unten */
        .test-bar {
            position: fixed;
            left: 0;
            bottom: 70px;
            display: flex;
            align-items: stretch;
            z-index: 100;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .test-bar.collapsed {
            transform: translateX(calc(-100% + 44px));
        }

        .test-bar-toggle {
            width: 44px;
            min-height: 120px;
            background: rgba(74, 144, 226, 0.95);
            border: none;
            border-radius: 0 12px 12px 0;
            color: white;
            font-size: 20px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s ease;
            flex-shrink: 0;
        }

        .test-bar-toggle:hover {
            background: rgba(74, 144, 226, 1);
        }

        .test-bar-toggle::after {
            content: '>';
            transition: transform 0.3s ease;
        }

        .test-bar.collapsed .test-bar-toggle::after {
            transform: rotate(0deg);
        }

        .test-bar:not(.collapsed) .test-bar-toggle::after {
            transform: rotate(180deg);
        }

        .test-bar-content {
            background: rgba(74, 144, 226, 0.95);
            padding: 10px 15px;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 12px;
            border-radius: 0 0 12px 0;
        }

        .test-block {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 6px;
            cursor: grab;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            transition: transform 0.15s ease, background 0.15s ease;
        }

        .test-block:hover {
            transform: scale(1.1);
            background: rgba(255, 255, 255, 0.2);
        }

        .test-block:active {
            cursor: grabbing;
        }

        .test-block .mini-grid {
            display: grid;
            gap: 2px;
        }

        .test-block .mini-cell {
            width: 12px;
            height: 12px;
            border-radius: 2px;
            background: white;
            box-shadow: var(--glass-shadow-board);
        }

        /* Versionsnummer im Menü - Test Mode Active State */
        .menu-version.test-active {
            background: rgba(74, 144, 226, 0.15);
            color: rgb(74, 144, 226);
            font-weight: 600;
            padding: 4px 8px;
            border-radius: 4px;
        }

        /* ============================================
           POWERUP FLYING ANIMATION
           ============================================ */
        
        /* Flying Powerup Icon */
        .flying-powerup {
            position: fixed;
            pointer-events: none;
            z-index: 1000;
            font-size: 48px;
            opacity: 0;
        }

        .flying-powerup.dynamite {
            color: rgb(var(--dynamite-color));
            filter: drop-shadow(0 4px 25px rgba(0, 0, 0, 0.5));
        }

        .flying-powerup.undo {
            color: rgb(137, 247, 254);
            filter: drop-shadow(0 4px 25px rgba(0, 0, 0, 0.5));
        }

        /* Burst Ring - erscheint am Startpunkt */
        .burst-ring {
            position: fixed;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            pointer-events: none;
            z-index: 999;
            transform: translate(-50%, -50%) scale(0);
        }

        .burst-ring.dynamite {
            border: 3px solid rgba(var(--dynamite-color), 0.8);
        }

        .burst-ring.undo {
            border: 3px solid rgba(137, 247, 254, 0.8);
        }

        .burst-ring.animate {
            animation: burstExpand 0.5s ease-out forwards;
        }

        @keyframes burstExpand {
            0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
            100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
        }

        /* Button Receiving Animation - Glow wenn Icon ankommt */
        .btn.receiving {
            animation: buttonReceive 0.5s ease-out;
        }

        @keyframes buttonReceive {
            0% { filter: brightness(1); }
            50% { filter: brightness(1.5); }
            100% { filter: brightness(1); }
        }

        /* Counter Pop - Badge springt kurz größer */
        .undo-count.pop, .hammer-count.pop {
            animation: counterPop 0.4s ease-out;
        }

        @keyframes counterPop {
            0% { transform: scale(1); }
            50% { transform: scale(1.5); }
            100% { transform: scale(1); }
        }

        @media (max-width: 480px) {
            .score-container {
                font-size: 16px;
                padding: 10px 15px;
                min-width: 120px;
            }

            .score-value {
                font-size: 20px;
            }

            .game-board {
                padding: 10px;
            }

            .btn {
                padding: 10px 20px;
                font-size: 14px;
            }

            .mini-cell {
                width: 12px;
                height: 12px;
            }
        }

        /* Ghost ausblenden für Performance-Test */
        body.perf-no-ghost .dragging-ghost {
            opacity: 0 !important;
            visibility: hidden !important;
        }
        
        .dragging-ghost {
            position: fixed;
            pointer-events: none;
            z-index: 1000;
            /* KEIN opacity hier - das kann backdrop-filter auch stören */
            transition: opacity 0.1s ease;
        }

        /* Drag Ghost - Schatten auf dem Container, NICHT auf ghost-grid */
        .dragging-ghost .ghost-grid {
            /* KEIN filter hier! Das blockiert backdrop-filter auf children */
            transition: filter 0.1s ease;
        }

        .dragging-ghost .ghost-cell {
            transition: all 0.1s ease;
            /* KEIN blur auf leere Zellen! */
        }
        
        /* Blur NUR auf gefüllte Ghost-Cells */
        .dragging-ghost .ghost-cell.color-1,
        .dragging-ghost .ghost-cell.color-2,
        .dragging-ghost .ghost-cell.color-3,
        .dragging-ghost .ghost-cell.color-4,
        .dragging-ghost .ghost-cell.color-5,
        .dragging-ghost .ghost-cell.color-6,
        .dragging-ghost .ghost-cell.color-7 {
            backdrop-filter: blur(3px);
            -webkit-backdrop-filter: blur(3px);
            box-shadow: var(--glass-shadow-board);
        }
        
        /* Ghost-Cell Farben (leicht transparenter) */
        .dragging-ghost .ghost-cell.color-1 { background: linear-gradient(145deg, rgba(var(--color-1-start), 0.5), rgba(var(--color-1-end), 0.45)) !important; }
        .dragging-ghost .ghost-cell.color-2 { background: linear-gradient(145deg, rgba(var(--color-2-start), 0.5), rgba(var(--color-2-end), 0.45)) !important; }
        .dragging-ghost .ghost-cell.color-3 { background: linear-gradient(145deg, rgba(var(--color-3-start), 0.5), rgba(var(--color-3-end), 0.45)) !important; }
        .dragging-ghost .ghost-cell.color-4 { background: linear-gradient(145deg, rgba(var(--color-4-start), 0.5), rgba(var(--color-4-end), 0.45)) !important; }
        .dragging-ghost .ghost-cell.color-5 { background: linear-gradient(145deg, rgba(var(--color-5-start), 0.5), rgba(var(--color-5-end), 0.45)) !important; }
        .dragging-ghost .ghost-cell.color-6 { background: linear-gradient(145deg, rgba(var(--color-6-start), 0.5), rgba(var(--color-6-end), 0.45)) !important; }
        .dragging-ghost .ghost-cell.color-7 { background: linear-gradient(145deg, rgba(var(--color-7-start), 0.5), rgba(var(--color-7-end), 0.45)) !important; }

        .undo-count {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #4ecdc4;
            color: white;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
            z-index: 10;
        }

        /* ============================================
           PERFORMANCE MODE CSS OVERRIDES
           Benutzer-konfigurierbare Grafik-Einstellungen
           ============================================ */
        
        /* === Hintergrund-Animation aus === */
        body.perf-no-aurora .aurora-container {
            display: none !important;
        }
        
        /* === Glas-Effekte aus (blur) === */
        body.perf-no-blur .game-board,
        body.perf-no-blur .block-preview-container,
        body.perf-no-blur .score-display,
        body.perf-no-blur .powerup-container,
        body.perf-no-blur .game-over-overlay,
        body.perf-no-blur .game-over-content,
        body.perf-no-blur .install-overlay,
        body.perf-no-blur .dragging-ghost .ghost-cell {
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
        }
        
        /* Ersatz-Hintergrund wenn blur aus */
        body.perf-no-blur .game-board {
            background: rgba(0, 0, 20, 0.85) !important;
        }
        body.perf-no-blur .game-over-content {
            background: rgba(20, 20, 40, 0.98) !important;
        }
        /* Menu bleibt immer hell - nicht vom Performance Mode betroffen */
        
        /* === ANIMATION SYSTEM - Granulare Kontrolle === */

        /* Glow aus */
        body.perf-no-glow .game-board.glow-border,
        body.perf-no-glow .game-board.glow-rainbow {
            animation: none !important;
            box-shadow: none !important;
        }
        
        /* Text-Effekte aus */
        body.perf-no-text .points-popup,
        body.perf-no-text .combo-indicator,
        body.perf-no-text .flying-powerup,
        body.perf-no-text .burst-ring {
            display: none !important;
        }
        
        /* Shake aus */
        body.perf-no-shake .game-container.shaking {
            animation: none !important;
            transform: none !important;
        }
        
        /* Keyframes aus (Bounce, Slide, etc.) */
        body.perf-no-keyframes .stone.bouncing,
        body.perf-no-keyframes .menu-btn-newgame {
            animation: none !important;
        }
        body.perf-no-keyframes .stone.bouncing {
            transform: none !important;
        }
        
        /* === Legacy: perf-no-animations (alle Animationen aus) === */
        body.perf-no-animations .stone.bouncing,
        body.perf-no-animations .stone.clearing,
        body.perf-no-animations .game-container.shaking,
        body.perf-no-animations .game-board.glow-border,
        body.perf-no-animations .game-board.glow-rainbow,
        body.perf-no-animations .combo-indicator,
        body.perf-no-animations .points-popup,
        body.perf-no-animations .flying-powerup,
        body.perf-no-animations .burst-ring {
            animation: none !important;
            transition: none !important;
        }
        
        /* Clear-Effekt ohne Animation: sofort ausblenden */
        body.perf-no-animations .stone.clearing {
            visibility: hidden !important;
        }
        
        /* Bounce ohne Animation */
        body.perf-no-animations .stone.bouncing {
            transform: none !important;
        }
        
        /* Ghost ohne Transition */
        body.perf-no-animations .dragging-ghost,
        body.perf-no-animations .dragging-ghost .ghost-cell {
            transition: none !important;
        }
        
        /* === 3D-Effekte aus (Schatten auf Blöcken) === */
        body.perf-no-shadows .stone.color-1,
        body.perf-no-shadows .stone.color-2,
        body.perf-no-shadows .stone.color-3,
        body.perf-no-shadows .stone.color-4,
        body.perf-no-shadows .stone.color-5,
        body.perf-no-shadows .stone.color-6,
        body.perf-no-shadows .stone.color-7,
        body.perf-no-shadows .mini-cell,
        body.perf-no-shadows .ghost-cell {
            box-shadow: none !important;
        }
        
        /* === Gradient-Hintergrund aus === */
        body.perf-no-gradient {
            background: #0a0a1a !important;
        }

        /* ============================================
           GLASS MODE - Tinted Glass Block Style
           ============================================ */
        
        /* Glass Block Base Styles (nur gefüllte Zellen mit Farbklasse) */
        body.glass-mode .stone,
        body.glass-mode .ghost-cell[class*="color-"],
        body.glass-mode .mini-cell[class*="color-"] {
            --highlight-color: 255, 255, 255;
            position: relative;
            
            /* BG-Gradient: Mitte transparenter, außen voller */
            background: radial-gradient(
                ellipse 100% 100% at 50% 50%,
                rgba(var(--block-color), 0.32) 0%,
                rgba(var(--block-color), 0.40) 35%,
                rgba(var(--block-color), 0.48) 70%,
                rgba(var(--block-color), 0.48) 100%
            ) !important;
            
            box-shadow: 
                0 6px 20px rgba(var(--block-color), 0.5),
                0 2px 8px rgba(var(--block-color), 0.3),
                inset 0 12px 25px rgba(var(--highlight-color), 0.3),
                inset 0 -10px 25px rgba(0, 0, 0, 0.35) !important;
            
            transition: background 0.3s ease, box-shadow 0.3s ease;
        }
        
        /* Glass Block ::before - Bevels & Bottom Glow (nur gefüllte Zellen) */
        body.glass-mode .stone::before,
        body.glass-mode .ghost-cell[class*="color-"]::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: 
                linear-gradient(90deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.15) 10%, transparent 25%),
                linear-gradient(270deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.12) 10%, transparent 25%),
                radial-gradient(ellipse 150% 100% at 50% 140%, rgba(var(--block-color), 1) 0%, rgba(var(--block-color), 0.5) 30%, transparent 55%),
                radial-gradient(ellipse 80% 60% at 30% 120%, rgba(var(--highlight-color), 0.4) 0%, transparent 50%);
            pointer-events: none;
        }
        
        /* Glass Block ::after - Top Highlight & Border (nur gefüllte Zellen) */
        body.glass-mode .stone::after,
        body.glass-mode .ghost-cell[class*="color-"]::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            border: 1px solid rgba(var(--highlight-color), 0.5);
            border-bottom-color: rgba(var(--block-color), 0.1);
            border-right-color: rgba(var(--block-color), 0.15);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.15) 3%, transparent 15%);
            pointer-events: none;
        }
        
        /* Glass Block Glint - Glanzpunkt oben rechts (nur gefüllte Zellen) */
        body.glass-mode .stone .glint,
        body.glass-mode .ghost-cell[class*="color-"] .glint {
            position: absolute;
            top: 4%;
            right: 6%;
            width: 15%;
            height: 10%;
            background: radial-gradient(
                ellipse at center,
                rgba(255, 255, 255, 0.8) 0%,
                rgba(255, 255, 255, 0.3) 40%,
                transparent 70%
            );
            border-radius: 50%;
            filter: blur(0.5px);
            pointer-events: none;
            z-index: 2;
        }
        
        /* Ohne Glass Mode: Glint ausblenden */
        body:not(.glass-mode) .stone .glint,
        body:not(.glass-mode) .ghost-cell[class*="color-"] .glint {
            display: none;
        }
        
        /* Glass Block Dragging State - niedrigere Opacity + Blur (nur gefüllte Zellen) */
        body.glass-mode .dragging-ghost .ghost-cell[class*="color-"] {
            backdrop-filter: blur(3px);
            -webkit-backdrop-filter: blur(3px);
            background: radial-gradient(
                ellipse 100% 100% at 50% 50%,
                rgba(var(--block-color), 0.12) 0%,
                rgba(var(--block-color), 0.16) 35%,
                rgba(var(--block-color), 0.20) 70%,
                rgba(var(--block-color), 0.20) 100%
            ) !important;
        }
        
        /* Glass Mode Color Mapping */
        body.glass-mode .stone.color-1,
        body.glass-mode .ghost-cell.color-1 { --block-color: var(--color-1-start); }
        body.glass-mode .stone.color-2,
        body.glass-mode .ghost-cell.color-2 { --block-color: var(--color-2-start); }
        body.glass-mode .stone.color-3,
        body.glass-mode .ghost-cell.color-3 { --block-color: var(--color-3-start); }
        body.glass-mode .stone.color-4,
        body.glass-mode .ghost-cell.color-4 { --block-color: var(--color-4-start); }
        body.glass-mode .stone.color-5,
        body.glass-mode .ghost-cell.color-5 { --block-color: var(--color-5-start); }
        body.glass-mode .stone.color-6,
        body.glass-mode .ghost-cell.color-6 { --block-color: var(--color-6-start); }
        body.glass-mode .stone.color-7,
        body.glass-mode .ghost-cell.color-7 { --block-color: var(--color-7-start); }
        
        /* Mini-Cells in Glass Mode - vereinfachter Style ohne Pseudo-Elemente */
        body.glass-mode .mini-cell.color-1,
        body.glass-mode .mini-cell.color-2,
        body.glass-mode .mini-cell.color-3,
        body.glass-mode .mini-cell.color-4,
        body.glass-mode .mini-cell.color-5,
        body.glass-mode .mini-cell.color-6,
        body.glass-mode .mini-cell.color-7 {
            background: rgba(var(--block-color), 0.55) !important;
            box-shadow: 
                0 0 3px rgba(var(--block-color), 0.7),
                inset 0 1px 6px rgba(255, 255, 255, 0.5),
                0 3px 8px rgba(0, 0, 0, 0.95) !important;
            border: 1px solid rgba(255, 255, 255, 0.15);
        }
        
        /* Mini-Cell Farb-Mapping */
        body.glass-mode .mini-cell.color-1 { --block-color: var(--color-1-start); }
        body.glass-mode .mini-cell.color-2 { --block-color: var(--color-2-start); }
        body.glass-mode .mini-cell.color-3 { --block-color: var(--color-3-start); }
        body.glass-mode .mini-cell.color-4 { --block-color: var(--color-4-start); }
        body.glass-mode .mini-cell.color-5 { --block-color: var(--color-5-start); }
        body.glass-mode .mini-cell.color-6 { --block-color: var(--color-6-start); }
        body.glass-mode .mini-cell.color-7 { --block-color: var(--color-7-start); }
        
        /* Mini-Cells: Keine Pseudo-Elemente im Glass Mode */
        body.glass-mode .mini-cell::before,
        body.glass-mode .mini-cell::after {
            display: none;
        }
        

        /* ============================================
           AURORA LIGHTS - DEAKTIVIERT
           Inspiriert von CodePen amyth91/DzYGaK
           ============================================ */
        /*
        .aurora-container {
            position: fixed;
            bottom: 80px;
            left: 0;
            right: 0;
            width: 100%;
            pointer-events: none;
            z-index: 0;
        }

        .aurora-container section {
            border-radius: 50%;
            height: 0px;
            width: 100%;
            position: relative;
            margin: auto;
            background: transparent;
        }

        #aurora-one {
            animation: auroraOne 10s ease-in-out infinite alternate;
        }
        @keyframes auroraOne {
            from { box-shadow: 0 0 400px 80px rgba(138, 100, 220, 0.6); }
            to { box-shadow: 0 0 250px 50px rgba(100, 180, 255, 0.5); }
        }

        #aurora-two {
            width: 90%;
            animation: auroraTwo 8s ease-in-out infinite alternate;
        }
        @keyframes auroraTwo {
            from { box-shadow: 0 0 380px 70px rgba(64, 224, 208, 0.5); }
            to { box-shadow: 0 0 220px 45px rgba(144, 238, 144, 0.4); }
        }

        #aurora-three {
            width: 80%;
            animation: auroraThree 6s ease-in-out infinite alternate;
        }
        @keyframes auroraThree {
            from { box-shadow: 0 0 360px 65px rgba(255, 182, 193, 0.5); }
            to { box-shadow: 0 0 200px 40px rgba(221, 160, 221, 0.4); }
        }

        #aurora-four {
            width: 70%;
            animation: auroraFour 4s ease-in-out infinite alternate;
        }
        @keyframes auroraFour {
            from { box-shadow: 0 0 340px 60px rgba(135, 206, 250, 0.5); }
            to { box-shadow: 0 0 180px 35px rgba(186, 135, 250, 0.4); }
        }

        #aurora-five {
            width: 60%;
            animation: auroraFive 2s ease-in-out infinite alternate;
        }
        @keyframes auroraFive {
            from { box-shadow: 0 0 320px 55px rgba(152, 251, 152, 0.5); }
            to { box-shadow: 0 0 160px 30px rgba(255, 218, 185, 0.4); }
        }
