 @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        :root {
            --neon-pink: #ff0080;
            --neon-blue: #00ffff;
            --neon-purple: #8000ff;
            --neon-green: #00ff80;
            --neon-orange: #ff8000;
            --dark-bg: #0a0a0f;
            --glass-bg: rgba(255, 255, 255, 0.05);
            --glass-border: rgba(255, 255, 255, 0.1);
        }

        body {
            font-family: 'Orbitron', monospace;
            background: var(--dark-bg);
            min-height: 100vh;
            overflow-x: hidden;
            position: relative;
            color: white;
        }

        /* Animated background */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: 
                radial-gradient(circle at 20% 30%, var(--neon-purple) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, var(--neon-blue) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, var(--neon-pink) 0%, transparent 50%),
                linear-gradient(135deg, #0a0a0f 0%, #1a0a2e 50%, #16213e 100%);
            animation: backgroundPulse 8s ease-in-out infinite alternate;
            z-index: -2;
        }

        @keyframes backgroundPulse {
            0% { opacity: 0.8; transform: scale(1); }
            100% { opacity: 1; transform: scale(1.05); }
        }

        /* Matrix rain effect */
        .matrix-rain {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
            overflow: hidden;
        }

        .matrix-char {
            position: absolute;
            color: var(--neon-green);
            font-family: 'Orbitron', monospace;
            font-size: 14px;
            animation: matrixFall linear infinite;
            opacity: 0.3;
        }

        @keyframes matrixFall {
            0% { transform: translateY(-100vh); opacity: 0; }
            10% { opacity: 0.3; }
            90% { opacity: 0.1; }
            100% { transform: translateY(100vh); opacity: 0; }
        }

        .game-container {
            width: 100%;
            max-width: 420px;
            margin: 0 auto;
            padding: 15px;
            position: relative;
            z-index: 10;
        }

        .game-header {
            background: var(--glass-bg);
            backdrop-filter: blur(20px);
            border: 1px solid var(--glass-border);
            border-radius: 25px 25px 0 0;
            padding: 25px 20px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .game-header::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            animation: shine 3s infinite;
        }

        @keyframes shine {
            0% { left: -100%; }
            100% { left: 100%; }
        }

        .game-title {
            font-size: 32px;
            font-weight: 900;
            background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue), var(--neon-purple));
            background-size: 200% 200%;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: gradientShift 3s ease-in-out infinite;
            margin-bottom: 8px;
            text-shadow: 0 0 30px rgba(255, 0, 128, 0.5);
        }

        @keyframes gradientShift {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        .game-subtitle {
            font-size: 12px;
            color: var(--neon-blue);
            margin-bottom: 20px;
            opacity: 0.8;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-top: 20px;
        }

        .stat-card {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: 15px;
            padding: 15px 10px;
            text-align: center;
            position: relative;
            transition: all 0.3s ease;
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(255, 0, 128, 0.3);
        }

        .stat-value {
            font-size: 24px;
            font-weight: 700;
            color: var(--neon-green);
            margin-bottom: 5px;
        }

        .stat-label {
            font-size: 10px;
            color: #ccc;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .game-content {
            background: var(--glass-bg);
            backdrop-filter: blur(20px);
            border: 1px solid var(--glass-border);
            border-top: none;
            border-radius: 0 0 25px 25px;
            padding: 25px 20px;
        }

        .legend {
            display: flex;
            justify-content: space-around;
            margin-bottom: 25px;
            background: rgba(255, 255, 255, 0.02);
            border-radius: 20px;
            padding: 20px 10px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .legend-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .legend-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 16px;
            position: relative;
            transition: all 0.3s ease;
        }

        .legend-icon::before {
            content: '';
            position: absolute;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: inherit;
            opacity: 0.3;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 0.3; }
            50% { transform: scale(1.2); opacity: 0.1; }
        }

        .correct-icon { 
            background: var(--neon-green);
            color: #000;
            box-shadow: 0 0 20px var(--neon-green);
        }
        .wrong-pos-icon { 
            background: var(--neon-orange);
            color: #000;
            box-shadow: 0 0 20px var(--neon-orange);
        }
        .incorrect-icon { 
            background: var(--neon-pink);
            color: #fff;
            box-shadow: 0 0 20px var(--neon-pink);
        }

        .legend-text {
            font-size: 11px;
            color: #ccc;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .input-section {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 25px;
            padding: 25px;
            margin-bottom: 25px;
            border: 2px solid rgba(255, 255, 255, 0.1);
            position: relative;
            overflow: hidden;
        }

        .input-section::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue), var(--neon-purple), var(--neon-green));
            border-radius: 25px;
            z-index: -1;
            animation: borderGlow 3s linear infinite;
        }

        @keyframes borderGlow {
            0%, 100% { opacity: 0.5; }
            50% { opacity: 1; }
        }

        .input-title {
            text-align: center;
            font-size: 14px;
            color: var(--neon-blue);
            margin-bottom: 20px;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .input-slots {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-bottom: 25px;
        }

        .input-slot {
            width: 60px;
            height: 60px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            font-weight: bold;
            background: rgba(0, 0, 0, 0.4);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .input-slot::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s;
        }

        .input-slot.active {
            border-color: var(--neon-blue);
            background: rgba(0, 255, 255, 0.1);
            box-shadow: 
                0 0 30px rgba(0, 255, 255, 0.5),
                inset 0 0 20px rgba(0, 255, 255, 0.1);
            transform: scale(1.05);
            animation: activeSlotPulse 1.5s infinite;
        }

        .input-slot.active::before {
            left: 100%;
        }

        @keyframes activeSlotPulse {
            0%, 100% { box-shadow: 0 0 30px rgba(0, 255, 255, 0.5); }
            50% { box-shadow: 0 0 40px rgba(0, 255, 255, 0.8); }
        }

        .input-slot.filled {
            background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
            color: white;
            border-color: var(--neon-purple);
            box-shadow: 0 0 25px rgba(128, 0, 255, 0.6);
            transform: scale(1.02);
        }

        .result-display {
            display: flex;
            justify-content: center;
            gap: 12px;
            min-height: 40px;
            align-items: center;
        }

        .result-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 18px;
            transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            transform: scale(0) rotate(180deg);
            position: relative;
        }

        .result-circle::before {
            content: '';
            position: absolute;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: inherit;
            opacity: 0.3;
            animation: resultPulse 1s infinite;
        }

        @keyframes resultPulse {
            0%, 100% { transform: scale(1); opacity: 0.3; }
            50% { transform: scale(1.3); opacity: 0.1; }
        }

        .result-circle.show {
            transform: scale(1) rotate(0deg);
        }

        .result-correct { 
            background: var(--neon-green);
            color: #000;
            box-shadow: 0 0 25px var(--neon-green);
        }
        .result-wrong-pos { 
            background: var(--neon-orange);
            color: #000;
            box-shadow: 0 0 25px var(--neon-orange);
        }
        .result-incorrect { 
            background: var(--neon-pink);
            color: #fff;
            box-shadow: 0 0 25px var(--neon-pink);
        }

        .keyboard {
            margin-bottom: 25px;
        }

        .number-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }

        .number-key {
            aspect-ratio: 1;
            border: none;
            border-radius: 20px;
            background: rgba(255, 255, 255, 0.05);
            font-size: 22px;
            font-weight: bold;
            color: white;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
        }

        .number-key::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
            opacity: 0;
            transition: opacity 0.3s;
        }

        .number-key:hover {
            transform: translateY(-8px) scale(1.05);
            box-shadow: 0 15px 35px rgba(0, 255, 255, 0.4);
            background: rgba(0, 255, 255, 0.1);
            border-color: var(--neon-blue);
        }

        .number-key:hover::before {
            opacity: 0.2;
        }

        .number-key:active {
            transform: translateY(-2px) scale(0.98);
        }

        .number-key.used {
            background: rgba(255, 0, 128, 0.2);
            color: #ff6b9d;
            cursor: not-allowed;
            border-color: var(--neon-pink);
            animation: usedKeyPulse 1s;
        }

        @keyframes usedKeyPulse {
            0%, 100% { box-shadow: 0 0 15px rgba(255, 0, 128, 0.3); }
            50% { box-shadow: 0 0 25px rgba(255, 0, 128, 0.6); }
        }

        .number-key.used:hover {
            transform: none;
            box-shadow: 0 0 15px rgba(255, 0, 128, 0.3);
        }

        .control-buttons {
            display: flex;
            gap: 15px;
        }

        .control-btn {
            flex: 1;
            padding: 18px;
            border: none;
            border-radius: 20px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            text-transform: uppercase;
            letter-spacing: 1px;
            backdrop-filter: blur(10px);
        }

        .control-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s;
        }

        .control-btn:hover::before {
            left: 100%;
        }

        .clear-btn {
            background: rgba(255, 128, 0, 0.2);
            color: var(--neon-orange);
            border: 2px solid var(--neon-orange);
        }

        .clear-btn:hover {
            background: rgba(255, 128, 0, 0.3);
            box-shadow: 0 0 30px rgba(255, 128, 0, 0.5);
            transform: translateY(-5px);
        }

        .submit-btn {
            background: rgba(0, 255, 128, 0.2);
            color: var(--neon-green);
            border: 2px solid var(--neon-green);
        }

        .submit-btn:hover {
            background: rgba(0, 255, 128, 0.3);
            box-shadow: 0 0 30px rgba(0, 255, 128, 0.5);
            transform: translateY(-5px);
        }

        .control-btn:disabled {
            background: rgba(100, 100, 100, 0.2);
            color: #666;
            border-color: #666;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .lives-section {
            text-align: center;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 20px;
            padding: 20px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .lives-text {
            font-size: 14px;
            color: var(--neon-blue);
            margin-bottom: 15px;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .hearts-container {
            display: flex;
            justify-content: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .heart {
            font-size: 28px;
            color: var(--neon-pink);
            animation: heartbeat 2s infinite;
            filter: drop-shadow(0 0 10px var(--neon-pink));
            transition: all 0.3s ease;
        }

        .heart:hover {
            transform: scale(1.2);
        }

        @keyframes heartbeat {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        .game-message {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 20px;
            backdrop-filter: blur(20px);
        }

        .message-content {
            background: var(--glass-bg);
            backdrop-filter: blur(30px);
            border: 2px solid var(--glass-border);
            border-radius: 30px;
            padding: 40px 30px;
            text-align: center;
            max-width: 380px;
            width: 100%;
            position: relative;
            animation: messageSlideIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }

        @keyframes messageSlideIn {
            from { 
                transform: translateY(-100px) scale(0.8); 
                opacity: 0; 
            }
            to { 
                transform: translateY(0) scale(1); 
                opacity: 1; 
            }
        }

        .message-title {
            font-size: 32px;
            font-weight: 900;
            margin-bottom: 20px;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .win-title { 
            background: linear-gradient(45deg, var(--neon-green), var(--neon-blue));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: gradientShift 2s ease-in-out infinite;
        }

        .lose-title { 
            background: linear-gradient(45deg, var(--neon-pink), var(--neon-orange));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: gradientShift 2s ease-in-out infinite;
        }

        .message-text {
            font-size: 16px;
            color: #ccc;
            margin-bottom: 30px;
            line-height: 1.6;
        }

        .secret-reveal {
            background: rgba(0, 0, 0, 0.5);
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .secret-numbers {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 15px;
        }

        .secret-number {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 20px;
            box-shadow: 0 0 20px rgba(128, 0, 255, 0.6);
            animation: secretReveal 0.5s ease forwards;
            transform: scale(0);
        }

        .secret-number:nth-child(1) { animation-delay: 0.1s; }
        .secret-number:nth-child(2) { animation-delay: 0.2s; }
        .secret-number:nth-child(3) { animation-delay: 0.3s; }
        .secret-number:nth-child(4) { animation-delay: 0.4s; }

        @keyframes secretReveal {
            to { transform: scale(1); }
        }

        .restart-btn {
            background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
            color: white;
            border: none;
            padding: 18px 35px;
            border-radius: 25px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 2px;
            position: relative;
            overflow: hidden;
        }

        .restart-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s;
        }

        .restart-btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(0, 255, 255, 0.4);
        }

        .restart-btn:hover::before {
            left: 100%;
        }

        /* Mobile optimizations */
        @media (max-width: 480px) {
            .game-container {
                padding: 10px;
            }

            .game-title {
                font-size: 28px;
            }

            .input-slot {
                width: 55px;
                height: 55px;
                font-size: 24px;
            }

            .number-key {
                font-size: 20px;
            }

            .control-btn {
                padding: 15px;
                font-size: 14px;
            }

            .legend-icon {
                width: 35px;
                height: 35px;
                font-size: 14px;
            }

            .heart {
                font-size: 24px;
            }
        }

        @media (max-width: 360px) {
            .input-slots {
                gap: 10px;
            }

            .input-slot {
                width: 50px;
                height: 50px;
                font-size: 22px;
            }

            .number-grid {
                gap: 8px;
            }

            .stats-grid {
                gap: 10px;
            }
        }

        /* Performance optimization */
        .number-key, .input-slot, .control-btn {
            will-change: transform;
        }

        /* Reduced motion for accessibility */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }