﻿        /* Hide legal footer if consent already given */
        #legal-footer.hidden-consent {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
            height: 0 !important;
            overflow: hidden !important;
            padding: 0 !important;
            margin: 0 !important;
        }

        /* CSS Variables for Themes 🎨 */
        :root {
            /* Kawai Theme (Default) 🌸 - DARKER VERSION */
            --theme-primary: #C084FC;
            --theme-secondary: #9333EA;
            --theme-accent: #E879F9;
            --theme-bg: linear-gradient(180deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
            --theme-text: #E9D5FF;
            --theme-shadow: rgba(147, 51, 234, 0.5);
        }

        [data-theme="retro"] {
            /* Retro Theme 🕹️ */
            --theme-primary: #00FF00;
            --theme-secondary: #FF00FF;
            --theme-accent: #00FFFF;
            --theme-bg: linear-gradient(180deg, #000000 0%, #1a0033 50%, #330066 100%);
            --theme-text: #00FF00;
            --theme-shadow: rgba(0, 255, 0, 0.5);

            /* Retro Pet Colors */
            --retro-body: #00FF00;
            --retro-eyes: #00FFFF;
            --retro-mouth: #FF00FF;
            --retro-antenna: #00FFFF;
            --retro-glow: #00FF00;
        }

        [data-theme="premium"] {
            /* Premium Theme 💎 */
            --theme-primary: #1F2937;
            --theme-secondary: #374151;
            --theme-accent: #F59E0B;
            --theme-bg: linear-gradient(180deg, #111827 0%, #1F2937 50%, #374151 100%);
            --theme-text: #F9FAFB;
            --theme-shadow: rgba(245, 158, 11, 0.3);
        }

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

        body {
            font-family: 'Courier New', monospace;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            min-height: 100vh;
            height: auto;
            overflow-y: auto !important;
            overflow-x: hidden;
            padding: 20px 10px;
            width: 100%;
            max-width: 100vw;
            box-sizing: border-box;
            position: relative;
        }

        html {
            height: auto !important;
            overflow-y: auto !important;
            overflow-x: hidden;
        }

        /* Logo Styles 🎨 */
        .game-logo {
            position: fixed;
            top: 15px;
            left: 15px;
            z-index: 10000;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }

        .game-logo:hover {
            transform: scale(1.05);
            opacity: 0.9;
        }

        .game-logo img {
            height: 70px;
            width: auto;
            display: block;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            padding: 5px;
        }

        @media (max-width: 768px) {
            .game-logo {
                top: 10px;
                left: 10px;
            }

            .game-logo img {
                height: 50px;
            }
        }

        .game-container {
            width: 100%;
            max-width: 480px;
            background: #2d3748;
            border-radius: 20px;
            border: 4px solid #4a5568;
            box-shadow: 0 10px 50px rgba(0,0,0,0.5);
            overflow: visible;
            box-sizing: border-box;
            position: relative;
        }

        .game-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 20px 15px;
            text-align: center;
            border-bottom: 4px solid #4a5568;
            position: relative;
            border-radius: 16px 16px 0 0;
        }

        .header-stats {
            display: flex;
            justify-content: space-around;
            margin-top: 10px;
        }

        .header-stat {
            text-align: center;
        }

        .header-stat-value {
            font-size: 18px;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        }

        .header-stat-label {
            font-size: 11px;
            opacity: 0.9;
            margin-top: 2px;
        }

        /* Theme Switcher 🎨 */
        .theme-switcher {
            position: absolute;
            top: 10px;
            right: 10px;
            display: flex;
            gap: 5px;
            z-index: 100;
        }

        .theme-btn {
            width: 35px;
            height: 35px;
            border: 2px solid rgba(255,255,255,0.3);
            border-radius: 8px;
            background: rgba(0,0,0,0.2);
            color: white;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
        }

        .theme-btn:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.6);
            transform: scale(1.1);
        }

        .theme-btn.active {
            background: rgba(255,255,255,0.3);
            border-color: #fbbf24;
            box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
        }

        .theme-btn span {
            display: block;
            line-height: 1;
        }

        /* Retro 8-bit Pet Styles 🕹️ */
        [data-theme="retro"] .vector-pet {
            image-rendering: pixelated;
            image-rendering: -moz-crisp-edges;
            image-rendering: crisp-edges;
        }

        [data-theme="retro"] .retro-pet {
            display: block;
        }

        [data-theme="retro"] .kawai-pet {
            display: none;
        }

        [data-theme="kawai"] .retro-pet {
            display: none;
        }

        [data-theme="kawai"] .kawai-pet {
            display: block;
        }

        [data-theme="premium"] .retro-pet {
            display: none;
        }

        [data-theme="premium"] .kawai-pet {
            display: none;
        }

        [data-theme="premium"] .premium-pet {
            display: block;
        }

        /* Default theme - show kawai pet */
        .kawai-pet {
            display: block;
        }

        .retro-pet, .premium-pet {
            display: none;
        }

        /* Retro Pet Animations 🕹️ */
        .retro-body {
            animation: retroPulse 2s ease-in-out infinite;
        }

        .retro-eye-left, .retro-eye-right {
            animation: retroBlink 3s infinite;
        }

        .retro-antenna {
            animation: retroAntennaBob 1.5s ease-in-out infinite;
        }

        .retro-glitch-1, .retro-glitch-2 {
            animation: retroGlitch 0.5s infinite;
        }

        .retro-particle-1 { animation: retroFloat1 2s ease-in-out infinite; }
        .retro-particle-2 { animation: retroFloat2 2.5s ease-in-out infinite; }
        .retro-particle-3 { animation: retroFloat3 3s ease-in-out infinite; }
        .retro-particle-4 { animation: retroFloat4 2.2s ease-in-out infinite; }
        .retro-particle-5 { animation: retroFloat5 2.8s ease-in-out infinite; }
        .retro-particle-6 { animation: retroFloat6 3.2s ease-in-out infinite; }

        @keyframes retroPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        @keyframes retroBlink {
            0%, 90%, 100% { opacity: 1; }
            95% { opacity: 0; }
        }

        @keyframes retroAntennaBob {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-2px); }
        }

        @keyframes retroGlitch {
            0%, 100% { opacity: 0.6; }
            50% { opacity: 0.2; }
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.2); filter: brightness(1.3); }
        }

        @keyframes retroFloat1 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(5px, -5px) rotate(180deg); opacity: 1; }
        }

        @keyframes retroFloat2 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(-3px, -8px) rotate(-180deg); opacity: 1; }
        }

        @keyframes retroFloat3 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(8px, -3px) rotate(90deg); opacity: 1; }
        }

        @keyframes retroFloat4 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(-5px, -6px) rotate(-90deg); opacity: 1; }
        }

        @keyframes retroFloat5 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(6px, -4px) rotate(270deg); opacity: 1; }
        }

        @keyframes retroFloat6 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(-4px, -7px) rotate(45deg); opacity: 1; }
        }

        /* Premium Pet Animations 💎 */
        .premium-body {
            animation: premiumFloat 3s ease-in-out infinite;
        }

        .premium-eye-left, .premium-eye-right {
            animation: premiumBlink 4s infinite;
        }

        .premium-antenna {
            animation: premiumAntennaBob 2s ease-in-out infinite;
        }

        .premium-line-1, .premium-line-2, .premium-line-3, .premium-line-4 {
            animation: premiumGlow 2.5s ease-in-out infinite;
        }

        .premium-particle-1 { animation: premiumFloat1 3s ease-in-out infinite; }
        .premium-particle-2 { animation: premiumFloat2 3.5s ease-in-out infinite; }
        .premium-particle-3 { animation: premiumFloat3 4s ease-in-out infinite; }
        .premium-particle-4 { animation: premiumFloat4 3.2s ease-in-out infinite; }
        .premium-particle-5 { animation: premiumFloat5 3.8s ease-in-out infinite; }
        .premium-particle-6 { animation: premiumFloat6 4.2s ease-in-out infinite; }

        @keyframes premiumFloat {
            0%, 100% { transform: translateY(0) scale(1); }
            50% { transform: translateY(-3px) scale(1.02); }
        }

        @keyframes premiumBlink {
            0%, 90%, 100% { opacity: 1; }
            95% { opacity: 0.3; }
        }

        @keyframes premiumAntennaBob {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-1px) rotate(2deg); }
        }

        @keyframes premiumGlow {
            0%, 100% { opacity: 0.6; }
            50% { opacity: 1; }
        }

        @keyframes premiumFloat1 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
            50% { transform: translate(3px, -4px) rotate(180deg); opacity: 1; }
        }

        @keyframes premiumFloat2 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(-2px, -6px) rotate(-180deg); opacity: 1; }
        }

        @keyframes premiumFloat3 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
            50% { transform: translate(4px, -3px) rotate(90deg); opacity: 1; }
        }

        @keyframes premiumFloat4 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
            50% { transform: translate(-3px, -5px) rotate(-90deg); opacity: 1; }
        }

        @keyframes premiumFloat5 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(2px, -4px) rotate(270deg); opacity: 1; }
        }

        @keyframes premiumFloat6 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
            50% { transform: translate(-4px, -3px) rotate(45deg); opacity: 1; }
        }

        /* New Pet Animations 🐾 */

        /* NEKO CAT Animations 🐱 */
        .neko-body { animation: nekoPurr 2.5s ease-in-out infinite; }
        .neko-tail { animation: nekoTailWag 1.5s ease-in-out infinite; }
        .neko-ear-left, .neko-ear-right { animation: nekoEarTwitch 3s infinite; }
        .neko-eye-left, .neko-eye-right { animation: nekoBlink 4s infinite; }
        .neko-particle-1 { animation: nekoFloat1 2.5s ease-in-out infinite; }
        .neko-particle-2 { animation: nekoFloat2 3s ease-in-out infinite; }
        .neko-particle-3 { animation: nekoFloat3 2.8s ease-in-out infinite; }

        @keyframes nekoPurr {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.02); }
        }
        @keyframes nekoTailWag {
            0%, 100% { transform: rotate(0deg); }
            50% { transform: rotate(10deg); }
        }
        @keyframes nekoEarTwitch {
            0%, 90%, 100% { transform: rotate(0deg); }
            95% { transform: rotate(-5deg); }
        }
        @keyframes nekoBlink {
            0%, 90%, 100% { opacity: 1; }
            95% { opacity: 0.3; }
        }
        @keyframes nekoFloat1 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(3px, -5px) rotate(180deg); opacity: 1; }
        }
        @keyframes nekoFloat2 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
            50% { transform: translate(-2px, -6px) rotate(-180deg); opacity: 1; }
        }
        @keyframes nekoFloat3 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
            50% { transform: translate(4px, -3px) rotate(90deg); opacity: 1; }
        }

        /* CYBER DOG Animations 🤖 */
        .cyber-body { animation: cyberPulse 2s ease-in-out infinite; }
        .cyber-eye-left, .cyber-eye-right { animation: cyberBlink 3s infinite; }
        .cyber-antenna { animation: cyberAntennaBob 1.8s ease-in-out infinite; }
        .cyber-particle-1 { animation: cyberFloat1 2.2s ease-in-out infinite; }
        .cyber-particle-2 { animation: cyberFloat2 2.7s ease-in-out infinite; }
        .cyber-particle-3 { animation: cyberFloat3 3.1s ease-in-out infinite; }
        .cyber-particle-4 { animation: cyberFloat4 2.4s ease-in-out infinite; }
        .cyber-particle-5 { animation: cyberFloat5 2.9s ease-in-out infinite; }
        .cyber-particle-6 { animation: cyberFloat6 2.6s ease-in-out infinite; }

        @keyframes cyberPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.03); }
        }
        @keyframes cyberBlink {
            0%, 90%, 100% { opacity: 1; }
            95% { opacity: 0.2; }
        }
        @keyframes cyberAntennaBob {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-2px); }
        }
        @keyframes cyberFloat1 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
            50% { transform: translate(4px, -4px) rotate(180deg); opacity: 1; }
        }
        @keyframes cyberFloat2 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(-3px, -5px) rotate(-180deg); opacity: 1; }
        }
        @keyframes cyberFloat3 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
            50% { transform: translate(5px, -3px) rotate(90deg); opacity: 1; }
        }
        @keyframes cyberFloat4 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.9; }
            50% { transform: translate(-4px, -6px) rotate(-90deg); opacity: 1; }
        }
        @keyframes cyberFloat5 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
            50% { transform: translate(3px, -4px) rotate(270deg); opacity: 1; }
        }
        @keyframes cyberFloat6 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(-5px, -3px) rotate(45deg); opacity: 1; }
        }

        /* SPACE ALIEN Animations 👾 */
        .alien-body { animation: alienFloat 3s ease-in-out infinite; }
        .alien-eye-left, .alien-eye-right { animation: alienBlink 5s infinite; }
        .alien-antenna { animation: alienAntennaBob 2.2s ease-in-out infinite; }
        .alien-particle-1 { animation: alienFloat1 2.8s ease-in-out infinite; }
        .alien-particle-2 { animation: alienFloat2 3.3s ease-in-out infinite; }
        .alien-particle-3 { animation: alienFloat3 2.9s ease-in-out infinite; }
        .alien-particle-4 { animation: alienFloat4 3.1s ease-in-out infinite; }

        @keyframes alienFloat {
            0%, 100% { transform: translateY(0) scale(1); }
            50% { transform: translateY(-4px) scale(1.01); }
        }
        @keyframes alienBlink {
            0%, 90%, 100% { opacity: 1; }
            95% { opacity: 0.4; }
        }
        @keyframes alienAntennaBob {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-1px) rotate(1deg); }
        }
        @keyframes alienFloat1 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(3px, -4px) rotate(180deg); opacity: 1; }
        }
        @keyframes alienFloat2 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
            50% { transform: translate(-2px, -5px) rotate(-180deg); opacity: 1; }
        }
        @keyframes alienFloat3 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
            50% { transform: translate(4px, -3px) rotate(90deg); opacity: 1; }
        }
        @keyframes alienFloat4 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(-3px, -4px) rotate(-90deg); opacity: 1; }
        }

        /* KITSUNE FOX Animations 🦊 */
        .kitsune-body { animation: kitsuneFloat 2.8s ease-in-out infinite; }
        .kitsune-tail-1, .kitsune-tail-2, .kitsune-tail-3, .kitsune-tail-4, .kitsune-tail-5, .kitsune-tail-6, .kitsune-tail-7, .kitsune-tail-8, .kitsune-tail-9 {
            animation: kitsuneTailWave 2s ease-in-out infinite;
        }
        .kitsune-eye-left, .kitsune-eye-right { animation: kitsuneBlink 4.5s infinite; }
        .kitsune-particle-1 { animation: kitsuneFloat1 2.6s ease-in-out infinite; }
        .kitsune-particle-2 { animation: kitsuneFloat2 3.2s ease-in-out infinite; }
        .kitsune-particle-3 { animation: kitsuneFloat3 2.9s ease-in-out infinite; }
        .kitsune-particle-4 { animation: kitsuneFloat4 3.4s ease-in-out infinite; }
        .kitsune-particle-5 { animation: kitsuneFloat5 2.7s ease-in-out infinite; }
        .kitsune-particle-6 { animation: kitsuneFloat6 3.0s ease-in-out infinite; }

        @keyframes kitsuneFloat {
            0%, 100% { transform: translateY(0) scale(1); }
            50% { transform: translateY(-3px) scale(1.02); }
        }
        @keyframes kitsuneTailWave {
            0%, 100% { transform: rotate(0deg); }
            50% { transform: rotate(5deg); }
        }
        @keyframes kitsuneBlink {
            0%, 90%, 100% { opacity: 1; }
            95% { opacity: 0.3; }
        }
        @keyframes kitsuneFloat1 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
            50% { transform: translate(3px, -4px) rotate(180deg); opacity: 1; }
        }
        @keyframes kitsuneFloat2 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(-2px, -5px) rotate(-180deg); opacity: 1; }
        }
        @keyframes kitsuneFloat3 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
            50% { transform: translate(4px, -3px) rotate(90deg); opacity: 1; }
        }
        @keyframes kitsuneFloat4 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.9; }
            50% { transform: translate(-3px, -4px) rotate(-90deg); opacity: 1; }
        }
        @keyframes kitsuneFloat5 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
            50% { transform: translate(2px, -4px) rotate(270deg); opacity: 1; }
        }
        @keyframes kitsuneFloat6 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
            50% { transform: translate(-4px, -3px) rotate(45deg); opacity: 1; }
        }

        /* Pet Selector Top Row 🐾 */
        .pet-selector-top {
            display: flex;
            justify-content: center;
            gap: 8px;
            padding: 10px 20px;
            background: rgba(0, 0, 0, 0.1);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .pet-btn-top {
            width: 40px;
            height: 40px;
            border: 2px solid rgba(255,255,255,0.3);
            border-radius: 8px;
            background: rgba(0,0,0,0.2);
            color: white;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
            transition: all 0.2s;
        }

        .pet-btn-top:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.6);
            transform: scale(1.1);
        }

        .pet-btn-top.active {
            background: rgba(255,255,255,0.3);
            border-color: #10b981;
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
        }

        .pet-btn-top span {
            display: block;
            line-height: 1;
        }

        /* Old Pet Selector (hidden) */
        .pet-selector {
            display: none;
        }

        .pet-btn {
            width: 35px;
            height: 35px;
            border: 2px solid rgba(255,255,255,0.3);
            border-radius: 8px;
            background: rgba(0,0,0,0.2);
            color: white;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
        }

        .pet-btn:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.6);
            transform: scale(1.1);
        }

        .pet-btn.active {
            background: rgba(255,255,255,0.3);
            border-color: #10b981;
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
        }

        .pet-btn span {
            display: block;
            line-height: 1;
        }

        /* Pet Display Rules 🐾 - FIXED! */
        .kawai-pet, .retro-pet, .premium-pet, .neko-pet, .cyber-pet, .alien-pet, .kitsune-pet,
        .santa-pet, .snowman-pet, .reindeer-pet, .tree-pet {
            display: none !important;
        }

        /* Show active pet based on data-pet attribute */
        body[data-pet="kawai"] .kawai-pet { display: block !important; }
        body[data-pet="retro"] .retro-pet { display: block !important; }
        body[data-pet="premium"] .premium-pet { display: block !important; }
        body[data-pet="neko"] .neko-pet { display: block !important; }
        body[data-pet="cyber"] .cyber-pet { display: block !important; }
        body[data-pet="alien"] .alien-pet { display: block !important; }
        body[data-pet="kitsune"] .kitsune-pet { display: block !important; }
        body[data-pet="santa"] .santa-pet { display: block !important; }
        body[data-pet="snowman"] .snowman-pet { display: block !important; }
        body[data-pet="reindeer"] .reindeer-pet { display: block !important; }
        body[data-pet="tree"] .tree-pet { display: block !important; }

        /* FALLBACK: If no data-pet attribute, show kawai pet by default */
        body:not([data-pet]) .kawai-pet { display: block !important; }

        .pet-area {
            position: relative;
            height: 300px;
            background: var(--theme-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            overflow: hidden;
        }

        /* Magical Space Background Elements 🌌 */

        /* Planets - floating circles */
        .cloud {
            position: absolute;
            border-radius: 50%;
            opacity: 0.3;
            animation: floatPlanet 25s infinite ease-in-out;
            filter: blur(1px);
            pointer-events: none;
        }

        .cloud1 {
            width: 80px;
            height: 80px;
            top: 30px;
            left: -80px;
            background: radial-gradient(circle at 30% 30%, #FDE68A, #F59E0B);
            animation-delay: 0s;
        }

        .cloud2 {
            width: 60px;
            height: 60px;
            top: 180px;
            left: -60px;
            background: radial-gradient(circle at 30% 30%, #FBCFE8, #EC4899);
            animation-delay: 8s;
        }

        .cloud3 {
            width: 50px;
            height: 50px;
            top: 100px;
            left: -50px;
            background: radial-gradient(circle at 30% 30%, #C4B5FD, #9333EA);
            animation-delay: 15s;
        }

        @keyframes floatPlanet {
            0% {
                transform: translateX(0) translateY(0) scale(1);
                opacity: 0;
            }
            10% {
                opacity: 0.3;
            }
            50% {
                transform: translateX(400px) translateY(-20px) scale(1.1);
                opacity: 0.35;
            }
            90% {
                opacity: 0.3;
            }
            100% {
                transform: translateX(500px) translateY(0) scale(1);
                opacity: 0;
            }
        }

        /* Background Stars 🌟 */
        .bg-star {
            position: absolute;
            font-size: 16px;
            opacity: 0.6;
            animation: twinkle 3s infinite ease-in-out;
            pointer-events: none;
            z-index: 1;
        }

        @keyframes twinkle {
            0%, 100% {
                opacity: 0.3;
                transform: scale(0.9);
            }
            50% {
                opacity: 0.8;
                transform: scale(1.1);
            }
        }

        /* Heart Clouds 💜 */
        .heart-cloud {
            position: absolute;
            font-size: 24px;
            opacity: 0.4;
            animation: floatHeart 20s infinite ease-in-out;
            pointer-events: none;
            z-index: 1;
        }

        @keyframes floatHeart {
            0% {
                transform: translateX(0) translateY(0) scale(1);
                opacity: 0;
            }
            10% {
                opacity: 0.4;
            }
            50% {
                transform: translateX(350px) translateY(-30px) scale(1.2);
                opacity: 0.5;
            }
            90% {
                opacity: 0.4;
            }
            100% {
                transform: translateX(500px) translateY(0) scale(1);
                opacity: 0;
            }
        }

        .pet-sprite {
            width: 140px;
            height: 140px;
            transition: transform 0.2s ease, filter 0.2s ease;
            filter: drop-shadow(4px 6px 12px rgba(0,0,0,0.3));
            position: relative;
            z-index: 10;
        }

        .pet-sprite:hover {
            transform: scale(1.05);
            filter: drop-shadow(4px 8px 16px rgba(102, 126, 234, 0.5));
        }

        .pet-sprite:active {
            transform: scale(0.92);
            filter: brightness(1.2) drop-shadow(0 0 20px rgba(251, 191, 36, 0.8));
        }

        .pet-sprite.bounce {
            animation: petBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

        @keyframes petBounce {
            0%, 100% { transform: translateY(0) scale(1); }
            25% { transform: translateY(-15px) scale(1.1); }
            50% { transform: translateY(-25px) scale(1.15); }
            75% { transform: translateY(-10px) scale(1.05); }
        }

        .click-effect {
            position: absolute;
            color: #C084FC;
            font-size: 28px;
            font-weight: bold;
            text-shadow:
                0 0 10px rgba(192, 132, 252, 0.9),
                0 0 20px rgba(192, 132, 252, 0.7),
                0 0 30px rgba(147, 51, 234, 0.5),
                2px 2px 4px rgba(0,0,0,0.6);
            pointer-events: none;
            animation: floatUpGlow 1.2s ease-out forwards;
            font-family: 'Courier New', monospace;
            filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.6));
        }

        @keyframes floatUpGlow {
            0% {
                opacity: 1;
                transform: translateY(0) scale(0.8);
                filter: brightness(1.5);
            }
            50% {
                transform: translateY(-40px) scale(1.2);
                filter: brightness(2);
            }
            100% {
                opacity: 0;
                transform: translateY(-100px) scale(0.6);
                filter: brightness(0.5);
            }
        }

        /* Enhanced Particle Effects */
        .particle-burst {
            position: absolute;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            pointer-events: none;
            z-index: 999;
        }

        .particle-burst.gold {
            background: radial-gradient(circle, #ffd700, #ffed4e);
            box-shadow: 0 0 10px #ffd700, 0 0 20px #ffed4e;
            animation: burstGold 0.8s ease-out forwards;
        }

        .particle-burst.pink {
            background: radial-gradient(circle, #ff69b4, #ff1493);
            box-shadow: 0 0 10px #ff69b4, 0 0 20px #ff1493;
            animation: burstPink 0.8s ease-out forwards;
        }

        .particle-burst.purple {
            background: radial-gradient(circle, #9d7bff, #667eea);
            box-shadow: 0 0 10px #9d7bff, 0 0 20px #667eea;
            animation: burstPurple 0.8s ease-out forwards;
        }

        @keyframes burstGold {
            0% {
                transform: translate(0, 0) scale(1);
                opacity: 1;
            }
            100% {
                transform: translate(var(--tx), var(--ty)) scale(0);
                opacity: 0;
            }
        }

        @keyframes burstPink {
            0% {
                transform: translate(0, 0) scale(1) rotate(0deg);
                opacity: 1;
            }
            100% {
                transform: translate(var(--tx), var(--ty)) scale(0) rotate(360deg);
                opacity: 0;
            }
        }

        @keyframes burstPurple {
            0% {
                transform: translate(0, 0) scale(1);
                opacity: 1;
            }
            100% {
                transform: translate(var(--tx), var(--ty)) scale(0.2);
                opacity: 0;
            }
        }

        .stats-area {
            padding: 20px;
            background: #1a202c;
        }

        .stat-bar {
            margin-bottom: 15px;
        }

        .stat-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: 5px;
            font-size: 14px;
        }

        .stat-progress {
            width: 100%;
            height: 20px;
            background: #2d3748;
            border: 2px solid #4a5568;
            border-radius: 10px;
            overflow: hidden;
            position: relative;
        }

        .stat-fill {
            height: 100%;
            transition: width 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .stat-fill.hp { background: linear-gradient(90deg, #f56565 0%, #fc8181 100%); }
        .stat-fill.food { background: linear-gradient(90deg, #ed8936 0%, #f6ad55 100%); }
        .stat-fill.happy { background: linear-gradient(90deg, #48bb78 0%, #68d391 100%); }
        .stat-fill.xp { background: linear-gradient(90deg, #4299e1 0%, #63b3ed 100%); }

        /* Pixel pattern overlay */
        .stat-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image:
                repeating-linear-gradient(90deg, rgba(255,255,255,0.1) 0px, rgba(255,255,255,0.1) 2px, transparent 2px, transparent 4px);
        }

        .stat-value {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 12px;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
            z-index: 1;
        }

        .actions-area {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            padding: 20px;
            background: #2d3748;
        }

        .action-btn {
            padding: 15px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: 3px solid #4a5568;
            border-radius: 10px;
            color: white;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s ease;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        }

        .action-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(0,0,0,0.4);
        }

        .action-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 5px rgba(0,0,0,0.3);
        }

        .action-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .action-btn.feed {
            background: linear-gradient(135deg, #ed8936 0%, #f6ad55 100%);
        }

        .action-btn.play {
            background: linear-gradient(135deg, #48bb78 0%, #68d391 100%);
        }

        .action-btn.heal {
            background: linear-gradient(135deg, #f56565 0%, #fc8181 100%);
        }

        .message-area {
            padding: 15px;
            background: #1a202c;
            text-align: center;
            font-size: 14px;
            min-height: 50px;
            border-top: 2px solid #4a5568;
        }

        .message {
            animation: fadeIn 0.5s ease;
        }

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

        .save-btn {
            width: calc(100% - 40px);
            margin: 20px;
            padding: 15px;
            background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
            border: 3px solid #4a5568;
            border-radius: 10px;
            color: white;
            font-family: 'Courier New', monospace;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        }

        .save-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(0,0,0,0.4);
        }

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

        /* Achievement popup */
        .achievement-popup {
            position: fixed;
            top: 20px;
            right: -400px;
            background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
            padding: 15px 20px;
            border-radius: 10px;
            border: 3px solid #065f46;
            box-shadow: 0 4px 15px rgba(0,0,0,0.5);
            transition: right 0.5s ease;
            z-index: 1000;
            max-width: 300px;
        }

        .achievement-popup.show {
            right: 20px;
        }

        .achievement-title {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .achievement-desc {
            font-size: 12px;
            opacity: 0.9;
        }

        /* Combo counter - More subtle */
        .combo-counter {
            position: absolute;
            top: 15px;
            right: 15px;
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.8) 0%, rgba(249, 115, 22, 0.8) 100%);
            color: white;
            padding: 6px 12px;
            border-radius: 12px;
            border: 2px solid rgba(251, 191, 36, 0.4);
            font-size: 14px;
            font-weight: bold;
            opacity: 0;
            transform: scale(0.8);
            transition: all 0.25s ease;
            pointer-events: none;
            box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
            backdrop-filter: blur(4px);
        }

        .combo-counter.active {
            opacity: 0.85;
            transform: scale(1);
        }

        /* Shop button (inside pet window) */
        .shop-btn {
            position: absolute;
            bottom: 15px;
            right: 15px;
            background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
            border: 2px solid #78350f;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0,0,0,0.4);
            transition: all 0.2s ease;
            z-index: 1100; /* Увеличен для приоритета над другими элементами */
            pointer-events: auto;
        }

        .shop-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 20px rgba(0,0,0,0.5);
        }

        .shop-btn:active {
            transform: scale(0.95);
        }

        /* Shop modal */
        .shop-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.8);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
        }

        .shop-modal.active {
            display: flex;
        }

        .shop-content {
            background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
            border-radius: 0;
            border: none;
            padding: 20px;
            width: 100%;
            height: 100vh;
            max-width: 100%;
            max-height: 100vh;
            overflow-y: auto;
            position: relative;
        }

        .shop-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 3px solid #4a5568;
        }

        .shop-header h2 {
            font-size: 32px;
            margin: 0;
            color: #fbbf24;
            text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
        }

        .close-btn {
            background: #ef4444;
            border: none;
            color: white;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            cursor: pointer;
            font-weight: bold;
        }

        .shop-item {
            background: #1a202c;
            border: 2px solid #4a5568;
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .shop-item-info {
            flex: 1;
        }

        .shop-item-name {
            font-weight: bold;
            font-size: 14px;
            margin-bottom: 5px;
        }

        .shop-item-desc {
            font-size: 11px;
            opacity: 0.8;
            margin-bottom: 5px;
        }

        .shop-item-price {
            color: #fbbf24;
            font-weight: bold;
        }

        .buy-btn {
            background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
            border: 2px solid #065f46;
            color: white;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-family: 'Courier New', monospace;
            font-weight: bold;
        }

        .buy-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Shop Tabs */
        .shop-tabs {
            display: flex;
            gap: 15px;
            margin-bottom: 30px;
            border-bottom: 3px solid #4a5568;
            padding-bottom: 15px;
        }

        .shop-tab {
            font-size: 16px;
            padding: 12px 20px;
        }

        .shop-tab {
            flex: 1;
            padding: 10px;
            background: rgba(255,255,255,0.05);
            border: 2px solid transparent;
            border-radius: 10px 10px 0 0;
            color: #a0aec0;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s;
        }

        .shop-tab.active {
            background: #8b5cf6;
            color: white;
            border-color: #7c3aed;
        }

        .shop-tab:hover {
            background: rgba(139, 92, 246, 0.3);
        }

        /* Shop Sections */
        .shop-section {
            max-height: 50vh;
            overflow-y: auto;
        }

        /* Shop Section Container */
        .shop-section {
            max-height: calc(100vh - 200px);
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 5px;
        }

        /* Custom scrollbar for shop sections */
        .shop-section::-webkit-scrollbar {
            width: 8px;
        }

        .shop-section::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 4px;
        }

        .shop-section::-webkit-scrollbar-thumb {
            background: rgba(139, 92, 246, 0.5);
            border-radius: 4px;
        }

        .shop-section::-webkit-scrollbar-thumb:hover {
            background: rgba(139, 92, 246, 0.8);
        }

        /* Skins Grid - Telegram style */
        .skins-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            padding: 10px;
        }

        .skin-card-shop {
            background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
            border: 2px solid rgba(255,255,255,0.2);
            border-radius: 15px;
            padding: 15px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
        }

        .skin-card-shop:hover {
            transform: translateY(-8px) scale(1.05);
            border-color: #8b5cf6;
            box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5);
        }

        .skin-card-shop.owned {
            border-color: #22c55e;
            background: linear-gradient(145deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
        }

        .skin-card-shop.equipped {
            border-color: #fbbf24;
            background: linear-gradient(145deg, rgba(251, 191, 36, 0.3), rgba(251, 191, 36, 0.1));
        }

        .skin-preview-mini {
            width: 80px;
            height: 80px;
            margin: 0 auto 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 50px;
            animation: floatSkin 3s ease-in-out infinite;
        }

        @keyframes floatSkin {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            50% { transform: translateY(-10px) rotate(5deg); }
        }

        .skin-name-shop {
            font-size: 14px;
            font-weight: bold;
            color: white;
            margin-bottom: 5px;
        }

        .skin-rarity-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: bold;
            margin-bottom: 8px;
            text-transform: uppercase;
        }

        .rarity-default { background: #6b7280; }
        .rarity-common { background: #22c55e; }
        .rarity-rare { background: #3b82f6; }
        .rarity-epic { background: #a855f7; }
        .rarity-legendary {
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            animation: rarityGlow 2s infinite;
        }
        .rarity-mythic {
            background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
            animation: rarityGlow 1.5s infinite;
            box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
        }
        .rarity-xmas {
            background: linear-gradient(135deg, #ef4444, #22c55e);
            animation: rarityGlow 2s infinite;
        }
        .rarity-xmas {
            background: linear-gradient(135deg, #dc2626, #16a34a);
            animation: xmasGlow 2s infinite;
        }

        @keyframes rarityGlow {
            0%, 100% { box-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }
            50% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.8); }
        }

        @keyframes xmasGlow {
            0%, 100% { box-shadow: 0 0 10px rgba(220, 38, 38, 0.5); }
            50% { box-shadow: 0 0 15px rgba(22, 163, 74, 0.7); }
        }

        .skin-price-shop {
            color: #fbbf24;
            font-size: 16px;
            font-weight: bold;
            margin: 8px 0;
        }

        .skin-bonus-shop {
            font-size: 10px;
            color: #c4b5fd;
            background: rgba(139, 92, 246, 0.3);
            padding: 5px;
            border-radius: 6px;
            margin-bottom: 8px;
            min-height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .skin-buy-btn {
            width: 100%;
            padding: 8px;
            background: linear-gradient(135deg, #8b5cf6, #7c3aed);
            border: none;
            border-radius: 8px;
            color: white;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 12px;
        }

        .skin-buy-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(139, 92, 246, 0.5);
        }

        .skin-buy-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .skin-buy-btn.owned {
            background: linear-gradient(135deg, #22c55e, #16a34a);
        }

        .skin-buy-btn.equipped {
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
        }

        /* Premium Badge */
        .premium-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            color: white;
            padding: 4px 8px;
            border-radius: 8px;
            font-size: 9px;
            font-weight: bold;
            animation: pulse 2s infinite;
        }

        .limited-badge-shop {
            position: absolute;
            top: 8px;
            left: 8px;
            background: #ef4444;
            color: white;
            padding: 4px 8px;
            border-radius: 8px;
            font-size: 9px;
            font-weight: bold;
        }

        /* Skins Filter */
        .skins-filter {
            display: flex;
            gap: 8px;
            margin-bottom: 15px;
            overflow-x: auto;
            padding: 5px;
        }

        .skin-filter-btn {
            padding: 6px 12px;
            background: rgba(255,255,255,0.1);
            border: 2px solid rgba(255,255,255,0.2);
            border-radius: 20px;
            color: white;
            font-size: 11px;
            font-weight: bold;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.3s;
        }

        .skin-filter-btn.active {
            background: #8b5cf6;
            border-color: #7c3aed;
        }

        .skin-filter-btn:hover {
            transform: scale(1.05);
        }

        /* Purchase Success Animation */
        @keyframes purchaseSuccess {
            0% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.2); opacity: 0.8; }
            100% { transform: scale(1); opacity: 1; }
        }

        .purchase-success {
            animation: purchaseSuccess 0.5s ease-in-out;
        }

        /* Daily quest */
        .quest-area {
            padding: 15px;
            background: #1a202c;
            border-top: 2px solid #4a5568;
        }

        .quest-item {
            background: rgba(102, 126, 234, 0.2);
            border: 2px solid #667eea;
            border-radius: 8px;
            padding: 10px;
            margin-bottom: 10px;
        }

        .quest-progress {
            display: flex;
            justify-content: space-between;
            margin-top: 5px;
            font-size: 12px;
        }

        .quest-reward {
            color: #fbbf24;
            font-weight: bold;
        }

        .pet-emoji {
            font-size: 100px;
            cursor: pointer;
            transition: transform 0.1s ease;
            filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.3));
        }

        .pet-emoji:active {
            transform: scale(0.95);
        }

        /* Status indicators */
        .status-warning {
            color: #fbbf24;
        }

        .status-critical {
            color: #f87171;
            animation: pulse 1s infinite;
        }

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

        /* Pet status overlay */
        .pet-status {
            position: absolute;
            top: 10px;
            left: 10px;
            background: rgba(0,0,0,0.7);
            padding: 5px 10px;
            border-radius: 10px;
            font-size: 12px;
            font-weight: bold;
            display: none;
        }

        .pet-status.critical {
            background: rgba(239, 68, 68, 0.8);
            animation: pulse 0.5s infinite;
        }

        .pet-status.warning {
            background: rgba(251, 191, 36, 0.8);
        }

        .pet-status.good {
            background: rgba(16, 185, 129, 0.8);
        }

        /* Pet mood indicator */
        .pet-mood {
            position: absolute;
            bottom: 10px;
            left: 10px;
            font-size: 24px;
            opacity: 0.8;
        }

        /* Auto-save indicator */
        .auto-save-indicator {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(34, 197, 94, 0.9);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: bold;
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .auto-save-indicator.show {
            opacity: 1;
        }

        .auto-save-indicator.saving .save-status {
            animation: pulse 1s infinite;
        }

        .auto-save-indicator.saved .save-status {
            color: #22c55e;
        }

        .auto-save-indicator.error .save-status {
            color: #ef4444;
        }

        /* BLOB Pet Animations - Optimized */
        .vector-pet {
            transition: all 0.3s ease;
            cursor: pointer;
            will-change: transform;
        }

        .vector-pet:hover {
            transform: scale(1.08);
            filter: brightness(1.15);
        }

        .vector-pet:active {
            transform: scale(0.92);
        }

        /* Blob Body Breathing - Optimized */
        .blob-body {
            animation: blobBreathe 4s ease-in-out infinite;
            transform-origin: center;
            will-change: transform;
        }

        .blob-aura {
            animation: auraPulse 3s ease-in-out infinite;
            will-change: opacity, transform;
        }

        .blob-shine {
            animation: shineMove 5s ease-in-out infinite;
            will-change: transform, opacity;
        }

        /* Eye Blinking */
        .blob-pupil-left, .blob-pupil-right {
            animation: blink 5s infinite;
        }

        /* Reduced animations for performance */
        .blob-antenna {
            animation: antennaBob 3s ease-in-out infinite;
            transform-origin: 100px 50px;
            will-change: transform;
        }

        /* Arms - simplified */
        .blob-arm-left, .blob-arm-right {
            animation: none;
        }

        /* Feet - simplified */
        .blob-foot-left, .blob-foot-right {
            animation: none;
        }

        /* Blush - simplified */
        .blob-blush-left, .blob-blush-right {
            animation: none;
        }

        /* Particles Floating - ENABLED for magic! ✨ */
        .particle-1 {
            animation: particleFloat1 3s ease-in-out infinite;
        }
        .particle-2 {
            animation: particleFloat2 3.5s ease-in-out infinite;
        }
        .particle-3 {
            animation: particleFloat3 2.8s ease-in-out infinite;
        }
        .particle-4 {
            animation: particleFloat4 3.2s ease-in-out infinite;
        }
        .particle-5 {
            animation: particleFloat5 3.7s ease-in-out infinite;
        }
        .particle-6 {
            animation: particleFloat1 4s ease-in-out infinite reverse;
        }
        .particle-7 {
            animation: particleFloat2 3.3s ease-in-out infinite reverse;
        }

        /* Stars twinkling */
        .star-1, .star-2, .star-3 {
            animation: starTwinkle 2s ease-in-out infinite;
        }

        /* Mobile performance optimizations */
        @media (max-width: 768px) or (hover: none) {
            .blob-body {
                animation: none; /* Disable breathing on mobile */
            }

            .blob-aura {
                opacity: 0.3; /* Static aura on mobile */
                animation: none;
            }

            .blob-shine {
                animation: none; /* Disable shine animation */
            }

            .vector-pet {
                will-change: auto; /* Remove will-change on mobile */
            }

            /* Disable particle animations on mobile */
            .particle-1, .particle-2, .particle-3, .particle-4, .particle-5, .particle-6, .particle-7 {
                animation: none !important;
            }

            .star-1, .star-2, .star-3 {
                animation: none !important;
            }
        }


        /* Keyframes for BLOB */
        @keyframes blobBreathe {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.04);
            }
        }

        @keyframes auraPulse {
            0%, 100% { opacity: 0.4; transform: scale(1); }
            50% { opacity: 0.6; transform: scale(1.05); }
        }

        @keyframes shineMove {
            0%, 100% { transform: translate(0, 0); opacity: 0.6; }
            50% { transform: translate(5px, -5px); opacity: 0.8; }
        }

        @keyframes blink {
            0%, 90%, 100% { transform: scaleY(1); opacity: 1; }
            95% { transform: scaleY(0.1); opacity: 0.5; }
        }

        @keyframes antennaBob {
            0%, 100% { transform: rotate(0deg); }
            25% { transform: rotate(-8deg); }
            50% { transform: rotate(0deg); }
            75% { transform: rotate(8deg); }
        }

        @keyframes footWiggle {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(2px); }
        }

        @keyframes blushPulse {
            0%, 100% { opacity: 0.5; transform: scale(1); }
            50% { opacity: 0.7; transform: scale(1.1); }
        }

        @keyframes particleFloat1 {
            0%, 100% { transform: translate(0, 0); opacity: 0.6; }
            50% { transform: translate(-3px, -10px); opacity: 1; }
        }

        @keyframes particleFloat2 {
            0%, 100% { transform: translate(0, 0); opacity: 0.5; }
            50% { transform: translate(5px, -8px); opacity: 0.9; }
        }

        @keyframes particleFloat3 {
            0%, 100% { transform: translate(0, 0); opacity: 0.7; }
            50% { transform: translate(-2px, -12px); opacity: 1; }
        }

        @keyframes particleFloat4 {
            0%, 100% { transform: translate(0, 0); opacity: 0.6; }
            50% { transform: translate(4px, -6px); opacity: 0.95; }
        }

        @keyframes particleFloat5 {
            0%, 100% { transform: translate(0, 0); opacity: 0.5; }
            50% { transform: translate(-4px, -9px); opacity: 0.85; }
        }

        /* New animations */
        @keyframes sparkle {
            0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
            50% { opacity: 1; transform: scale(1) rotate(180deg); }
        }

        @keyframes heartFloat {
            0% { transform: translateY(0px) scale(1); opacity: 1; }
            100% { transform: translateY(-50px) scale(0.5); opacity: 0; }
        }

        @keyframes starTwinkle {
            0%, 100% { opacity: 0.3; transform: scale(1); }
            50% { opacity: 1; transform: scale(1.2); }
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0px); }
            25% { transform: translateX(-2px); }
            75% { transform: translateX(2px); }
        }

        @keyframes glow {
            0%, 100% { filter: drop-shadow(0 0 5px rgba(255, 182, 193, 0.5)); }
            50% { filter: drop-shadow(0 0 15px rgba(255, 182, 193, 0.8)); }
        }

        /* Pet States */
        .vector-pet.sad .vector-pet path[stroke="#FF69B4"] {
            d: path("M 55 52 Q 60 48 65 52");
        }

        .vector-pet.happy .vector-pet path[stroke="#FF69B4"] {
            d: path("M 55 52 Q 60 58 65 52");
        }

        .vector-pet.sleepy .vector-pet circle[fill="#333"] {
            transform: scaleY(0.3);
        }

        /* New Emotion States */
        .vector-pet.angry {
            animation: shake 0.5s infinite;
        }

        .vector-pet.angry #mouth-path {
            d: path("M 55 52 Q 60 50 65 52");
        }

        .vector-pet.surprised {
            animation: bounce 1s infinite;
        }

        .vector-pet.surprised #mouth-path {
            d: path("M 58 50 Q 60 56 62 50");
        }

        .vector-pet.love {
            animation: glow 2s infinite;
        }

        .vector-pet.love #mouth-path {
            d: path("M 55 52 Q 60 58 65 52");
        }

        /* Mini Games Button */
        .minigames-btn {
            width: calc(100% - 40px);
            margin: 10px 20px;
            padding: 15px;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            border: 3px solid #065f46;
            border-radius: 10px;
            color: white;
            font-family: 'Courier New', monospace;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
            transition: all 0.2s;
        }

        .minigames-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(0,0,0,0.4);
        }

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

        /* Leaderboard Button */
        .leaderboard-btn {
            width: calc(100% - 40px);
            margin: 10px 20px 20px 20px;
            padding: 15px;
            background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
            border: 3px solid #78350f;
            border-radius: 10px;
            color: white;
            font-family: 'Courier New', monospace;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
            transition: all 0.2s;
        }

        .leaderboard-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(251, 191, 36, 0.4);
        }

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

        /* Help Button */
        .help-btn {
            width: calc(100% - 40px);
            margin: 10px 20px 20px 20px;
            padding: 15px;
            background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
            border: 3px solid #5b21b6;
            border-radius: 10px;
            color: white;
            font-family: 'Courier New', monospace;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
            transition: all 0.2s;
        }

        .help-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(139, 92, 246, 0.4);
        }

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

        /* Navigation Buttons Container */
        .nav-buttons {
            display: flex;
            gap: 0px;
            margin: 15px 20px;
            justify-content: space-between;
        }

        .nav-btn {
            flex: 1;
            padding: 12px 8px;
            border: none;
            border-radius: 8px;
            color: white;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 3px 8px rgba(0,0,0,0.3);
            transition: all 0.2s;
            min-width: 0;
            max-width: none;
            width: 100%;
            margin: 0 2px;
        }

        .nav-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 12px rgba(0,0,0,0.4);
        }

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

        /* More Menu Styles */
        .more-menu-container {
            position: relative;
            flex: 1;
            min-width: 0;
            max-width: none;
            margin: 0 2px;
        }

        .more-menu-container {
            position: relative;
        }

        .more-menu-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 5px);
            right: 0;
            background: linear-gradient(135deg, #1a202c, #2d3748);
            border: 2px solid #4a5568;
            border-radius: 10px;
            padding: 10px;
            min-width: 150px;
            z-index: 1000;
            box-shadow: 0 8px 25px rgba(0,0,0,0.5);
            animation: fadeIn 0.2s ease-in-out;
        }

        .more-menu-dropdown.show {
            display: block !important;
        }

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

        .more-menu-item {
            width: 100%;
            padding: 12px;
            margin: 5px 0;
            background: rgba(139, 92, 246, 0.2);
            border: 1px solid #8b5cf6;
            border-radius: 8px;
            color: white;
            cursor: pointer;
            text-align: left;
            font-size: 14px;
            transition: all 0.2s;
            font-family: 'Courier New', monospace;
        }

        .more-menu-item:hover {
            background: rgba(139, 92, 246, 0.4);
            border-color: #a78bfa;
            transform: translateX(5px);
        }

        .more-menu-item:active {
            transform: scale(0.95);
        }

        /* Individual nav button styles - UNIFIED DESIGN */
        .nav-btn.help-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: 2px solid rgba(255,255,255,0.2);
        }

        .nav-btn.minigames-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: 2px solid rgba(255,255,255,0.2);
        }

        .nav-btn.care-btn {
            background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
            border: 2px solid rgba(255,255,255,0.2);
        }

        .nav-btn.leaderboard-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: 2px solid rgba(255,255,255,0.2);
        }

        .nav-btn.referral-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .nav-btn.nft-btn {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            border: 2px solid rgba(255,255,255,0.2);
        }

        .nav-btn.active {
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25), 0 10px 25px rgba(0,0,0,0.35);
            transform: translateY(-1px);
        }

        /* Care Ritual Modal */
        .care-modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.75);
            z-index: 3100;
            justify-content: center;
            align-items: flex-end;
            padding: 18px;
        }

        .care-modal.show {
            display: flex;
        }

        .care-panel {
            width: min(720px, 100%);
            background: rgba(0, 0, 0, 0.35);
            border: 2px solid rgba(236, 72, 153, 0.45);
            border-radius: 18px;
            padding: 14px;
            backdrop-filter: blur(12px);
            box-shadow: 0 20px 60px rgba(0,0,0,0.55);
        }

        @media (min-width: 520px) {
            .care-modal {
                align-items: center;
            }
        }

        .care-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
        }

        .care-close {
            background: rgba(255,255,255,0.08);
            border: 2px solid rgba(255,255,255,0.18);
            color: #fff;
            border-radius: 12px;
            width: 42px;
            height: 38px;
            cursor: pointer;
            font-size: 18px;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.15s ease, background 0.15s ease;
            flex: 0 0 auto;
        }

        .care-close:hover {
            transform: scale(1.04);
            background: rgba(255,255,255,0.14);
        }

        .care-mood {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .care-mood-title {
            font-size: 12px;
            opacity: 0.9;
            white-space: nowrap;
        }

        .care-mood-faces {
            display: flex;
            gap: 6px;
            opacity: 0.75;
        }

        .care-mood-faces span {
            filter: grayscale(30%);
            transform: translateY(0);
            transition: transform 0.2s ease, opacity 0.2s ease;
            opacity: 0.55;
        }

        .care-mood-faces span.active {
            opacity: 1;
            transform: translateY(-1px) scale(1.05);
            filter: none;
        }

        .care-actions-counter {
            font-size: 12px;
            opacity: 0.9;
            white-space: nowrap;
        }

        .care-hint {
            font-size: 12px;
            opacity: 0.85;
            margin-bottom: 12px;
            text-align: center;
        }

        .care-actions {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }

        @media (max-width: 520px) {
            .care-actions {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        .care-action-btn {
            padding: 12px 10px;
            border-radius: 14px;
            border: 2px solid rgba(255,255,255,0.18);
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            cursor: pointer;
            font-family: inherit;
            transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
            text-align: center;
        }

        .care-action-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.25);
        }

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

        .care-action-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .care-action-btn .care-label {
            display: block;
            margin-top: 6px;
            font-size: 12px;
            opacity: 0.95;
        }

        .care-action-btn.feed { background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(251, 191, 36, 0.18)); }
        .care-action-btn.pet { background: linear-gradient(135deg, rgba(236, 72, 153, 0.35), rgba(168, 85, 247, 0.18)); }
        .care-action-btn.heal { background: linear-gradient(135deg, rgba(34, 197, 94, 0.35), rgba(16, 185, 129, 0.18)); }
        .care-action-btn.sleep { background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(99, 102, 241, 0.18)); }

        .care-scene {
            margin-top: 12px;
            text-align: center;
            font-size: 12px;
            min-height: 18px;
            opacity: 0.9;
        }

        .care-scene strong {
            color: #FFCA3A;
        }

        /* Mobile responsiveness for nav buttons */
        @media (max-width: 480px) {
            .nav-buttons {
                margin: 10px 15px;
                gap: 8px;
            }

            .nav-btn {
                padding: 10px 6px;
                font-size: 12px;
            }

            /* Pet selector mobile */
            .pet-selector-top {
                padding: 8px 15px;
                gap: 6px;
            }

            .pet-btn-top {
                width: 35px;
                height: 35px;
                font-size: 16px;
            }

            /* Кнопка магазина на мобильных */
            .shop-btn {
                width: 45px;
                height: 45px;
                font-size: 20px;
                bottom: 10px;
                right: 10px;
                /* Убедимся что тач-события работают */
                -webkit-tap-highlight-color: transparent;
                touch-action: manipulation;
            }
        }

        /* Fullscreen mode for platformer */
        :fullscreen #platformer-canvas,
        :-webkit-full-screen #platformer-canvas,
        :-moz-full-screen #platformer-canvas {
            max-width: 100vw;
            max-height: 75vh;
            width: 100%;
            height: auto;
        }

        /* Mobile touch button styles */
        #mobile-controls button {
            user-select: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -webkit-tap-highlight-color: transparent;
        }

        #mobile-controls button:active {
            transform: scale(0.95);
        }

        /* Mini Games Modal */
        .minigames-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 3000;
            justify-content: center;
            align-items: center;
        }

        .minigames-modal.show {
            display: flex;
        }

        .minigames-content {
            background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
            border: 3px solid #10b981;
            border-radius: 15px;
            padding: 20px;
            max-width: 1000px;
            width: 95%;
            max-height: 85vh;
            overflow-y: auto;
            margin: 0 auto;
        }

        .minigames-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #10b981;
        }

        .minigames-header h2 {
            margin: 0;
            color: #10b981;
        }

        .game-selection {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-bottom: 20px;
            width: 100%;
        }

        @media (max-width: 768px) {
            .game-selection {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .minigames-content {
                max-width: 100%;
                width: 100%;
                height: 100vh;
                max-height: 100vh;
                border-radius: 0;
                padding: 10px;
            }

            .game-card {
                min-height: 100px;
                padding: 12px;
            }

            /* Slot Machine Mobile Adaptations */
            #slots-arena h3 {
                font-size: 28px !important;
                margin-bottom: 15px !important;
            }

            #slots-arena #slots-balance-display {
                font-size: 18px !important;
                padding: 10px 15px !important;
                margin-bottom: 10px !important;
            }

            #slots-arena .slots-bet-btn {
                padding: 12px 15px !important;
                font-size: 14px !important;
                flex: 1 1 calc(50% - 5px) !important;
                min-width: calc(50% - 5px) !important;
            }

            #slots-display {
                gap: 8px !important;
                padding: 15px !important;
                margin: 20px 0 !important;
                font-size: 50px !important;
            }

            #slots-arena .slot-reel {
                min-width: 50px !important;
                min-height: 70px !important;
                font-size: 40px !important;
            }

            #slots-arena #slots-result {
                font-size: 18px !important;
                margin: 15px 0 !important;
                min-height: 50px !important;
            }

            #slots-arena #slots-spin-btn {
                padding: 15px 25px !important;
                font-size: 18px !important;
                width: 100% !important;
                margin-bottom: 10px !important;
            }

            #slots-arena button[onclick="backToGames()"] {
                padding: 15px 25px !important;
                font-size: 16px !important;
                width: 100% !important;
                margin-left: 0 !important;
            }

            /* Stats mobile */
            #slots-arena > div[style*="display: flex"][style*="justify-content: center"][style*="gap: 30px"] {
                flex-direction: column !important;
                gap: 8px !important;
                font-size: 14px !important;
            }

            /* Balance Display Mobile */
            #slots-arena > div[style*="text-align: center"][style*="margin-bottom: 30px"] > div {
                padding: 12px 20px !important;
            }

            #slots-arena > div[style*="text-align: center"][style*="margin-bottom: 30px"] span {
                font-size: 14px !important;
            }

            /* Lucky Wheel Mobile */
            #wheel-arena h3 {
                font-size: 28px !important;
                margin-bottom: 15px !important;
            }

            #wheel-arena #wheel-balance-display {
                font-size: 18px !important;
                padding: 10px 15px !important;
                margin-bottom: 10px !important;
            }

            #wheel-arena .wheel-bet-btn {
                padding: 12px 15px !important;
                font-size: 14px !important;
                flex: 1 1 calc(50% - 5px) !important;
                min-width: calc(50% - 5px) !important;
            }

            #wheel-container {
                width: 85vw !important;
                max-width: 350px !important;
                height: 85vw !important;
                max-height: 350px !important;
            }

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

            #wheel-arena #wheel-result {
                font-size: 18px !important;
                margin: 15px 0 !important;
                min-height: 50px !important;
            }

            #wheel-arena #wheel-spin-btn {
                padding: 15px 25px !important;
                font-size: 18px !important;
                width: 100% !important;
                margin-bottom: 10px !important;
            }

            #wheel-arena button[onclick="backToGames()"] {
                padding: 15px 25px !important;
                font-size: 16px !important;
                width: 100% !important;
                margin-left: 0 !important;
            }

            #wheel-arena > div[style*="display: flex"][style*="justify-content: center"][style*="gap: 30px"] {
                flex-direction: column !important;
                gap: 8px !important;
                font-size: 14px !important;
            }

            /* Fullscreen button mobile */
            #slots-fullscreen-btn,
            #wheel-fullscreen-btn {
                padding: 6px 12px !important;
                font-size: 14px !important;
                top: 5px !important;
                right: 5px !important;
            }
        }

        @media (max-width: 480px) {
            #slots-display {
                gap: 5px !important;
                padding: 10px !important;
                font-size: 35px !important;
            }

            #slots-arena .slot-reel {
                min-width: 40px !important;
                min-height: 55px !important;
                font-size: 30px !important;
            }

            #slots-arena .slots-bet-btn {
                padding: 10px 12px !important;
                font-size: 12px !important;
            }

            #wheel-container {
                width: 80vw !important;
                max-width: 280px !important;
                height: 80vw !important;
                max-height: 280px !important;
            }

            #slots-arena h3,
            #wheel-arena h3 {
                font-size: 24px !important;
            }

            #slots-arena #slots-balance-display,
            #wheel-arena #wheel-balance-display {
                font-size: 24px !important;
            }

            .game-card-icon {
                font-size: 22px !important;
            }

            .game-card-name {
                font-size: 12px !important;
            }

            .game-card-cost {
                font-size: 10px !important;
            }
        }

        .game-card {
            background: rgba(16, 185, 129, 0.1);
            border: 2px solid #10b981;
            border-radius: 10px;
            padding: 15px;
            cursor: pointer;
            transition: all 0.2s;
            text-align: center;
            min-height: 120px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .game-card:hover {
            background: rgba(16, 185, 129, 0.2);
            transform: translateY(-2px);
        }

        .game-card-icon {
            font-size: 32px;
            margin-bottom: 5px;
            flex-shrink: 0;
        }

        .game-card-name {
            font-weight: bold;
            margin-bottom: 3px;
            flex-shrink: 0;
            font-size: 16px;
        }

        .game-card-cost {
            font-size: 12px;
            color: #fbbf24;
            flex-shrink: 0;
            text-align: center;
        }

        .game-arena {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
            border: none;
            border-radius: 0;
            padding: 30px;
            min-height: 100vh;
            display: none;
            overflow-y: auto;
            z-index: 1000;
            box-sizing: border-box;
        }

        .game-arena.active {
            display: block;
        }

        /* Fullscreen game content container */
        .game-arena > * {
            max-width: 1400px;
            margin: 0 auto;
        }

        /* Leaderboard Modal */
        .leaderboard-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 2000;
            justify-content: center;
            align-items: center;
        }

        .leaderboard-modal.show {
            display: flex;
        }

        .leaderboard-content {
            background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
            border: 3px solid #4a5568;
            border-radius: 15px;
            padding: 20px;
            max-width: 600px;
            width: 95%;
            max-height: 85vh;
            overflow-y: auto;
        }

        /* Help Modal */
        .help-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 2000;
            justify-content: center;
            align-items: center;
        }

        .help-modal.show {
            display: flex;
        }

        .help-content {
            background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
            border: 3px solid #8b5cf6;
            border-radius: 15px;
            padding: 20px;
            max-width: 800px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
        }

        /* Referral Modal Styles */
        .referral-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 2000;
            justify-content: center;
            align-items: center;
        }

        .referral-modal.show {
            display: flex;
        }

        .referral-content {
            background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
            border: 3px solid #667eea;
            border-radius: 15px;
            padding: 20px;
            max-width: 500px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            color: white;
            font-family: 'Courier New', monospace;
        }

        /* Referral Modal - Fullscreen */
        #referral-modal .referral-content {
            max-width: 100%;
            width: 100%;
            height: 100vh;
            max-height: 100vh;
            border-radius: 0;
            border: none;
            padding: 30px;
            background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
            display: flex;
            flex-direction: column;
        }

        #referral-modal .referral-header {
            flex-shrink: 0;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid rgba(102, 126, 234, 0.3);
        }

        #referral-modal .referral-header h2 {
            font-size: 28px;
            color: #667eea;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            margin: 0;
        }

        #referral-modal .referral-body {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        /* NFT Modal - Fullscreen */
        #nft-modal .referral-content {
            max-width: 100%;
            width: 100%;
            height: 100vh;
            max-height: 100vh;
            border-radius: 0;
            border: none;
            padding: 30px;
            background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
            display: flex;
            flex-direction: column;
        }

        /* Withdraw Modal - Fullscreen */
        #withdraw-modal .referral-content {
            max-width: 100%;
            width: 100%;
            height: 100vh;
            max-height: 100vh;
            border-radius: 0;
            border: none;
            padding: 30px;
            background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
            display: flex;
            flex-direction: column;
        }

        #withdraw-modal .referral-header {
            flex-shrink: 0;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid rgba(16, 185, 129, 0.3);
        }

        #withdraw-modal .referral-header h2 {
            font-size: 28px;
            color: #10b981;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            margin: 0;
        }

        #withdraw-modal .referral-body {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

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

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        .spinner {
            animation: spin 1s linear infinite;
        }

        /* Fullscreen modal styles */
        #withdraw-confirm-modal .referral-content {
            display: flex;
            flex-direction: column;
        }

        #withdraw-confirm-modal .referral-body {
            -webkit-overflow-scrolling: touch;
        }

        #withdraw-confirm-modal button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 25px rgba(0,0,0,0.4);
        }

        #withdraw-confirm-modal button:active {
            transform: translateY(0);
        }

        /* Custom scrollbar for withdrawal history */
        #withdraw-history::-webkit-scrollbar {
            width: 8px;
        }

        #withdraw-history::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 10px;
        }

        #withdraw-history::-webkit-scrollbar-thumb {
            background: rgba(138, 201, 38, 0.5);
            border-radius: 10px;
        }

        #withdraw-history::-webkit-scrollbar-thumb:hover {
            background: rgba(138, 201, 38, 0.7);
        }

        /* Smooth scrolling */
        #withdraw-history {
            scroll-behavior: smooth;
        }

        #nft-modal .referral-header {
            flex-shrink: 0;
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 2px solid rgba(138, 201, 38, 0.3);
        }

        #nft-modal .referral-header h2 {
            font-size: 24px;
            color: #FFB703;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            margin: 0;
        }

        #nft-modal .referral-body {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        #nft-modal .referral-progress {
            flex-shrink: 0;
            margin-bottom: 10px;
            padding: 10px 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            border: 2px solid rgba(138, 201, 38, 0.2);
        }

        #nft-modal .referral-progress h4 {
            font-size: 16px;
            color: #8AC926;
            margin: 0 0 8px 0;
        }

        #nft-modal #nft-stats {
            font-size: 14px;
            color: #fff;
        }

        #nft-modal #nft-collection {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        #nft-modal #nft-grid {
            flex: 1;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 15px;
            padding: 15px;
            overflow-y: auto;
            min-height: 400px;
            max-height: calc(100vh - 200px);
        }

        #nft-modal .nft-card {
            background: rgba(0, 0, 0, 0.4);
            border: 2px solid rgba(138, 201, 38, 0.3);
            border-radius: 12px;
            padding: 12px;
            text-align: center;
            transition: all 0.3s;
            min-height: 200px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            cursor: pointer;
        }

        #nft-modal .nft-card:hover {
            transform: translateY(-3px);
            border-color: #8AC926;
            box-shadow: 0 8px 20px rgba(138, 201, 38, 0.4);
            background: rgba(138, 201, 38, 0.1);
        }

        #nft-modal .nft-card img {
            width: 100px;
            height: 100px;
            object-fit: contain;
            margin: 0 auto 10px;
        }

        #nft-modal #mint-nft-btn {
            flex-shrink: 0;
            margin-top: 30px;
            padding: 20px 40px;
            font-size: 20px;
            font-weight: bold;
            background: linear-gradient(135deg, #8AC926, #6A9F1F);
            border: none;
            border-radius: 15px;
            color: #000;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(138, 201, 38, 0.3);
        }

        #nft-modal #mint-nft-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(138, 201, 38, 0.5);
        }

        /* NFT Detail Modal */
        .nft-detail-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            z-index: 3000;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .nft-detail-modal.show {
            display: flex;
        }

        .nft-detail-content {
            background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
            border: 3px solid #8AC926;
            border-radius: 20px;
            padding: 40px;
            max-width: 800px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            color: white;
            position: relative;
        }

        .nft-detail-close {
            position: absolute;
            top: 15px;
            right: 15px;
            background: #ef4444;
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            color: white;
            font-size: 24px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
        }

        .nft-detail-close:hover {
            background: #dc2626;
            transform: scale(1.1);
        }

        .nft-detail-header {
            display: flex;
            gap: 30px;
            margin-bottom: 30px;
            flex-wrap: wrap;
        }

        .nft-detail-image {
            flex: 0 0 300px;
            text-align: center;
        }

        .nft-detail-image img {
            width: 100%;
            max-width: 300px;
            height: auto;
            border-radius: 15px;
            border: 3px solid;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }

        .nft-detail-info {
            flex: 1;
            min-width: 300px;
        }

        .nft-detail-title {
            font-size: 36px;
            font-weight: bold;
            margin-bottom: 15px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        }

        .nft-detail-badge {
            display: inline-block;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: bold;
            margin-right: 10px;
            margin-bottom: 10px;
        }

        .nft-detail-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }

        .nft-detail-stat {
            background: rgba(255, 255, 255, 0.05);
            padding: 15px;
            border-radius: 10px;
            border: 1px solid rgba(138, 201, 38, 0.2);
        }

        .nft-detail-stat-label {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 5px;
        }

        .nft-detail-stat-value {
            font-size: 18px;
            font-weight: bold;
            color: #8AC926;
        }

        .nft-detail-actions {
            margin-top: 30px;
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        .nft-detail-btn {
            padding: 15px 30px;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s;
            flex: 1;
            min-width: 150px;
        }

        .nft-detail-btn-primary {
            background: linear-gradient(135deg, #8AC926, #6A9F1F);
            color: #000;
        }

        .nft-detail-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(138, 201, 38, 0.4);
        }

        .nft-detail-btn-secondary {
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border: 2px solid rgba(138, 201, 38, 0.3);
        }

        .nft-detail-btn-secondary:hover {
            background: rgba(138, 201, 38, 0.2);
            border-color: #8AC926;
        }

        .nft-detail-btn-danger {
            background: #ef4444;
            color: white;
        }

        .nft-detail-btn-danger:hover {
            background: #dc2626;
        }

        .nft-detail-section {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 2px solid rgba(138, 201, 38, 0.2);
        }

        .nft-detail-section-title {
            font-size: 20px;
            color: #FFB703;
            margin-bottom: 15px;
        }

        .nft-detail-link {
            color: #8AC926;
            text-decoration: none;
            word-break: break-all;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .nft-detail-link:hover {
            text-decoration: underline;
        }

        #nft-modal .nft-card {
            cursor: pointer;
        }

        .referral-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            border-bottom: 2px solid #4a5568;
            padding-bottom: 10px;
        }

        .referral-header h2 {
            color: #667eea;
            font-size: 20px;
            margin: 0;
        }

        .referral-link-container {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }

        .referral-link-input {
            flex: 1;
            padding: 12px;
            background: #2d3748;
            border: 2px solid #4a5568;
            border-radius: 8px;
            color: white;
            font-family: 'Courier New', monospace;
            font-size: 14px;
        }

        .copy-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 12px 16px;
            font-family: 'Courier New', monospace;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .copy-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }

        .referral-progress {
            margin-bottom: 20px;
            padding: 15px;
            background: rgba(102, 126, 234, 0.1);
            border-radius: 10px;
            border: 2px solid #667eea;
        }

        .referral-progress h4 {
            color: #fbbf24;
            font-size: 16px;
            margin-bottom: 10px;
            text-align: center;
        }

        .progress-bar {
            width: 100%;
            height: 20px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 10px;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 10px;
            transition: width 0.5s ease;
            position: relative;
        }

        .progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .referral-status {
            text-align: center;
            color: #e2e8f0;
            font-size: 14px;
            margin-bottom: 15px;
        }

        .milestone-rewards {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .milestone {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px;
            border-radius: 6px;
            font-size: 13px;
        }

        .milestone.completed {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
        }

        .milestone.current {
            background: rgba(245, 158, 11, 0.2);
            color: #f59e0b;
            font-weight: bold;
        }

        .milestone.upcoming {
            background: rgba(107, 114, 128, 0.2);
            color: #9ca3af;
        }

        .referral-bonuses h3 {
            color: #fbbf24;
            font-size: 16px;
            margin-bottom: 15px;
        }

        .bonus-item {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            padding: 10px;
            background: rgba(102, 126, 234, 0.1);
            border-radius: 8px;
            border-left: 3px solid #667eea;
        }

        .bonus-icon {
            font-size: 20px;
        }

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

        .referral-actions {
            text-align: center;
        }

        .share-btn {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 12px 24px;
            font-family: 'Courier New', monospace;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 16px;
        }

        .share-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
        }

        .help-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #8b5cf6;
        }

        .help-header h2 {
            margin: 0;
            color: #8b5cf6;
        }

        .help-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .help-tab {
            padding: 10px 15px;
            background: rgba(139, 92, 246, 0.2);
            border: 1px solid #8b5cf6;
            border-radius: 8px;
            color: #8b5cf6;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 14px;
        }

        .help-tab:hover {
            background: rgba(139, 92, 246, 0.3);
        }

        .help-tab.active {
            background: #8b5cf6;
            color: white;
        }

        .help-content-area {
            min-height: 400px;
        }

        .help-tab-content {
            display: none;
        }

        .help-tab-content.active {
            display: block;
        }

        .help-section {
            margin-bottom: 20px;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            border-left: 4px solid #8b5cf6;
        }

        .help-section h4 {
            color: #8b5cf6;
            margin-bottom: 10px;
        }

        .help-section ul {
            margin: 0;
            padding-left: 20px;
        }

        .help-section li {
            margin-bottom: 8px;
            line-height: 1.4;
        }

        .leaderboard-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #4a5568;
        }

        .leaderboard-header h2 {
            margin: 0;
            color: #fbbf24;
        }

        .leaderboard-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .leaderboard-item {
            background: rgba(0, 0, 0, 0.3);
            border: 2px solid #4a5568;
            border-radius: 10px;
            padding: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.2s;
            gap: 10px;
            min-height: 60px;
        }

        .leaderboard-item:hover {
            border-color: #fbbf24;
            transform: translateX(5px);
        }

        .leaderboard-item.me {
            background: rgba(251, 191, 36, 0.2);
            border-color: #fbbf24;
        }

        .leaderboard-rank {
            font-size: 22px;
            font-weight: bold;
            min-width: 50px;
            text-align: center;
            flex-shrink: 0;
        }

        .leaderboard-rank.gold { color: #fbbf24; }
        .leaderboard-rank.silver { color: #d1d5db; }
        .leaderboard-rank.bronze { color: #f59e0b; }

        .leaderboard-player {
            flex: 1;
            min-width: 0; /* Important for text truncation */
            overflow: hidden;
        }

        .leaderboard-name {
            font-weight: bold;
            font-size: 15px;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .leaderboard-level {
            font-size: 12px;
            opacity: 0.7;
            white-space: nowrap;
        }

        .leaderboard-tama {
            font-size: 16px;
            font-weight: bold;
            color: #fbbf24;
            text-align: right;
            flex-shrink: 0;
            min-width: 100px;
            white-space: nowrap;
        }

        .loading {
            text-align: center;
            padding: 20px;
            opacity: 0.7;
        }

        /* Edit Name Button */
        .edit-name-btn {
            background: rgba(251, 191, 36, 0.2);
            border: 2px solid #fbbf24;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .edit-name-btn:hover {
            background: rgba(251, 191, 36, 0.4);
            transform: scale(1.1);
        }

        .edit-name-btn:active {
            transform: scale(0.95);
        }

        /* 🌍 Language Button in Header */
        .lang-header-btn {
            background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(75, 0, 130, 0.3));
            border: 2px solid rgba(138, 43, 226, 0.6);
            border-radius: 50%;
            width: 32px;
            height: 32px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            box-shadow: 0 2px 10px rgba(138, 43, 226, 0.3);
        }

        .lang-header-btn:hover {
            background: linear-gradient(135deg, rgba(138, 43, 226, 0.5), rgba(75, 0, 130, 0.5));
            transform: scale(1.15);
            box-shadow: 0 4px 20px rgba(138, 43, 226, 0.5);
            border-color: #8a2be2;
        }

        .lang-header-btn:active {
            transform: scale(0.95);
        }

        /* Particle Effects */
        .particle {
            position: absolute;
            pointer-events: none;
            z-index: 1000;
        }

        .particle.heart {
            animation: heartFloat 2s ease-out forwards;
        }

        .particle.sparkle {
            animation: sparkle 1.5s ease-out forwards;
        }

        .particle.star {
            animation: starTwinkle 2s ease-out forwards;
        }

        /* BLOB Particles - Optimized */
        .particle.blob-purple {
            color: #C084FC;
            font-size: 20px;
            animation: blobParticle 1s ease-out forwards;
            will-change: transform, opacity;
        }

        .particle.blob-glow {
            width: 10px;
            height: 10px;
            background: radial-gradient(circle, #E9D5FF, #C084FC);
            border-radius: 50%;
            animation: blobGlowParticle 1.2s ease-out forwards;
            box-shadow: 0 0 8px #C084FC;
            will-change: transform, opacity;
        }

        .particle.blob-star {
            color: #FFFFFF;
            font-size: 18px;
            text-shadow: 0 0 8px #C084FC;
            animation: blobStarParticle 1.3s ease-out forwards;
            will-change: transform, opacity;
        }

        @keyframes blobParticle {
            0% {
                transform: translate(0, 0) scale(0) rotate(0deg);
                opacity: 1;
            }
            50% {
                transform: translate(var(--dx), var(--dy)) scale(1) rotate(180deg);
                opacity: 1;
            }
            100% {
                transform: translate(calc(var(--dx) * 1.5), calc(var(--dy) * 1.5)) scale(0.5) rotate(360deg);
                opacity: 0;
            }
        }

        @keyframes blobGlowParticle {
            0% {
                transform: translate(0, 0) scale(0);
                opacity: 1;
            }
            50% {
                transform: translate(var(--dx), var(--dy)) scale(1.2);
                opacity: 0.8;
            }
            100% {
                transform: translate(calc(var(--dx) * 2), calc(var(--dy) * 2)) scale(0);
                opacity: 0;
            }
        }

        @keyframes blobStarParticle {
            0% {
                transform: translate(0, 0) scale(0) rotate(0deg);
                opacity: 1;
            }
            100% {
                transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(720deg);
                opacity: 0;
            }
        }

        /* Click Animation for BLOB */
        .vector-pet.clicked {
            animation: blobClick 0.5s ease;
        }

        @keyframes blobClick {
            0% { transform: scale(1) rotate(0deg); }
            30% { transform: scale(0.85) rotate(-3deg); }
            60% { transform: scale(1.15) rotate(3deg); }
            100% { transform: scale(1) rotate(0deg); }
        }

        /* Happy Bounce on Click */
        .blob-body.happy-bounce {
            animation: happyJump 0.6s ease !important;
        }

        @keyframes happyJump {
            0%, 100% { transform: translateY(0) scale(1); }
            40% { transform: translateY(-15px) scale(1.05); }
            70% { transform: translateY(0) scale(0.95, 1.05); }
        }

        /* Battle Arena Styles ⚔️ */
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .bet-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        }

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

        .battle-action:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        }

        .battle-action:active {
            transform: scale(0.95);
        }

        .battle-action:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* 🏁 Pet Racing Styles */
        .racing-bet-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        }

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

        #racing-track {
            position: relative;
            background: linear-gradient(180deg, #1f2937 0%, #374151 50%, #1f2937 100%);
            border: 2px solid #fbbf24;
            box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
        }

        #player-car, #ai-car-1, #ai-car-2, #ai-car-3 {
            transition: all 0.1s ease;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        }

        #player-car:hover {
            transform: scale(1.1);
        }

        #racing-gas, #racing-brake, #racing-nitro {
            transition: all 0.2s;
            user-select: none;
        }

        #racing-gas:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
        }

        #racing-brake:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
        }

        #racing-nitro:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
        }

        #racing-nitro:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        /* Racing animations */
        @keyframes racingBoost {
            0% { transform: scale(1); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }

        @keyframes racingFinish {
            0% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
            100% { transform: translateY(0); }
        }

        .racing-boost {
            animation: racingBoost 0.5s ease-in-out;
        }

        .racing-finish {
            animation: racingFinish 1s ease-in-out infinite;
        }

        /* 🌄 LANDSCAPE MODE for platformer - maximum space for game! */
        @media (orientation: landscape) and (max-height: 600px) {
            #platformer-header {
                display: none !important;
            }
            #platformer-footer {
                display: none !important;
            }
            #mobile-controls-fullscreen {
                bottom: 10px !important;
                padding: 0 20px !important;
            }
            #btn-left-fs, #btn-right-fs {
                width: 50px !important;
                height: 50px !important;
                font-size: 20px !important;
            }
            #btn-jump-fs {
                width: 55px !important;
                height: 55px !important;
                font-size: 22px !important;
            }
        }
