/* ==================== MEDIA QUERIES E RESPONSIVE ==================== */

            
            .mobile-pause-title {
                font-size: 1.4rem;
                margin-bottom: 1rem;
            }
            
            .mobile-btn {
                min-width: 120px;
                font-size: 0.9rem;
                padding: 0.8rem 1.2rem;
            }
        
        
        /* Menu di pausa - iPad Portrait specifico */
        @media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
            .desktop-pause-content {
                min-width: 400px;
                max-width: 500px;
                padding: 3rem 2.5rem;
            }
            
            .desktop-pause-title {
                font-size: 2.5rem;
                margin-bottom: 2rem;
            }
            
            .desktop-pause-btn {
                min-width: 200px;
                font-size: 1.2rem;
                padding: 1.2rem 2rem;
                margin: 0.8rem 0;
            }
        }
        
        /* Menu di pausa - iPad Landscape specifico */
        @media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
            .desktop-pause-content {
                min-width: 450px;
                max-width: 600px;
                padding: 2.5rem;
            }
            
            .desktop-pause-title { 
                font-size: 2.2rem;
            }
            
            .desktop-pause-btn {
                min-width: 220px;
                font-size: 1.1rem;
                padding: 1.1rem 1.8rem;
            }
        }
        
        /* Menu di pausa - Surface Pro e dispositivi simili */
        @media (min-width: 900px) and (max-width: 1400px) and (min-height: 800px) {
            .desktop-pause-content {
                min-width: 500px;
                max-width: 650px;
                padding: 3rem 2.5rem;
            }
            
            .desktop-pause-title {
                font-size: 2.5rem;
                margin-bottom: 2rem;
            }
            
            .desktop-pause-btn {
                min-width: 240px;
                font-size: 1.3rem;
                padding: 1.3rem 2.2rem;
                margin: 1rem 0;
            }
        }
        
        /* Menu di pausa - Dispositivi pieghevoli e ultra-wide */
        @media (min-width: 1400px) {
            .desktop-pause-content {
                min-width: 600px;
                max-width: 800px;
                padding: 3.5rem 3rem;
            }
            
            .desktop-pause-title {
                font-size: 3rem;
                margin-bottom: 2.5rem;
            }
            
            .desktop-pause-btn {
                min-width: 280px;
                font-size: 1.4rem;
                padding: 1.5rem 2.5rem;
                margin: 1.2rem 0;
            }
        }
        
        /* Desktop only - hide on mobile */
        @media (max-width: 768px) {
            .desktop-pause-menu {
                display: none !important;
            }
        }

        /* ==================== CONTROLLI AUDIO ==================== */
        
        /* Container isolato per controlli audio - previene reflow della pagina */
        .audio-controls {
            margin-top: 0;
            position: relative;
            touch-action: manipulation;
            /* Crea un nuovo contesto di stacking isolato */
            isolation: isolate;
            contain: layout style; /* Contiene layout e style dentro questo elemento */
            /* Stabilizza il pannello durante l'interazione */
            transform: translateZ(0);
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
            will-change: auto;
        }
        
        .volume-slider {
            touch-action: manipulation; /* Permetti solo pan-x per lo slider */
        }
        
        .mute-btn {
            touch-action: manipulation; /* Previeni double-tap zoom */
        }
        
        /* Forza il corretto posizionamento dei pannelli info */
        .right-info {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .right-info .info-panel {
            position: relative;
            z-index: 1;
        }
        
        .volume-control {
            flex-direction: column !important;
            align-items: stretch !important;
            /* Isola il controllo del volume */
            contain: layout style;
        }
        
        .volume-slider-container {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            margin-top: 0.5rem;
            /* Stabilizza il contenitore durante l'uso dello slider */
            transform: translateZ(0);
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
            will-change: auto;
            position: relative;
            /* Isola completamente questo contenitore */
            contain: layout style paint;
        }
        
        .volume-slider {
            flex: 1;
            height: 6px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            outline: none;
            -webkit-appearance: none;
            appearance: none;
            cursor: pointer;
            transition: background 0.3s ease;
            position: relative;
            margin: 6px 0; /* Spazio sopra e sotto per l'hover del pallino */
        }
        
        .volume-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 16px;
            height: 16px;
            background: linear-gradient(45deg, #64ffda, #2196f3);
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(100, 255, 218, 0.4);
            transition: all 0.3s ease;
            border: 1px solid #ffffff;
            position: relative;
            z-index: 2;
        }
        
        .volume-slider::-webkit-slider-thumb:hover {
            transform: scale(1.2);
            box-shadow: 0 4px 15px rgba(100, 255, 218, 0.6);
        }
        
        .volume-slider::-moz-range-thumb {
            width: 16px;
            height: 16px;
            background: linear-gradient(45deg, #64ffda, #2196f3);
            border-radius: 50%;
            cursor: pointer;
            border: 1px solid #ffffff;
            box-shadow: 0 2px 8px rgba(100, 255, 218, 0.4);
            transition: all 0.3s ease;
        }
        
        .volume-slider::-moz-range-thumb:hover {
            transform: scale(1.2);
            box-shadow: 0 4px 15px rgba(100, 255, 218, 0.6);
        }
        
        .volume-slider::-moz-range-track {
            height: 6px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            border: none;
        }
        
        .volume-value {
            font-family: 'Orbitron', monospace;
            font-size: 0.85rem;
            font-weight: 600;
            color: #64ffda;
            min-width: 40px;
            text-align: center;
            background: rgba(100, 255, 218, 0.15);
            padding: 0.4rem 0.6rem;
            border-radius: 8px;
            border: 1px solid rgba(100, 255, 218, 0.4);
            text-shadow: 0 0 6px rgba(100, 255, 218, 0.5);
            box-shadow: 0 2px 6px rgba(100, 255, 218, 0.2);
            /* Centratura perfetta */
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            /* Ottimizzazioni per performance */
            contain: strict;
            flex-shrink: 0;
            transform: translateZ(0);
            will-change: contents;
        }
        
        .mute-control {
            justify-content: center !important;
        }
        
        .mute-btn {
            background: linear-gradient(135deg, #64ffda, #2196f3);
            border: none;
            padding: 0.8rem 1.5rem;
            border-radius: 25px;
            color: #0f0f23;
            font-family: 'Orbitron', monospace;
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            box-shadow: 0 4px 15px rgba(100, 255, 218, 0.3);
            min-width: 100px;
            justify-content: center;
        }
        
        .mute-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(100, 255, 218, 0.4);
        }
        
        .mute-btn:active {
            transform: translateY(0);
        }
        
        .mute-btn.muted {
            background: linear-gradient(135deg, #ff5722, #e64a19);
            color: #ffffff;
        }
        
        .mute-btn.muted:hover {
            box-shadow: 0 6px 20px rgba(255, 87, 34, 0.4);
        }
        
        .mute-icon {
            font-size: 1.1rem;
        }
        
        .mute-text {
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        /* Mobile adjustments per controlli audio */
        @media (max-width: 768px) {
            .audio-controls {
                /* Rimuovi l'order che sposta i controlli in cima */
                margin-bottom: 1rem;
                margin-top: 1rem;
            }

            /* Forza tutti gli info-item ad avere la stessa larghezza */
            .info-item, .volume-control, .mute-control {
                width: 100% !important;
                max-width: 100% !important;
                min-width: 100% !important;
                box-sizing: border-box !important;
            }

            .volume-control {
                padding: 1rem;
            }
            
            .volume-slider-container {
                gap: 1rem;
            }
            
            .volume-slider {
                height: 8px;
            }
            
            .volume-slider::-webkit-slider-thumb {
                width: 20px;
                height: 20px;
            }
            
            .volume-slider::-moz-range-thumb {
                width: 20px;
                height: 20px;
            }
            
            .volume-value {
                font-size: 1rem;
                min-width: 40px;
                padding: 0.3rem 0.6rem;
            }
            
            .mute-btn {
                padding: 1rem 2rem;
                font-size: 1rem;
                width: 100% !important;
                max-width: 100% !important;
                box-sizing: border-box !important;
                justify-content: center !important;
            }
            
            .mute-icon {
                font-size: 1.2rem;
            }
            
            .mute-text {
                font-size: 0.9rem;
            }
        }

        /* ==================== NUOVA SCHERMATA GAME OVER ==================== */
        
        /* Overlay principale */
        .gameover-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            z-index: 10000;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(15, 15, 35, 0.98);
            backdrop-filter: blur(20px);
            animation: gameOverFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        }
        
        .gameover-overlay.active {
            display: flex;
        }
        
        @keyframes gameOverFadeIn {
            from {
                opacity: 0;
                background: rgba(15, 15, 35, 0);
            }
            to {
                opacity: 1;
                background: rgba(15, 15, 35, 0.98);
            }
        }
        
        /* Sfondo animato */
        .gameover-background {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            pointer-events: none;
        }
        
        .gameover-particles {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
        
        .falling-block {
            position: absolute;
            width: 12px;
            height: 12px;
            top: -20px;
            background: linear-gradient(45deg, #ff5722, #ff9800);
            border-radius: 2px;
            opacity: 0.15;
            animation: fallDown 8s linear infinite;
        }
        
        .falling-block:nth-child(odd) {
            background: linear-gradient(45deg, #64ffda, #2196f3);
        }
        
        .falling-block:nth-child(3n) {
            background: linear-gradient(45deg, #9c27b0, #e91e63);
        }
        
        .falling-block:nth-child(4n) {
            background: linear-gradient(45deg, #4caf50, #8bc34a);
        }
        
        @keyframes fallDown {
            0% {
                transform: translateY(-20px) rotate(0deg);
                opacity: 0;
            }
            10% {
                opacity: 0.4;
            }
            90% {
                opacity: 0.4;
            }
            100% {
                transform: translateY(calc(100vh + 20px)) rotate(360deg);
                opacity: 0;
            }
        }
        
        /* Contenuto principale */
        .gameover-content {
            position: relative;
            z-index: 10;
            max-width: 600px;
            width: 90%;
            text-align: center;
            padding: 2rem;
            margin: 2rem auto;
            background: linear-gradient(135deg, rgba(15, 15, 35, 0.98), rgba(26, 26, 64, 0.98));
            backdrop-filter: blur(15px);
            border-radius: 25px;
            border: 3px solid transparent;
            background-clip: padding-box;
            box-shadow: 
                0 25px 50px rgba(0, 0, 0, 0.7),
                inset 0 1px 0 rgba(255, 255, 255, 0.15),
                0 0 0 1px rgba(0, 0, 0, 0.8);
            animation: gameOverSlideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
        }
        
        .gameover-content::before {
            content: '';
            position: absolute;
            top: -3px;
            left: -3px;
            right: -3px;
            bottom: -3px;
            background: linear-gradient(45deg, #ff5722, #ff9800, #64ffda, #2196f3, #9c27b0);
            background-size: 300% 300%;
            border-radius: 25px;
            z-index: -1;
            animation: borderRainbow 4s linear infinite;
        }
        
        @keyframes gameOverSlideIn {
            from {
                opacity: 0;
                transform: translateY(30px) scale(0.9);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        
        @keyframes borderRainbow {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        
        /* Titolo Game Over */
        .gameover-title {
            font-family: 'Orbitron', monospace;
            font-size: clamp(2.5rem, 8vw, 4rem);
            font-weight: 900;
            margin-bottom: 1rem;
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        
        .gameover-text {
            background: linear-gradient(45deg, #ff5722, #ff9800, #ffeb3b);
            background-size: 200% 200%;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: titleGlow 2s ease-in-out infinite alternate;
            text-shadow: 
                0 0 30px rgba(255, 87, 34, 0.8),
                0 0 10px rgba(0, 0, 0, 0.8),
                2px 2px 4px rgba(0, 0, 0, 0.9);
            display: inline-block;
            filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
        }
        
        .gameover-text:nth-child(2) {
            animation-delay: 0.5s;
        }
        
        @keyframes titleGlow {
            0% {
                background-position: 0% 50%;
                filter: brightness(1);
            }
            100% {
                background-position: 100% 50%;
                filter: brightness(1.2);
            }
        }
        
        /* Sottotitolo */
        .gameover-subtitle {
            font-size: 1.2rem;
            color: #e0e0e0;
            margin-bottom: 2rem;
            font-weight: 400;
            text-shadow: 
                0 2px 4px rgba(0, 0, 0, 0.8),
                0 0 8px rgba(0, 0, 0, 0.6);
            opacity: 0;
            animation: subtitleFadeIn 0.6s ease-out 0.8s both;
        }
        
        @keyframes subtitleFadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Statistiche */
        .gameover-stats {
            margin-bottom: 2rem;
            opacity: 0;
            animation: statsFadeIn 0.8s ease-out 1s both;
        }
        
        @keyframes statsFadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

          /* ==================== IPHONE FAMILY ADJUSTMENTS ==================== */
          /* Target: Generic iPhone CSS tweaks
              - covers iPhone SE up to Pro Max by targeting device widths up to 428px
              - matches common DPR values 2 and 3
          */
          @media only screen and (max-device-width: 428px) and (-webkit-min-device-pixel-ratio: 2) {
            /* Respect safe area (notch) */
            .gameover-overlay {
                padding-top: env(safe-area-inset-top);
                padding-bottom: env(safe-area-inset-bottom);
            }

            .gameover-content {
                width: calc(100% - 32px);
                max-width: calc(390px - 32px);
                padding: 1.2rem;
                margin: 1.2rem auto;
                border-radius: 18px;
                box-shadow: 0 18px 36px rgba(0,0,0,0.6);
            }

            .gameover-title {
                font-size: 2rem; /* scale down title to fit */
                gap: 0.25rem;
            }

            .gameover-subtitle {
                font-size: 1rem;
                margin-bottom: 1rem;
            }

            .gameover-stats {
                margin-bottom: 1rem;
            }

            .gameover-message {
                font-size: 0.95rem;
            }

            .gameover-actions {
                display: flex;
                flex-direction: column;
                gap: 0.6rem;
                align-items: stretch;
                margin-top: 0.6rem;
            }

            .gameover-btn {
                padding: 0.8rem 1rem;
                font-size: 0.95rem;
                border-radius: 12px;
                min-width: 0;
            }

            /* Make sure interactive elements are above the background and easy to tap */
            .gameover-btn, .gameover-instructions, .gameover-message {
                z-index: 12;
                touch-action: manipulation;
            }

            /* Reduce particle intensity and size to improve performance and visibility */
            .gameover-particles, .falling-block {
                opacity: 0.08 !important;
                width: 8px !important;
                height: 8px !important;
            }

            /* Prevent the canvas or other background elements from stealing taps */
            .gameover-overlay .game-wrapper, .gameover-overlay ~ #canvas {
                pointer-events: none !important;
            }

            /* Ensure the overlay scrolls properly on iOS and content isn't hidden by the notch */
            .gameover-overlay {
                -webkit-overflow-scrolling: touch;
                padding-left: max(env(safe-area-inset-left), 12px);
                padding-right: max(env(safe-area-inset-right), 12px);
            }
        }

        /* Fallback for narrow viewports (in case some browsers don't support device-width queries)
           This targets small viewports up to 428px wide and adjusts same properties. */
        @media only screen and (max-width: 428px) {
            .gameover-overlay {
                padding-top: env(safe-area-inset-top);
                padding-bottom: env(safe-area-inset-bottom);
                -webkit-overflow-scrolling: touch;
                padding-left: max(env(safe-area-inset-left), 10px);
                padding-right: max(env(safe-area-inset-right), 10px);
            }

            .gameover-content {
                width: calc(100% - 28px);
                max-width: calc(100vw - 28px);
                padding: 1rem;
                margin: 1rem auto;
                border-radius: 16px;
            }

            .gameover-title { font-size: 1.9rem; }
            .gameover-subtitle { font-size: 0.95rem; }
            .gameover-message { font-size: 0.92rem; }
            .gameover-btn { padding: 0.7rem 0.9rem; font-size: 0.92rem; }
            .gameover-particles, .falling-block { opacity: 0.06 !important; width: 7px !important; height: 7px !important; }

            /* Center contents inside statistic/info/record boxes on small screens */
            .stat-card, .stat-item, .info-item, .info-panel, .record-card {
                display: flex !important;
                flex-direction: column !important;
                align-items: center !important;
                justify-content: center !important;
                text-align: center !important;
                gap: 0.4rem !important;
            }

            /* Some mobile rules earlier switch stat-item to row - override here */
            .stat-item, .info-item {
                flex-direction: column !important;
                align-items: center !important;
                justify-content: center !important;
            }

            .stat-label, .info-label {
                margin-bottom: 0.35rem !important;
                text-align: center !important;
            }

            .stat-number, .info-value, .record-value {
                text-align: center !important;
            }
        }
        
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        
        .stat-card {
            background: rgba(0, 0, 0, 0.85);
            border-radius: 15px;
            padding: 1rem;
            border: 2px solid rgba(100, 255, 218, 0.4);
            transition: all 0.3s ease;
            backdrop-filter: blur(15px);
            box-shadow: 
                0 4px 15px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }
        
        .stat-card:hover {
            transform: translateY(-3px);
            border-color: rgba(100, 255, 218, 0.6);
            box-shadow: 0 8px 25px rgba(100, 255, 218, 0.2);
        }
        
        .stat-card.primary {
            border-color: rgba(255, 193, 7, 0.6);
            background: rgba(255, 193, 7, 0.1);
        }
        
        .stat-card.primary:hover {
            border-color: rgba(255, 193, 7, 0.8);
            box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
        }
        
        .stat-icon {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
        }
        
        .stat-label {
            font-size: 0.9rem;
            color: #b0bec5;
            margin-bottom: 0.5rem;
            font-weight: 500;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
        }
        
        .stat-number {
            font-family: 'Orbitron', monospace;
            font-size: 1.4rem;
            font-weight: 700;
            color: #ffffff;
            background: linear-gradient(45deg, #64ffda, #00bcd4);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .stat-card.primary .stat-number {
            background: linear-gradient(45deg, #ffc107, #ff9800);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        /* Sezione Record */
        .record-section {
            margin-top: 1.5rem;
        }
        
        .record-card {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            background: rgba(0, 0, 0, 0.9);
            border-radius: 20px;
            padding: 1.2rem;
            border: 2px solid rgba(255, 193, 7, 0.5);
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(20px);
            box-shadow: 
                0 8px 25px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }
        
        .record-card.new-record {
            border-color: #ffc107;
            background: rgba(255, 193, 7, 0.15);
            animation: recordPulse 2s ease-in-out infinite;
        }
        
        @keyframes recordPulse {
            0%, 100% {
                box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
            }
            50% {
                box-shadow: 0 0 40px rgba(255, 193, 7, 0.6);
            }
        }
        
        .record-icon {
            font-size: 2rem;
            filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.6));
        }
        
        .record-text {
            text-align: left;
        }
        
        .record-label {
            font-size: 0.9rem;
            color: #b0bec5;
            margin-bottom: 0.3rem;
            font-weight: 500;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        }
        
        .record-value {
            font-family: 'Orbitron', monospace;
            font-size: 1.6rem;
            font-weight: 700;
            background: linear-gradient(45deg, #ffc107, #ff9800);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .record-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: linear-gradient(45deg, #ffc107, #ff9800);
            color: #0f0f23;
            font-size: 0.7rem;
            font-weight: 700;
            padding: 0.3rem 0.6rem;
            border-radius: 15px;
            transform: rotate(15deg);
            box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
            display: none;
        }
        
        .record-card.new-record .record-badge {
            display: block;
            animation: badgeBounce 1s ease-in-out infinite;
        }
        
        @keyframes badgeBounce {
            0%, 100% { transform: rotate(15deg) scale(1); }
            50% { transform: rotate(15deg) scale(1.1); }
        }
        
        /* Messaggio motivazionale */
        .gameover-message {
            font-size: 1.1rem;
            color: #e0e0e0;
            margin-bottom: 2rem;
            line-height: 1.5;
            font-style: italic;
            font-weight: 400;
            text-shadow: 
                0 2px 4px rgba(0, 0, 0, 0.8),
                0 0 8px rgba(0, 0, 0, 0.6);
            opacity: 0;
            animation: messageFadeIn 0.6s ease-out 1.4s both;
        }
        
        @keyframes messageFadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Pulsanti */
        .gameover-actions {
            display: flex;
            gap: 1rem;
            justify-content: center;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
            opacity: 0;
            animation: actionsFadeIn 0.8s ease-out 1.6s both;
        }
        
        @keyframes actionsFadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .gameover-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 1rem 2rem;
            border: none;
            border-radius: 25px;
            font-family: 'Orbitron', monospace;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
            text-transform: uppercase;
            letter-spacing: 1px;
            min-width: 180px;
            justify-content: center;
        }
        
        .gameover-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.5s ease;
        }
        
        .gameover-btn:hover::before {
            left: 100%;
        }
        
        .gameover-btn.primary {
            background: linear-gradient(135deg, #64ffda, #2196f3);
            color: #0f0f23;
            box-shadow: 0 8px 25px rgba(100, 255, 218, 0.3);
        }
        
        .gameover-btn.primary:hover {
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 12px 35px rgba(100, 255, 218, 0.4);
        }
        
        .gameover-btn.secondary {
            background: rgba(255, 255, 255, 0.1);
            color: #64ffda;
            border: 2px solid #64ffda;
            box-shadow: 0 8px 25px rgba(100, 255, 218, 0.2);
        }
        
        .gameover-btn.secondary:hover {
            background: rgba(100, 255, 218, 0.2);
            color: #ffffff;
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 12px 35px rgba(100, 255, 218, 0.3);
        }
        
        .gameover-btn:active {
            transform: translateY(-1px) scale(1.01);
        }
        
        .btn-icon {
            font-size: 1.2rem;
        }
        
        /* Istruzioni */
        .gameover-instructions {
            opacity: 0;
            animation: instructionsFadeIn 0.6s ease-out 2s both;
        }
        
        @keyframes instructionsFadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 0.7;
            }
        }
        
        .desktop-instruction,
        .mobile-instruction {
            font-size: 0.9rem;
            color: #b0bec5;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
            background: rgba(0, 0, 0, 0.3);
            padding: 0.5rem;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .desktop-instruction kbd {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 4px;
            padding: 0.2rem 0.4rem;
            font-family: 'Orbitron', monospace;
            font-size: 0.8rem;
            color: #64ffda;
        }
        
        .mobile-instruction {
            display: none;
        }
        
        /* Compatibilità overlay legacy mobile */
        .legacy-mobile {
            display: none !important;
        }
        
        /* ==================== MEDIA QUERIES DETTAGLIATE ==================== */
        
        /* ==================== MEDIA QUERIES SPECIFICHE PER IPAD ==================== */
        
        /* iPad Mini (768x1024) Portrait */
        @media (min-width: 768px) and (max-width: 768px) and (orientation: portrait) {
            /* Abilita scroll anche su iPad Mini se necessario */
            .gameover-overlay {
                align-items: flex-start;
                padding-top: 2rem;
                padding-bottom: 2rem;
            }
            
            .gameover-content {
                max-width: 600px;
                width: 80%;
                padding: 2rem;
                margin: 2rem auto;
                max-height: 90vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.5rem, 5vw, 3.2rem);
                margin-bottom: 1.2rem;
            }
            
            .gameover-subtitle {
                font-size: 1.3rem;
                margin-bottom: 2rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 1.2rem;
            }
            
            .stat-card {
                padding: 1.2rem;
            }
            
            .stat-icon {
                font-size: 1.6rem;
            }
            
            .stat-number {
                font-size: 1.6rem;
            }
            
            .gameover-actions {
                flex-direction: column;
                gap: 1.5rem;
                align-items: center;
            }
            
            .gameover-btn {
                width: 100%;
                max-width: 350px;
                font-size: 1.2rem;
                padding: 1.3rem 2rem;
            }
            
            .record-card {
                padding: 1.5rem;
                flex-direction: row;
            }
            
            .gameover-message {
                font-size: 1.2rem;
                margin-bottom: 2rem;
            }
        }
        
        /* iPad Standard (769px-820px) e iPad Air Portrait */
        @media (min-width: 769px) and (max-width: 820px) and (orientation: portrait) {
            /* Abilita scroll anche su iPad Standard se necessario */
            .gameover-overlay {
                align-items: flex-start;
                padding-top: 2rem;
                padding-bottom: 2rem;
            }
            
            .gameover-content {
                max-width: 650px;
                width: 85%;
                padding: 2.2rem;
                margin: 2rem auto;
                max-height: 90vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.8rem, 5vw, 3.5rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 1.3rem;
            }
            
            .stat-card {
                padding: 1.3rem;
            }
            
            .gameover-actions {
                flex-direction: column;
                gap: 1.5rem;
            }
            
            .gameover-btn {
                width: 100%;
                max-width: 400px;
                font-size: 1.2rem;
                padding: 1.4rem 2.2rem;
            }
        }
        
        /* iPad Pro 11" (821px-834px) Portrait */
        @media (min-width: 821px) and (max-width: 834px) and (orientation: portrait) {
            /* Abilita scroll anche su iPad Pro 11 se necessario */
            .gameover-overlay {
                align-items: flex-start;
                padding-top: 2rem;
                padding-bottom: 2rem;
            }
            
            .gameover-content {
                max-width: 700px;
                width: 85%;
                padding: 2.5rem;
                margin: 2rem auto;
                max-height: 90vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(3rem, 5vw, 3.8rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 1.5rem;
            }
            
            .stat-card {
                padding: 1.5rem;
            }
            
            .gameover-btn {
                width: 100%;
                max-width: 450px;
                font-size: 1.3rem;
                padding: 1.5rem 2.5rem;
            }
        }
        
        /* iPad Pro 12.9" (835px-1024px) Portrait */
        @media (min-width: 835px) and (max-width: 1024px) and (orientation: portrait) {
            /* Abilita scroll anche su iPad Pro 12.9 se necessario */
            .gameover-overlay {
                align-items: flex-start;
                padding-top: 2rem;
                padding-bottom: 2rem;
            }
            
            .gameover-content {
                max-width: 800px;
                width: 80%;
                padding: 3rem;
                margin: 2rem auto;
                max-height: 90vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(3.2rem, 4vw, 4rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 1.8rem;
            }
            
            .stat-card {
                padding: 1.8rem;
            }
            
            .stat-icon {
                font-size: 2rem;
            }
            
            .stat-number {
                font-size: 2rem;
            }
            
            .gameover-actions {
                flex-direction: row;
                gap: 2rem;
                justify-content: center;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 300px;
                font-size: 1.4rem;
                padding: 1.6rem 2.8rem;
            }
            
            .record-card {
                padding: 2rem;
            }
        }
        
        /* Mobile Large (481px - 768px) */
        @media (min-width: 481px) and (max-width: 768px) {
            /* Abilita scroll su mobile large */
            .gameover-overlay {
                align-items: flex-start;
                padding-top: 1rem;
                padding-bottom: 1rem;
            }
            
            .gameover-content {
                width: 90%;
                padding: 1.6rem;
                max-width: 450px;
                margin: 1rem auto;
            }
            
            .gameover-title {
                font-size: clamp(2rem, 8vw, 3rem);
                margin-bottom: 1rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.9rem;
            }
            
            .stat-card {
                padding: 0.9rem;
            }
            
            .stat-icon {
                font-size: 1.3rem;
            }
            
            .stat-number {
                font-size: 1.3rem;
            }
            
            .record-card {
                flex-direction: row;
                text-align: left;
                padding: 1.1rem;
            }
            
            .gameover-actions {
                flex-direction: column;
                align-items: center;
                gap: 1rem;
            }
            
            .gameover-btn {
                width: 100%;
                max-width: 300px;
                padding: 1.1rem 1.8rem;
                font-size: 1.1rem;
            }
        }
        
        /* Mobile Standard (max-width: 480px) */
        @media (max-width: 480px) {
            /* Abilita scroll su mobile per game over */
            .gameover-overlay {
                align-items: flex-start;
                padding-top: 1rem;
                padding-bottom: 1rem;
            }
            
            .gameover-content {
                width: 95%;
                padding: 1.5rem;
                max-width: none;
                margin: 1rem auto;
            }
            
            .gameover-title {
                font-size: clamp(1.8rem, 9vw, 2.6rem);
                margin-bottom: 0.8rem;
            }
            
            .gameover-subtitle {
                font-size: 1.05rem;
                margin-bottom: 1.4rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.8rem;
            }
            
            .stat-card {
                padding: 0.8rem;
            }
            
            .stat-icon {
                font-size: 1.2rem;
            }
            
            .stat-number {
                font-size: 1.2rem;
            }
            
            .record-card {
                flex-direction: column;
                padding: 1rem;
            }
            
            .gameover-actions {
                gap: 0.9rem;
            }
            
            .gameover-btn {
                font-size: 1rem;
                padding: 1.1rem 1.6rem;
            }
            
            .gameover-message {
                font-size: 1.05rem;
            }
            
            .desktop-instruction {
                display: none;
            }
            
            .mobile-instruction {
                display: block;
            }
            
            .record-card {
                flex-direction: column;
                text-align: center;
                padding: 1rem;
            }
            
            .record-text {
                text-align: center;
            }
            
            .gameover-actions {
                flex-direction: column;
                align-items: center;
            }
            
            .gameover-btn {
                width: 100%;
                max-width: 280px;
                padding: 1.2rem 1.5rem;
            }
        }
        
        /* ==================== FINE MOBILE STANDARD ==================== */
        
        /* Mobile Small (361px - 480px) */
        @media (min-width: 361px) and (max-width: 480px) {
            /* Abilita scroll su mobile small */
            .gameover-overlay {
                align-items: flex-start;
                padding-top: 1rem;
                padding-bottom: 1rem;
            }
            
            .gameover-content {
                padding: 1.2rem;
                width: 96%;
                margin: 1rem auto;
            }
            
            .gameover-title {
                font-size: clamp(1.9rem, 9vw, 2.8rem);
                gap: 0.4rem;
                margin-bottom: 0.8rem;
            }
            
            .gameover-subtitle {
                font-size: 1.1rem;
                margin-bottom: 1.5rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.7rem;
            }
            
            .stat-card {
                padding: 0.8rem;
            }
            
            .stat-icon {
                font-size: 1.1rem;
            }
            
            .stat-number {
                font-size: 1.1rem;
            }
            
            .record-card {
                flex-direction: column;
                text-align: center;
                padding: 1rem;
            }
            
            .gameover-actions {
                gap: 0.9rem;
            }
            
            .gameover-btn {
                font-size: 1rem;
                padding: 1.1rem 1.5rem;
            }
            
            .gameover-message {
                font-size: 1.05rem;
            }
        }
        
        /* Mobile Extra Small (max-width: 360px) */
        @media (max-width: 360px) {
            /* Abilita scroll su mobile extra small */
            .gameover-overlay {
                align-items: flex-start;
                padding-top: 0.5rem;
                padding-bottom: 0.5rem;
            }
            
            .gameover-content {
                padding: 1rem;
                width: 98%;
                margin: 0.5rem auto;
            }
            
            .stats-grid {
                grid-template-columns: 1fr;
                gap: 0.6rem;
            }
            
            .stat-card {
                padding: 0.7rem;
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                text-align: left;
            }
            
            .stat-icon {
                font-size: 1.2rem;
                margin-bottom: 0;
                margin-right: 0.5rem;
            }
            
            .stat-content {
                display: flex;
                flex-direction: column;
                flex: 1;
                margin-left: 0.5rem;
            }
            
            .stat-label {
                margin-bottom: 0.2rem;
                font-size: 0.8rem;
            }
            
            .stat-number {
                font-size: 1rem;
            }
            
            .gameover-actions {
                gap: 0.8rem;
            }
            
            .gameover-btn {
                font-size: 0.9rem;
                padding: 1rem 1.2rem;
            }
            
            .falling-block {
                width: 6px;
                height: 6px;
            }
            
            .gameover-title {
                font-size: clamp(1.6rem, 10vw, 2.2rem);
                gap: 0.2rem;
                margin-bottom: 0.6rem;
            }
            
            .gameover-subtitle {
                font-size: 0.95rem;
                margin-bottom: 1.2rem;
            }
            
            .gameover-message {
                font-size: 0.95rem;
                margin-bottom: 1.5rem;
            }
            
            .record-card {
                flex-direction: column;
                padding: 0.9rem;
            }
            
            .record-icon {
                font-size: 1.5rem;
            }
            
            .record-value {
                font-size: 1.3rem;
            }
        }
        
        /* Landscape Orientation - Mobile Large */
        @media (min-width: 481px) and (max-width: 768px) and (orientation: landscape) {
            /* Abilita scroll su landscape mobile */
            .gameover-overlay {
                align-items: flex-start;
                padding-top: 1rem;
                padding-bottom: 1rem;
            }
            
            .gameover-content {
                max-height: 85vh;
                overflow-y: auto;
                padding: 1.2rem;
                width: 95%;
                max-width: 600px;
                margin: 1rem auto;
            }
            
            .gameover-title {
                font-size: clamp(1.8rem, 6vw, 2.5rem);
                margin-bottom: 0.8rem;
            }
            
            .gameover-subtitle {
                font-size: 1rem;
                margin-bottom: 1.2rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 0.6rem;
            }
            
            .stat-card {
                padding: 0.6rem;
            }
            
            .stat-icon {
                font-size: 1rem;
            }
            
            .stat-number {
                font-size: 1rem;
            }
            
            .record-card {
                padding: 0.9rem;
                flex-direction: row;
            }
            
            .gameover-actions {
                flex-direction: row;
                gap: 1rem;
            }
            
            .gameover-btn {
                flex: 1;
                min-width: auto;
                font-size: 0.9rem;
                padding: 0.8rem 1rem;
            }
            
            .gameover-message {
                font-size: 1rem;
                margin-bottom: 1.2rem;
            }
        }
        
        /* Landscape Orientation - Mobile Small */
        @media (max-width: 480px) and (orientation: landscape) and (max-height: 500px) {
            /* Abilita scroll su landscape mobile small */
            .gameover-overlay {
                align-items: flex-start;
                padding-top: 0.5rem;
                padding-bottom: 0.5rem;
            }
            
            .gameover-content {
                max-height: 90vh;
                overflow-y: auto;
                padding: 0.8rem;
                width: 98%;
                margin: 0.5rem auto;
            }
            
            .gameover-title {
                font-size: clamp(1.4rem, 8vw, 2rem);
                margin-bottom: 0.5rem;
            }
            
            .gameover-subtitle {
                font-size: 0.9rem;
                margin-bottom: 1rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 0.4rem;
            }
            
            .stat-card {
                padding: 0.4rem;
            }
            
            .stat-icon {
                font-size: 0.9rem;
            }
            
            .stat-label {
                font-size: 0.7rem;
            }
            
            .stat-number {
                font-size: 0.9rem;
            }
            
            .record-card {
                padding: 0.6rem;
                flex-direction: row;
            }
            
            .record-icon {
                font-size: 1.2rem;
            }
            
            .record-value {
                font-size: 1.1rem;
            }
            
            .gameover-actions {
                flex-direction: row;
                gap: 0.8rem;
            }
            
            .gameover-btn {
                flex: 1;
                min-width: auto;
                font-size: 0.8rem;
                padding: 0.7rem 0.8rem;
            }
            
            .gameover-message {
                font-size: 0.9rem;
                margin-bottom: 1rem;
            }
            
            .falling-block {
                animation-duration: 5s;
                width: 6px;
                height: 6px;
            }
        }
        
        /* ==================== DISPOSITIVI SPECIFICI AD ALTA RISOLUZIONE ==================== */
        
        /* iPad Air 4/5 (820x1180) Portrait - Dimensioni specifiche */
        @media (min-width: 820px) and (max-width: 820px) and (min-height: 1180px) and (max-height: 1180px) and (orientation: portrait) {
            .gameover-content {
                max-width: 700px;
                width: 80%;
                padding: 2.5rem;
            }
            
            .gameover-title {
                font-size: clamp(3rem, 4.5vw, 3.8rem);
                margin-bottom: 1.5rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 1.5rem;
            }
            
            .stat-card {
                padding: 1.5rem;
            }
            
            .stat-icon {
                font-size: 1.8rem;
            }
            
            .stat-number {
                font-size: 1.8rem;
            }
            
            .gameover-btn {
                width: 100%;
                max-width: 400px;
                font-size: 1.3rem;
                padding: 1.4rem 2.5rem;
            }
        }
        
        /* iPad Pro 11" (834x1194) - Dimensioni esatte */
        @media (min-width: 834px) and (max-width: 834px) and (min-height: 1194px) and (max-height: 1194px) and (orientation: portrait) {
            .gameover-content {
                max-width: 750px;
                width: 85%;
                padding: 2.8rem;
            }
            
            .gameover-title {
                font-size: clamp(3.2rem, 4vw, 4rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 1.8rem;
            }
            
            .stat-card {
                padding: 1.8rem;
            }
            
            .stat-icon {
                font-size: 2rem;
            }
            
            .stat-number {
                font-size: 2rem;
            }
        }
        
        /* iPad Pro 12.9" (1024x1366) - Dimensioni esatte */
        @media (min-width: 1024px) and (max-width: 1024px) and (min-height: 1366px) and (max-height: 1366px) and (orientation: portrait) {
            .gameover-content {
                max-width: 900px;
                width: 80%;
                padding: 3.5rem;
            }
            
            .gameover-title {
                font-size: clamp(3.5rem, 3.5vw, 4.5rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 2rem;
            }
            
            .stat-card {
                padding: 2rem;
            }
            
            .stat-icon {
                font-size: 2.2rem;
            }
            
            .stat-number {
                font-size: 2.2rem;
            }
            
            .gameover-actions {
                flex-direction: row;
                gap: 2.5rem;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 350px;
                font-size: 1.5rem;
                padding: 1.8rem 3rem;
            }
        }
        
        /* Surface Pro 7 (1368x912) Portrait e simili */
        @media (min-width: 912px) and (max-width: 1368px) and (min-height: 912px) and (max-height: 1368px) {
            .gameover-content {
                max-width: 850px;
                width: 85%;
                padding: 2.5rem;
                max-height: 85vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.8rem, 3.5vw, 3.8rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 1.5rem;
            }
            
            .stat-card {
                padding: 1.5rem;
            }
            
            .stat-icon {
                font-size: 1.6rem;
            }
            
            .stat-number {
                font-size: 1.6rem;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 280px;
                font-size: 1.2rem;
                padding: 1.3rem 2.2rem;
            }
        }
        
        /* ASUS ZenBook Fold e dispositivi pieghevoli (1024x1536 piegato) */
        @media (min-width: 1024px) and (max-width: 1024px) and (min-height: 1536px) and (max-height: 1536px) {
            .gameover-content {
                max-width: 900px;
                width: 80%;
                padding: 3rem;
                max-height: 90vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(3.2rem, 3vw, 4.2rem);
                margin-bottom: 2rem;
            }
            
            .gameover-subtitle {
                font-size: 1.5rem;
                margin-bottom: 2.5rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 2rem;
            }
            
            .stat-card {
                padding: 2.2rem;
            }
            
            .stat-icon {
                font-size: 2.5rem;
            }
            
            .stat-number {
                font-size: 2.5rem;
            }
            
            .stat-label {
                font-size: 1.1rem;
            }
            
            .record-card {
                padding: 2.5rem;
                margin: 2rem 0;
            }
            
            .record-icon {
                font-size: 3rem;
            }
            
            .record-value {
                font-size: 2.8rem;
            }
            
            .gameover-message {
                font-size: 1.4rem;
                margin-bottom: 2.5rem;
            }
            
            .gameover-actions {
                flex-direction: column;
                gap: 2rem;
            }
            
            .gameover-btn {
                width: 100%;
                max-width: 500px;
                font-size: 1.4rem;
                padding: 1.8rem 3rem;
            }
        }
        
        /* ==================== FIX SPECIFICI PER IPAD ==================== */
        
        /* Compensazione per barre di navigazione iPad */
        @media (min-width: 768px) and (max-width: 1366px) and (-webkit-min-device-pixel-ratio: 2) {
            .gameover-overlay {
                padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
            }
            
            .gameover-content {
                margin-top: max(1rem, env(safe-area-inset-top));
                margin-bottom: max(1rem, env(safe-area-inset-bottom));
            }
        }
        
        /* Fix per iPad in modalità Split View */
        @media (min-width: 320px) and (max-width: 678px) {
            .gameover-content {
                width: 95%;
                padding: 1.5rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.8rem;
            }
            
            .gameover-actions {
                flex-direction: column;
            }
            
            .gameover-btn {
                width: 100%;
                max-width: none;
            }
        }
        
        /* Fix per iPad con tastiera virtuale */
        @media (min-width: 768px) and (max-height: 600px) and (orientation: landscape) {
            .gameover-content {
                max-height: 90vh;
                overflow-y: auto;
                padding: 1rem;
            }
            
            .gameover-title {
                font-size: clamp(1.8rem, 4vw, 2.5rem);
                margin-bottom: 0.8rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 0.8rem;
            }
            
            .stat-card {
                padding: 0.8rem;
            }
            
            .gameover-btn {
                padding: 1rem 1.5rem;
                font-size: 0.95rem;
            }
        }
        
        /* ==================== FALLBACK PER DISPOSITIVI SIMILI ==================== */
        
        /* Tablet di fascia alta generici (800-900px width) */
        @media (min-width: 800px) and (max-width: 900px) and (min-height: 1000px) {
            .gameover-content {
                max-width: 750px;
                width: 85%;
                padding: 2.5rem;
            }
            
            .gameover-title {
                font-size: clamp(2.8rem, 4vw, 3.5rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 1.5rem;
            }
            
            .stat-card {
                padding: 1.5rem;
            }
            
            .stat-icon {
                font-size: 1.7rem;
            }
            
            .stat-number {
                font-size: 1.7rem;
            }
            
            .gameover-btn {
                width: 100%;
                max-width: 400px;
                font-size: 1.2rem;
                padding: 1.4rem 2.3rem;
            }
        }
        
        /* Tablet professionali landscape (1200-1400px width) */
        @media (min-width: 1200px) and (max-width: 1400px) and (min-height: 800px) and (max-height: 1000px) and (orientation: landscape) {
            .gameover-content {
                max-width: 1150px;
                width: 85%;
                padding: 2.2rem;
                max-height: 85vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.6rem, 3vw, 3.4rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1.3rem;
            }
            
            .stat-card {
                padding: 1.3rem;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 270px;
                font-size: 1.1rem;
                padding: 1.2rem 2rem;
            }
        }
        
        /* Dispositivi ad altissima risoluzione (>1400px) */
        @media (min-width: 1400px) and (max-height: 1100px) {
            .gameover-content {
                max-width: 1300px;
                width: 80%;
                padding: 2.8rem;
                max-height: 90vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(3rem, 2.5vw, 4rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(5, 1fr);
                gap: 1.8rem;
            }
            
            .stat-card {
                padding: 1.8rem;
            }
            
            .stat-icon {
                font-size: 1.8rem;
            }
            
            .stat-number {
                font-size: 1.8rem;
            }
            
            .gameover-actions {
                flex-direction: row;
                gap: 2.5rem;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 350px;
                font-size: 1.3rem;
                padding: 1.5rem 2.8rem;
            }
        }
        
        /* Fix per schermi con pixel ratio alto */
        @media (-webkit-min-device-pixel-ratio: 2.5), (min-resolution: 240dpi) {
            .gameover-text {
                text-shadow: 
                    0 0 35px rgba(255, 87, 34, 0.9),
                    0 0 12px rgba(0, 0, 0, 0.95),
                    2px 2px 4px rgba(0, 0, 0, 0.9);
            }
            
            .stat-card,
            .record-card {
                border-width: 1.5px;
                box-shadow: 
                    0 8px 32px rgba(0, 0, 0, 0.4),
                    inset 0 1px 0 rgba(255, 255, 255, 0.1);
            }
            
            .gameover-btn {
                border-width: 2px;
                box-shadow: 
                    0 6px 20px rgba(0, 0, 0, 0.3),
                    inset 0 1px 0 rgba(255, 255, 255, 0.2);
            }
        }
        
        /* ==================== DESKTOP GAME OVER OTTIMIZZATO ==================== */
        
        /* Desktop standard (1025px+) */
        @media (min-width: 1025px) and (max-height: 900px) {
            .gameover-content {
                max-width: 900px;
                width: 70%;
                padding: 2rem;
                max-height: none;
                overflow: visible;
                overflow-y: visible;
                margin: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.5rem, 4vw, 3.5rem);
                text-align: center;
                margin-bottom: 1.5rem;
            }
            
            .gameover-subtitle {
                text-align: center;
                font-size: 1.2rem;
                margin-bottom: 2rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1.5rem;
                justify-content: center;
                max-width: 800px;
                margin: 0 auto 2rem auto;
            }
            
            .stat-card {
                padding: 1.5rem;
                text-align: center;
                margin: 0;
            }
            
            .stat-icon {
                font-size: 1.8rem;
                margin-bottom: 0.5rem;
            }
            
            .stat-number {
                font-size: 1.8rem;
                font-weight: bold;
            }
            
            .stat-label {
                font-size: 0.9rem;
                text-align: center;
            }
            
            .record-card {
                max-width: 600px;
                margin: 2rem auto;
                padding: 1.5rem;
                text-align: center;
                flex-direction: row;
                justify-content: center;
                align-items: center;
                gap: 1rem;
            }
            
            .record-icon {
                font-size: 2.5rem;
            }
            
            .record-value {
                font-size: 2.2rem;
            }
            
            .gameover-message {
                font-size: 1.2rem;
                text-align: center;
                margin: 2rem auto;
                max-width: 600px;
            }
            
            .gameover-actions {
                flex-direction: row;
                gap: 2rem;
                justify-content: center;
                max-width: 500px;
                margin: 0 auto;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 200px;
                font-size: 1.1rem;
                padding: 1.2rem 2rem;
            }
        }
        
        /* Desktop wide (1400px+) */
        @media (min-width: 1400px) {
            .gameover-content {
                max-width: 1000px;
                width: 60%;
                padding: 2.5rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 2rem;
                max-width: 900px;
            }
            
            .stat-card {
                padding: 2rem;
            }
            
            .stat-icon {
                font-size: 2rem;
            }
            
            .stat-number {
                font-size: 2rem;
            }
            
            .gameover-btn {
                max-width: 250px;
                font-size: 1.2rem;
                padding: 1.3rem 2.2rem;
            }
        }
        
        /* Fix generale per desktop - rimuove completamente scroll */
        @media (min-width: 1025px) {
            .gameover-overlay {
                overflow: hidden;
                overflow-y: hidden;
                padding: 1rem;
            }
            
            .gameover-content {
                overflow: visible;
                overflow-y: visible;
                max-height: 90vh;
                height: auto;
            }
            
            .stats-grid {
                justify-items: center;
                place-items: center;
            }
            
            .stat-card {
                justify-self: center;
                align-self: center;
            }
        }
        
        /* Override per tutte le media query desktop che hanno overflow-y: auto */
        @media (min-width: 1025px) {
            /* iPad Mini/Standard Landscape */
            .gameover-content {
                overflow-y: visible !important;
                max-height: none !important;
            }
        }
        
        /* ==================== SUPPORTO TOUCH E ALTA DENSITÀ ==================== */
        
        /* Touch feedback per mobile */
        @media (hover: none) and (pointer: coarse) {
            .gameover-btn:active {
                transform: translateY(0) scale(0.98);
                transition: transform 0.1s ease;
            }
            
            .stat-card:active {
                transform: translateY(0) scale(0.98);
                transition: transform 0.1s ease;
            }
            
            .mobile-btn:active {
                transform: translateY(0) scale(0.96);
                transition: transform 0.1s ease;
            }
        }
        
        /* Schermi ad alta densità (Retina, ecc.) */
        @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
            .gameover-text {
                text-shadow: 
                    0 0 30px rgba(255, 87, 34, 0.8),
                    0 0 10px rgba(0, 0, 0, 0.9),
                    1px 1px 2px rgba(0, 0, 0, 0.9);
            }
            
            .stat-card,
            .record-card {
                border-width: 1px;
            }
        }
        
        /* Riduzione movimento per utenti sensibili */
        @media (prefers-reduced-motion: reduce) {
            .falling-block {
                animation: none;
                opacity: 0.1;
                position: static;
            }
            
            .gameover-text {
                animation: none;
            }
            
            .record-card.new-record {
                animation: none;
            }
            
            .gameover-content::before {
                animation: none;
            }
        }
        
        /* Schermi ad alta densità (Retina, ecc.) */
        @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
            .gameover-text {
                text-shadow: 
                    0 0 30px rgba(255, 87, 34, 0.8),
                    0 0 10px rgba(0, 0, 0, 0.9),
                    1px 1px 2px rgba(0, 0, 0, 0.9);
            }
            
            .stat-card,
            .record-card {
                border-width: 1px;
            }
        }
        
        /* Riduzione movimento per utenti sensibili */
        @media (prefers-reduced-motion: reduce) {
            .falling-block {
                animation: none;
                opacity: 0.1;
                position: static;
            }
            
            .gameover-text {
                animation: none;
            }
            
            .record-card.new-record {
                animation: none;
            }
            
            .gameover-content::before {
                animation: none;
            }
        }
        
        /* ==================== MIGLIORAMENTI MOBILE ==================== */
        
        /* Migliora la visibilità dei testi su mobile */
        @media (max-width: 768px) {
            .mobile-instruction {
                background: rgba(0, 0, 0, 0.9);
                padding: 0.8rem;
                border-radius: 12px;
                border: 2px solid rgba(100, 255, 218, 0.4);
                margin-top: 0.5rem;
                backdrop-filter: blur(10px);
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
            }
            
            .mobile-instruction::after {
                display: block;
                font-size: 0.8rem;
                color: #64ffda;
                margin-top: 0.5rem;
                opacity: 0.9;
                text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
            }
            
            /* Migliora contrasto sui dispositivi mobili */
            .gameover-content {
                background: rgba(15, 15, 35, 0.99);
                box-shadow: 
                    0 25px 50px rgba(0, 0, 0, 0.8),
                    inset 0 1px 0 rgba(255, 255, 255, 0.15),
                    0 0 0 2px rgba(0, 0, 0, 0.9);
            }
            
            .stat-card {
                background: rgba(0, 0, 0, 0.9);
                border-color: rgba(100, 255, 218, 0.5);
            }
            
            .record-card {
                background: rgba(0, 0, 0, 0.95);
                border-color: rgba(255, 193, 7, 0.6);
            }
        }
        
        /* Schermi molto piccoli (smartwatch, mini smartphone) */
        @media (max-width: 280px) {
            .gameover-overlay {
                padding: 0.2rem;
            }
            
            .gameover-content {
                padding: 0.8rem;
                width: 99%;
                border-radius: 15px;
            }
            
            .gameover-title {
                font-size: 1.2rem;
                gap: 0.1rem;
                margin-bottom: 0.4rem;
            }
            
            .gameover-subtitle {
                font-size: 0.8rem;
                margin-bottom: 0.8rem;
            }
            
            .stats-grid {
                grid-template-columns: 1fr;
                gap: 0.4rem;
            }
            
            .stat-card {
                padding: 0.5rem;
                border-radius: 8px;
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
            }
            
            .stat-icon {
                font-size: 1rem;
                margin-bottom: 0;
            }
            
            .stat-content {
                display: flex;
                flex-direction: column;
                flex: 1;
                margin-left: 0.5rem;
                text-align: left;
            }
            
            .stat-label {
                font-size: 0.7rem;
                margin-bottom: 0.2rem;
            }
            
            .stat-number {
                font-size: 0.9rem;
            }
            
            .record-card {
                padding: 0.6rem;
                border-radius: 12px;
            }
            
            .record-icon {
                font-size: 1.2rem;
            }
            
            .record-value {
                font-size: 1rem;
            }
            
            .gameover-message {
                font-size: 0.8rem;
                margin-bottom: 1rem;
            }
            
            .gameover-btn {
                font-size: 0.8rem;
                padding: 0.8rem 1rem;
                border-radius: 15px;
            }
            
            .falling-block {
                width: 4px;
                height: 4px;
                opacity: 0.1;
            }
        }
        
        /* ==================== IPAD LANDSCAPE ORIENTATIONS ==================== */
        
        /* iPad Mini/Standard Landscape (1024x768) */
        @media (min-width: 1024px) and (max-width: 1024px) and (orientation: landscape) {
            .gameover-content {
                max-width: 900px;
                width: 85%;
                padding: 1.8rem;
                max-height: 85vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.2rem, 4vw, 2.8rem);
                margin-bottom: 1rem;
            }
            
            .gameover-subtitle {
                font-size: 1.1rem;
                margin-bottom: 1.5rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1rem;
            }
            
            .stat-card {
                padding: 1rem;
            }
            
            .stat-icon {
                font-size: 1.2rem;
            }
            
            .stat-number {
                font-size: 1.2rem;
            }
            
            .gameover-actions {
                flex-direction: row;
                gap: 1.5rem;
                justify-content: center;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 220px;
                font-size: 1rem;
                padding: 1.1rem 1.8rem;
            }
            
            .record-card {
                padding: 1.2rem;
                flex-direction: row;
            }
            
            .gameover-message {
                font-size: 1.1rem;
                margin-bottom: 1.5rem;
            }
        }
        
        /* iPad Air/Pro 11" Landscape (1194x834, 1180x820) */
        @media (min-width: 1025px) and (max-width: 1194px) and (orientation: landscape) {
            .gameover-content {
                max-width: 1000px;
                width: 85%;
                padding: 2rem;
                max-height: 80vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.5rem, 4vw, 3.2rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1.2rem;
            }
            
            .stat-card {
                padding: 1.2rem;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 250px;
                font-size: 1.1rem;
            }
        }
        
        /* iPad Air 4/5 Landscape (1180x820) */
        @media (min-width: 1180px) and (max-width: 1180px) and (min-height: 820px) and (max-height: 820px) and (orientation: landscape) {
            .gameover-content {
                max-width: 1050px;
                width: 85%;
                padding: 2rem;
                max-height: 80vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.5rem, 3.5vw, 3.2rem);
                margin-bottom: 1.2rem;
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1.2rem;
            }
            
            .stat-card {
                padding: 1.2rem;
            }
            
            .stat-icon {
                font-size: 1.3rem;
            }
            
            .stat-number {
                font-size: 1.3rem;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 240px;
                font-size: 1.1rem;
                padding: 1.2rem 2rem;
            }
        }
        
        /* iPad Pro 11" Landscape (1194x834) */
        @media (min-width: 1194px) and (max-width: 1194px) and (min-height: 834px) and (max-height: 834px) and (orientation: landscape) {
            .gameover-content {
                max-width: 1100px;
                width: 85%;
                padding: 2.2rem;
                max-height: 80vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.6rem, 3.5vw, 3.4rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1.3rem;
            }
            
            .stat-card {
                padding: 1.3rem;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 260px;
                font-size: 1.1rem;
            }
        }
        
        /* iPad Pro 12.9" Landscape (1366x1024) */
        @media (min-width: 1366px) and (max-width: 1366px) and (min-height: 1024px) and (max-height: 1024px) and (orientation: landscape) {
            .gameover-content {
                max-width: 1250px;
                width: 85%;
                padding: 2.5rem;
                max-height: 85vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.8rem, 3vw, 3.6rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1.5rem;
            }
            
            .stat-card {
                padding: 1.5rem;
            }
            
            .stat-icon {
                font-size: 1.5rem;
            }
            
            .stat-number {
                font-size: 1.5rem;
            }
            
            .gameover-actions {
                flex-direction: row;
                gap: 2rem;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 300px;
                font-size: 1.2rem;
                padding: 1.3rem 2.2rem;
            }
            
            .record-card {
                padding: 1.8rem;
            }
        }
        
        /* Surface Pro 7 Landscape (1368x912) */
        @media (min-width: 1368px) and (max-width: 1368px) and (min-height: 912px) and (max-height: 912px) and (orientation: landscape) {
            .gameover-content {
                max-width: 1200px;
                width: 85%;
                padding: 2.2rem;
                max-height: 80vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.5rem, 3vw, 3.2rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1.3rem;
            }
            
            .stat-card {
                padding: 1.3rem;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 280px;
                font-size: 1.1rem;
                padding: 1.2rem 2rem;
            }
        }
        
        /* ASUS ZenBook Fold Landscape esteso (1536x1024) */
        @media (min-width: 1536px) and (max-width: 1536px) and (min-height: 1024px) and (max-height: 1024px) and (orientation: landscape) {
            .gameover-content {
                max-width: 1400px;
                width: 80%;
                padding: 2.5rem;
                max-height: 85vh;
                overflow-y: auto;
            }
            
            .gameover-title {
                font-size: clamp(2.8rem, 2.5vw, 3.5rem);
            }
            
            .stats-grid {
                grid-template-columns: repeat(5, 1fr);
                gap: 1.5rem;
            }
            
            .stat-card {
                padding: 1.5rem;
            }
            
            .stat-icon {
                font-size: 1.6rem;
            }
            
            .stat-number {
                font-size: 1.6rem;
            }
            
            .gameover-actions {
                flex-direction: row;
                gap: 2.5rem;
                justify-content: center;
            }
            
            .gameover-btn {
                flex: 1;
                max-width: 320px;
                font-size: 1.3rem;
                padding: 1.4rem 2.5rem;
            }
        }
        
        /* Animazioni per dispositivi che le supportano */
        @media (prefers-reduced-motion: reduce) {
            .gameover-overlay,
            .gameover-content,
            .gameover-subtitle,
            .gameover-stats,
            .gameover-message,
            .gameover-actions,
            .gameover-instructions {
                animation: none;
            }
            
            .falling-block {
                animation: none;
                opacity: 0.2;
            }
            
            .gameover-text {
                animation: none;
            }
            
            .record-card.new-record {
                animation: none;
            }
        }

        /* Nascondi elementi Emscripten originali */
        #emscripten_logo,
        #spinner,
        #progress,
        #controls,
        #output {
            display: none !important;
        }

        #status {
            display: none !important;
        }

        /* ==================== MOBILE LAYOUT FIX ==================== */

        /* Tablet: ridimensiona layout per evitare overflow */
        @media (min-width: 769px) and (max-width: 1024px) {
            body, html {
                overflow-x: hidden !important;
            }

            .game-container {
                padding: 0.5rem;
                max-width: 100vw;
                overflow-x: hidden;
            }

            .game-wrapper {
                padding: 1rem;
                max-width: 100%;
                box-sizing: border-box;
            }

            .game-layout {
                gap: 1rem !important;
                max-width: 100%;
                justify-content: center;
            }

            /* Riduci larghezza pannelli laterali su tablet */
            .left-stats, .right-info {
                flex: 0 0 180px !important;
                max-width: 180px !important;
            }

            /* Assicurati che il canvas non sia troppo grande */
            .game-canvas {
                max-width: calc(100vw - 400px) !important;
            }

            #canvas {
                max-width: 100% !important;
                height: auto !important;
            }

            /* Pannelli più compatti */
            .info-panel, .stats-panel {
                padding: 0.6rem !important;
                margin-bottom: 0.6rem !important;
            }

            .panel-title, .info-title {
                font-size: 0.9rem !important;
            }

            .stat-value, .info-value {
                font-size: 1.1rem !important;
            }

            .stat-label, .info-label {
                font-size: 0.75rem !important;
            }

            /* Riduci controlli audio per farli stare nei pannelli da 180px */
            .volume-control {
                padding: 0.4rem !important;
            }

            .volume-control .info-label {
                margin-bottom: 0.25rem !important;
                font-size: 0.65rem !important;
            }

            .volume-slider-container {
                gap: 0.25rem !important;
                width: 100% !important;
                box-sizing: border-box !important;
                padding: 0 !important;
            }

            .volume-slider {
                flex: 1 !important;
                min-width: 0 !important;
                height: 4px !important;
                margin: 0 !important;
            }

            .volume-slider::-webkit-slider-thumb {
                width: 12px !important;
                height: 12px !important;
            }

            .volume-slider::-moz-range-thumb {
                width: 12px !important;
                height: 12px !important;
            }

            .volume-value {
                min-width: 28px !important;
                max-width: 28px !important;
                padding: 0.15rem 0.25rem !important;
                font-size: 0.65rem !important;
                flex-shrink: 0 !important;
            }

            .mute-btn {
                padding: 0.6rem 1rem !important;
                font-size: 0.85rem !important;
            }

            .mute-icon {
                font-size: 1rem !important;
            }

            .mute-text {
                font-size: 0.8rem !important;
            }

            /* Assicura contenimento controlli audio */
            .audio-controls, .info-panel {
                overflow: hidden !important;
                box-sizing: border-box !important;
            }

            .info-item, .volume-control, .mute-control {
                box-sizing: border-box !important;
                overflow: hidden !important;
            }
        }

        /* Surface Pro 7 e dispositivi simili - landscape */
        @media (min-width: 1200px) and (max-width: 1400px) and (orientation: landscape) {
            .game-container {
                max-width: 100vw;
                overflow-x: hidden;
            }

            .game-layout {
                gap: 1.5rem !important;
            }

            .left-stats, .right-info {
                flex: 0 0 220px !important;
                max-width: 220px !important;
            }
        }

        /* Mobile: Stack game layout vertically instead of horizontally */
        @media (max-width: 768px) {
            .game-container {
                padding: 0.5rem;
            }

            .game-wrapper {
                padding: 1rem;
                margin-bottom: 1rem;
                border-radius: 15px;
            }

            /* Show mobile instructions on mobile */
            .mobile-instructions {
                display: block !important;
            }

            /* Change from horizontal (row) to vertical (column) layout */
            .game-layout {
                flex-direction: column !important;
                align-items: center !important;
                gap: 1rem !important;
            }

            /* Side panels become full-width on mobile */
            .left-stats, .right-info {
                flex: none !important;
                width: 100% !important;
                max-width: 360px !important;
            }

            /* Canvas container stays centered */
            .game-canvas {
                order: 1 !important;
                width: 100% !important;
                max-width: 360px !important;
            }

            /* Left stats go above canvas */
            .left-stats {
                order: 0 !important;
            }

            /* Right info goes below canvas */
            .right-info {
                order: 2 !important;
            }

            /* Inverti ordine stats su mobile: Punteggio più vicino al canvas */
            .stats-panel {
                display: flex !important;
                flex-direction: column !important;
            }

            /* Ordine su mobile: Titolo → Linee → Livello → Punteggio (più vicino al canvas) */
            .stats-panel h3 { /* Titolo resta in cima */
                order: 1 !important;
            }

            .stats-panel .stat-item:nth-child(2) { /* Punteggio - va in fondo (più vicino canvas) */
                order: 4 !important;
            }

            .stats-panel .stat-item:nth-child(3) { /* Livello - resta al centro */
                order: 3 !important;
            }

            .stats-panel .stat-item:nth-child(4) { /* Linee - va dopo il titolo */
                order: 2 !important;
            }

            /* Adjust panel styles for mobile */
            .info-panel, .stats-panel {
                padding: 0.8rem !important;
                margin-bottom: 0.8rem !important;
            }

            /* Make text more readable on mobile */
            .panel-title {
                font-size: 1rem !important;
            }

            .stat-value, .info-value {
                font-size: 1.3rem !important;
            }

            .stat-label, .info-label {
                font-size: 0.85rem !important;
            }
        }

        /* Extra small mobile devices */
        @media (max-width: 480px) {
            .game-container {
                padding: 0.25rem;
            }

            .game-wrapper {
                padding: 0.5rem;
                margin-bottom: 0.5rem;
            }

            .left-stats, .right-info, .game-canvas {
                max-width: 100% !important;
            }

            .info-panel, .stats-panel {
                padding: 0.6rem !important;
                margin-bottom: 0.6rem !important;
            }
        }
