:root {
            --primary-green: #2d5016;
            --primary-sand: #d4a574;
            --primary-terracotta: #c17c5c;
            --accent-gold: #FFD700;
            --accent-purple: #8A2BE2;
            --accent-cyan: #00FFFF;
            --bg-dark: #0d0d1a;
            --bg-darker: #1a1a2e;
        }

        * { 
            margin: 0; 
            padding: 0; 
            box-sizing: border-box; 
        }

        body {
            display: flex;
            flex-direction: column;
            justify-content: center; 
            align-items: center;
            min-height: 100vh; 
            background-color: var(--bg-dark);
            font-family: 'Orbitron', sans-serif; 
            color: #fff; 
            touch-action: manipulation;
            background: radial-gradient(ellipse at center, var(--bg-darker) 0%, var(--bg-dark) 100%);
            padding: 20px 0;
        }

        #game-wrapper {
            width: 100%;
            max-width: 1000px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        #game-header {
            width: 100%;
            max-width: 1000px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            margin-bottom: 10px;
            background: rgba(0, 0, 0, 0.5);
            border: 2px solid var(--primary-green);
            border-radius: 8px;
            backdrop-filter: blur(10px);
        }

        #game-title {
            font-family: 'Dosis', sans-serif;
            font-size: clamp(1.5em, 4vw, 2.5em);
            font-weight: 700;
            letter-spacing: 2px;
            background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin: 0;
            text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
        }

        #header-buttons {
            display: flex;
            gap: 10px;
        }

        #game-container {
            position: relative; 
            width: 100%; 
            height: 100%;
            max-width: 1000px; 
            max-height: 600px;
            border: 4px solid var(--primary-green);
            box-shadow: 0 0 30px var(--primary-green), inset 0 0 30px rgba(45, 80, 22, 0.3);
            background: #000; 
            overflow: hidden; 
            cursor: pointer;
            border-radius: 8px;
        }

        canvas { 
            display: block; 
            width: 100%; 
            height: 100%; 
        }

        .ui-text { 
            font-size: clamp(1.5em, 4vw, 2em); 
            pointer-events: none;
            text-shadow: 0 0 10px currentColor;
        }

        #top-right-ui {
            position: absolute; 
            top: 15px; 
            right: 20px;
            display: flex; 
            align-items: center; 
            gap: 15px;
        }

        #score-display {
            position: absolute; 
            top: 15px; 
            left: 50px;
            color: var(--accent-gold);
            animation: pulse 1.5s infinite alternate;
            z-index: 10;
        }

        #shield-timer-display { color: #2ECC40; }
        #magnet-timer-display { color: #AAAAAA; }
        #lives-display { color: var(--primary-terracotta); }

        #combo-display {
            position: absolute;
            top: 60px;
            left: 50px;
            color: var(--accent-cyan);
            font-size: 1.2em;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .game-button {
            background: rgba(45, 80, 22, 0.3);
            border: 2px solid var(--primary-green); 
            color: white; 
            font-size: 1em;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer; 
            display: flex;
            justify-content: center; 
            align-items: center;
            backdrop-filter: blur(5px);
            transition: all 0.2s;
            font-family: 'Orbitron', sans-serif;
            white-space: nowrap;
        }

        .game-button:hover { 
            background: rgba(45, 80, 22, 0.6);
            transform: scale(1.05);
        }

        #pause-button {
            min-width: 100px;
        }

        #level-display {
            position: absolute;
            top: 15px;
            left: 50%;
            transform: translateX(-50%);
            color: var(--accent-cyan);
            font-size: 1.3em;
            text-shadow: 0 0 10px var(--accent-cyan);
        }

        .overlay {
            position: absolute; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%;
            background-color: rgba(0, 0, 0, 0.9); 
            display: flex;
            flex-direction: column; 
            justify-content: center;
            align-items: center; 
            text-align: center; 
            z-index: 10;
            backdrop-filter: blur(5px);
        }

        .overlay h1 { 
            font-family: 'Dosis', sans-serif;
            font-size: clamp(2.5em, 8vw, 4em); 
            margin-bottom: 10px;
            text-shadow: 0 0 15px currentColor;
            font-weight: 700;
            letter-spacing: 2px;
        }

        .overlay p { 
            font-size: clamp(1em, 3vw, 1.5em); 
            margin-bottom: 20px;
            color: #ddd;
        }

        #start-screen h1 { 
            background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: titleGlow 2s infinite alternate;
        }

        #game-over-screen h1 { 
            color: var(--primary-terracotta);
            animation: pulse 1s infinite alternate;
        }

        #pause-screen h1 { 
            color: var(--accent-cyan);
            animation: pulse 1.5s infinite alternate;
        }

        .action-button {
            padding: 15px 30px; 
            font-size: clamp(1em, 3vw, 1.5em);
            font-family: 'Orbitron', sans-serif; 
            cursor: pointer;
            border: 2px solid var(--primary-green); 
            background-color: transparent; 
            color: #fff;
            text-shadow: 0 0 5px #fff; 
            box-shadow: 0 0 15px var(--primary-green);
            transition: all 0.3s ease; 
            border-radius: 8px;
            margin-top: 10px;
        }

        .action-button:hover, .action-button:focus {
            background-color: var(--primary-green); 
            color: #fff;
            box-shadow: 0 0 25px var(--primary-green), 0 0 40px var(--primary-green);
            transform: translateY(-3px);
        }

        #copyright {
            margin-top: 20px;
            font-size: 0.9em;
            color: rgba(255, 255, 255, 0.6);
            font-family: 'Orbitron', sans-serif;
            text-align: center;
        }
        
        /* 🎮 Phase 2: Spielmodi-Buttons */
        .mode-button {
            background: rgba(45, 80, 22, 0.3);
            border: 2px solid var(--primary-sand);
            border-radius: 12px;
            padding: 15px 20px;
            color: #fff;
            font-family: 'Orbitron', sans-serif;
            cursor: pointer;
            transition: all 0.3s;
            min-width: 140px;
            text-align: center;
        }
        
        .mode-button:hover {
            background: rgba(45, 80, 22, 0.5);
            transform: scale(1.05);
            box-shadow: 0 0 20px rgba(212, 165, 116, 0.5);
        }
        
        .mode-button.selected {
            background: var(--primary-green);
            border-color: var(--accent-gold);
            box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
        }
        
        /* 🏆 Phase 2: Achievements */
        .achievement-item {
            display: flex;
            align-items: center;
            padding: 10px;
            margin: 8px 0;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 8px;
            border-left: 4px solid #666;
        }
        
        .achievement-item.unlocked {
            border-left-color: var(--accent-gold);
            background: rgba(255, 215, 0, 0.1);
        }
        
        .achievement-icon {
            font-size: 2em;
            margin-right: 15px;
            filter: grayscale(100%);
        }
        
        .achievement-item.unlocked .achievement-icon {
            filter: grayscale(0%);
            animation: achievementGlow 2s ease-in-out infinite;
        }
        
        @keyframes achievementGlow {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        
        .achievement-info {
            flex: 1;
        }
        
        .achievement-name {
            font-weight: bold;
            color: #fff;
            margin-bottom: 3px;
        }
        
        .achievement-item.unlocked .achievement-name {
            color: var(--accent-gold);
        }
        
        .achievement-desc {
            font-size: 0.85em;
            color: rgba(255, 255, 255, 0.7);
        }
        
        /* ⚠️ Phase 2: Low Life Warning */
        @keyframes lowLifePulse {
            0%, 100% { box-shadow: inset 0 0 0 0 rgba(255, 0, 0, 0); }
            50% { box-shadow: inset 0 0 60px 20px rgba(255, 0, 0, 0.3); }
        }
        
        .low-life-warning {
            animation: lowLifePulse 1s ease-in-out infinite;
        }
        
        /* 📊 Phase 2: Progress Bar */
        #progress-bar-container {
            position: absolute;
            bottom: 15px;
            left: 50%;
            transform: translateX(-50%);
            width: 200px;
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(212, 165, 116, 0.4);
            border-radius: 6px;
            padding: 5px 8px;
            font-size: 0.75em;
            opacity: 0.8;
        }
        
        #progress-bar {
            width: 100%;
            height: 8px;
            background: rgba(45, 80, 22, 0.2);
            border-radius: 4px;
            overflow: hidden;
            margin-top: 3px;
        }
        
        #progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary-green), var(--primary-sand));
            transition: width 0.3s;
            box-shadow: 0 0 5px rgba(212, 165, 116, 0.5);
        }
        
        /* 🎊 Phase 2: Achievement Notification */
        .achievement-notification {
            position: fixed;
            top: 100px;
            right: 20px;
            background: linear-gradient(135deg, var(--primary-green), var(--primary-sand));
            border: 3px solid var(--accent-gold);
            border-radius: 12px;
            padding: 15px 20px;
            color: #fff;
            font-family: 'Orbitron', sans-serif;
            box-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
            animation: slideInRight 0.5s, slideOutRight 0.5s 3s;
            z-index: 1000;
        }
        
        @keyframes slideInRight {
            from { transform: translateX(400px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }
        
        @keyframes slideOutRight {
            from { transform: translateX(0); opacity: 1; }
            to { transform: translateX(400px); opacity: 0; }
        }

        #game-info {
            max-width: 1000px;
            margin: 20px auto 10px;
            padding: 0 20px;
            font-family: 'Orbitron', sans-serif;
        }

        .info-section {
            background: rgba(45, 80, 22, 0.1);
            border: 2px solid var(--primary-green);
            border-radius: 8px;
            margin-bottom: 15px;
            overflow: hidden;
        }

        .info-header {
            background: rgba(45, 80, 22, 0.3);
            padding: 15px 20px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background 0.3s;
            user-select: none;
        }

        .info-header:hover {
            background: rgba(45, 80, 22, 0.5);
        }

        .info-header h3 {
            margin: 0;
            color: var(--primary-sand);
            font-size: 1.2em;
        }

        .info-toggle {
            color: var(--primary-sand);
            font-size: 1.5em;
            transition: transform 0.3s;
        }

        .info-toggle.open {
            transform: rotate(180deg);
        }

        .info-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease-out;
            padding: 0 20px;
        }

        .info-content.open {
            max-height: 1000px;
            padding: 20px;
        }

        .info-content p {
            color: rgba(255, 255, 255, 0.8);
            line-height: 1.6;
            margin: 10px 0;
        }

        .info-content ul {
            list-style: none;
            padding: 0;
        }

        .info-content li {
            color: rgba(255, 255, 255, 0.8);
            padding: 8px 0;
            border-bottom: 1px solid rgba(45, 80, 22, 0.3);
        }

        .info-content li:last-child {
            border-bottom: none;
        }

        .item-icon {
            display: inline-block;
            width: 30px;
            font-size: 1.2em;
            margin-right: 10px;
        }

        .item-value {
            color: var(--accent-gold);
            font-weight: bold;
        }

        .controls-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin: 10px 0;
        }

        @media (max-width: 768px) {
            .controls-grid {
                grid-template-columns: 1fr;
            }
        }

        @keyframes pulse {
            0% { opacity: 0.8; transform: scale(1); }
            100% { opacity: 1; transform: scale(1.05); }
        }

        @keyframes titleGlow {
            0% { 
                text-shadow: 0 0 20px #FFD700, 0 0 40px #FFA500;
                filter: brightness(1);
            }
            100% { 
                text-shadow: 0 0 30px #FFD700, 0 0 60px #FFA500, 0 0 80px #FF8C00;
                filter: brightness(1.2);
            }
        }

        @media (max-width: 768px) {
            #game-container {
                max-width: 100vw;
                max-height: 100vh;
                border-radius: 0;
            }
        }