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

body {
    min-height: 100vh;
    background: #0a0a0a;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.container {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: linear-gradient(135deg, #111111 0%, #000000 100%);
    border: none;
    overflow: hidden;
}

/* Star glow effects */
.star-glow {
    filter: drop-shadow(0 0 4px white) drop-shadow(0 0 8px white) drop-shadow(0 0 12px white);
}

.star-sparkle {
    filter: drop-shadow(0 0 6px white) drop-shadow(0 0 12px white) drop-shadow(0 0 18px white) drop-shadow(0 0 24px rgba(255,255,255,0.8));
}

.hello {
    position: absolute;
    font-family: 'Inter', sans-serif;
    user-select: none;
    pointer-events: auto;
    cursor: grab;
    transition: text-shadow 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    /* Performance optimizations */
    contain: layout style paint;
    transform: translateZ(0); /* Force hardware acceleration */
}

.hello:active {
    cursor: grabbing;
}

.hello:hover {
    filter: brightness(1.2);
}

.hello.glowing {
    text-shadow: 0 0 20px currentColor, 0 0 40px currentColor, 0 0 60px currentColor;
}

.hello.targeted {
    text-shadow: 0 0 15px #ff4444, 0 0 30px #ff4444, 0 0 45px #ff4444;
    animation: targetedPulse 0.8s ease-in-out infinite alternate;
}

@keyframes targetedPulse {
    0% { text-shadow: 0 0 15px #ff4444, 0 0 30px #ff4444, 0 0 45px #ff4444; }
    100% { text-shadow: 0 0 25px #ff4444, 0 0 50px #ff4444, 0 0 75px #ff4444; }
}

.spaceship {
    position: absolute;
    width: 50px;
    height: 50px;
    z-index: 1000;
    pointer-events: none;
    transition: transform 0.3s ease-out;
    /* Performance optimizations */
    will-change: transform;
    transform: translateZ(0); /* Force hardware acceleration */
    contain: layout style paint;
}

.booster-flame {
    position: absolute;
    bottom: -35px;  /* Etwas näher zum Schiff, aber immer noch dahinter */
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 25px;
    background: linear-gradient(to top, #ff4444, #ffff44, #ff8844);  /* Gradient nach oben - heiß am Schiff, kühl an der Spitze */
    border-radius: 50% 50% 0 0;  /* Spitze nach oben (zum Schiff hin) */
    opacity: 0;
    animation: boosterFlame 0.5s ease-out;
}

@keyframes boosterFlame {
    0% { opacity: 0; height: 0px; }
    30% { opacity: 1; height: 25px; }
    100% { opacity: 0; height: 15px; }
}

.laser {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #ffff00 0%, #ff4400 50%, #ff0000 100%);
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 
        0 0 15px #ff4400,
        0 0 30px #ff4400,
        0 0 45px rgba(255, 68, 0, 0.8),
        inset 0 0 6px rgba(255, 255, 255, 0.6);
    pointer-events: none;
    z-index: 999;
    animation: projectilePulse 0.2s ease-in-out infinite alternate;
    /* Performance optimizations */
    will-change: transform, left, top;
    transform: translateZ(0); /* Force hardware acceleration */
    contain: layout style paint;
}

@keyframes projectilePulse {
    0% { 
        transform: scale(1);
        box-shadow: 
            0 0 15px #ff4400,
            0 0 30px #ff4400,
            0 0 45px rgba(255, 68, 0, 0.8),
            inset 0 0 6px rgba(255, 255, 255, 0.6);
    }
    100% { 
        transform: scale(1.2);
        box-shadow: 
            0 0 20px #ff4400,
            0 0 40px #ff4400,
            0 0 60px rgba(255, 68, 0, 1.0),
            inset 0 0 8px rgba(255, 255, 255, 0.8);
    }
}

.ultra-laser {
    width: 18px;
    height: 18px;
    background: radial-gradient(circle, #aa44ff 0%, #6600aa 50%, #440088 100%);
    border: 3px solid #ffffff;
    box-shadow: 
        0 0 20px #aa44ff,
        0 0 40px #aa44ff,
        0 0 60px rgba(170, 68, 255, 0.8),
        inset 0 0 8px rgba(255, 255, 255, 0.6);
    animation: ultraProjectilePulse 0.15s ease-in-out infinite alternate;
}

@keyframes ultraProjectilePulse {
    0% { 
        transform: scale(1);
        box-shadow: 
            0 0 20px #aa44ff,
            0 0 40px #aa44ff,
            0 0 60px rgba(170, 68, 255, 0.8),
            inset 0 0 8px rgba(255, 255, 255, 0.6);
    }
    100% { 
        transform: scale(1.3);
        box-shadow: 
            0 0 30px #aa44ff,
            0 0 60px #aa44ff,
            0 0 90px rgba(170, 68, 255, 1.0),
            inset 0 0 12px rgba(255, 255, 255, 0.8);
    }
}

.explosion-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 998;
    box-shadow: 0 0 6px currentColor;
}

.restart-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, #4488ff, #66aaff);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 24px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(68, 136, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 1001;
    animation: pulseGlow 2s ease-in-out infinite alternate;
}

.restart-button:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 12px 35px rgba(68, 136, 255, 0.4);
}

.restart-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

@keyframes pulseGlow {
    0% { box-shadow: 0 8px 25px rgba(68, 136, 255, 0.3); }
    100% { box-shadow: 0 8px 25px rgba(68, 136, 255, 0.6), 0 0 20px rgba(68, 136, 255, 0.2); }
}

.info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.info-box {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #4488ff;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    max-height: 85vh; /* Begrenze die maximale Höhe */
    margin: 40px 20px; /* Füge Abstände oben/unten und links/rechts hinzu */
    text-align: center;
    color: white;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 20px 60px rgba(68, 136, 255, 0.3);
    overflow-y: auto; /* Ermögliche Scrollen bei langem Inhalt */
}

.info-box h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #4488ff, #66aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-box p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.9;
}

.info-box .highlight {
    color: #ff4444;
    font-weight: 600;
}

.start-button {
    background: linear-gradient(45deg, #4488ff, #66aaff);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 22px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 8px 25px rgba(68, 136, 255, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(68, 136, 255, 0.5);
}

.start-button:active {
    transform: translateY(0);
}

.player-name-input {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #4488ff;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    color: white;
    text-align: center;
    margin: 20px 0;
    width: 300px;
    backdrop-filter: blur(5px);
    outline: none;
}

.player-name-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.player-name-input:focus {
    border-color: #66aaff;
    box-shadow: 0 0 20px rgba(68, 136, 255, 0.3);
}

/* Difficulty selection styles */
.difficulty-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.difficulty-section h3 {
    color: #88ccff;
    margin-bottom: 15px;
    font-size: 18px;
    text-align: center;
}

.difficulty-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.difficulty-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.difficulty-btn small {
    display: block;
    font-size: 12px;
    font-weight: normal;
    margin-top: 5px;
    opacity: 0.8;
}

.difficulty-btn[data-difficulty="leicht"] {
    border-color: #44ff44;
    background: rgba(68, 255, 68, 0.1);
}

.difficulty-btn[data-difficulty="mittel"] {
    border-color: #ffaa44;
    background: rgba(255, 170, 68, 0.1);
}

.difficulty-btn[data-difficulty="schwer"] {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

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

.difficulty-btn.selected {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.difficulty-btn.selected[data-difficulty="leicht"] {
    box-shadow: 0 0 20px rgba(68, 255, 68, 0.5);
    background: rgba(68, 255, 68, 0.2);
}

.difficulty-btn.selected[data-difficulty="mittel"] {
    box-shadow: 0 0 20px rgba(255, 170, 68, 0.5);
    background: rgba(255, 170, 68, 0.2);
}

.difficulty-btn.selected[data-difficulty="schwer"] {
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
    background: rgba(255, 68, 68, 0.2);
}

/* Difficulty display in game UI */
.difficulty-badge {
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.difficulty-badge.leicht {
    background: rgba(68, 255, 68, 0.2);
    color: #44ff44;
    border: 1px solid #44ff44;
}

.difficulty-badge.mittel {
    background: rgba(255, 170, 68, 0.2);
    color: #ffaa44;
    border: 1px solid #ffaa44;
}

.difficulty-badge.schwer {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border: 1px solid #ff4444;
}

/* Flagged score styling */
.flagged-badge {
    font-size: 14px;
    color: #ff8800;
    margin-left: 5px;
    opacity: 0.8;
}

.highscore-entry.flagged {
    border-left: 3px solid #ff8800;
    background: rgba(255, 136, 0, 0.1);
}

.highscore-entry.flagged .player-name {
    color: #ffcc88;
}

/* Filter buttons for difficulty selection */
.difficulty-filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.difficulty-filter-buttons.fullscreen {
    margin: 20px 0;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: rgba(68, 170, 255, 0.3);
    border-color: #44aaff;
    color: #44aaff;
    box-shadow: 0 0 15px rgba(68, 170, 255, 0.5);
}

.loading-item {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px;
}

.error-message {
    color: #ff4444;
    font-size: 14px;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
}

.radar-ping {
    position: absolute;
    border: 2px solid #ff4444;
    border-radius: 50%;
    pointer-events: none;
    z-index: 997;
    animation: radarPing 0.5s ease-out infinite;
}

@keyframes radarPing {
    0% { 
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
        border-width: 3px;
    }
    100% { 
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
        border-width: 1px;
    }
}

.game-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px; /* Höhe der Leiste */
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.8) 100%);
    border-bottom: 2px solid rgba(68, 136, 255, 0.6);
    box-shadow: 0 4px 30px rgba(68, 136, 255, 0.2);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1500;
    padding: 0 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
}

.ui-element {
    background: none;
    border: none;
    padding: 5px 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
}

.words-remaining {
    color: #66aaff;
}

.survival-time {
    color: #ffaa44;
}

.current-score {
    color: #44ff88;
}

.defended-counter {
    color: #ff9944;
}

.shield-system {
    color: #44ffaa;
}

.spaceship-aggression {
    color: #ff6644;
}

.aggression-level {
    font-weight: 700;
    transition: color 0.3s ease;
}

.aggression-level.calm { color: #44ff88; }
.aggression-level.alert { color: #ffaa44; }
.aggression-level.aggressive { color: #ff6644; }
.aggression-level.hunting { color: #ff4444; animation: huntingPulse 0.6s ease-in-out infinite alternate; }

@keyframes huntingPulse {
    0% { color: #ff4444; text-shadow: 0 0 10px #ff4444; }
    100% { color: #ff8888; text-shadow: 0 0 20px #ff4444; }
}

.emergency-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 500;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.emergency-overlay.active {
    opacity: 1;
}

.emergency-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 8px solid #ff4444;
    box-shadow: inset 0 0 50px rgba(255, 68, 68, 0.3);
    animation: emergencyPulse 1.5s ease-in-out infinite alternate;
}

@keyframes emergencyPulse {
    0% { 
        border-color: #ff4444;
        box-shadow: inset 0 0 50px rgba(255, 68, 68, 0.3);
    }
    100% { 
        border-color: #ff8888;
        box-shadow: inset 0 0 80px rgba(255, 68, 68, 0.5);
    }
}

.shield-counter {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.shield-cooldown {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.cooldown-bar {
    width: 100px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.cooldown-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, #44ffaa, #66ddaa);
    border-radius: 4px;
    transition: width 0.1s ease-out;
}

.cooldown-text {
    font-size: 14px;
    color: #aaffcc;
    min-width: 25px;
}

/* Space Beacon Mine System */
.space-beacon {
    position: absolute;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle, #ff6b47 0%, #ff3838 40%, #cc0000 70%, #660000 100%);
    border-radius: 50%;
    border: 3px solid #ffaa44;
    box-shadow: 
        0 0 15px #ff6b47,
        0 0 30px #ff6b47,
        0 0 45px rgba(255, 107, 71, 0.7),
        inset 0 0 8px rgba(255, 255, 255, 0.3);
    z-index: 100;
    animation: beaconPulse 1.5s ease-in-out infinite;
}

.space-beacon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(255, 107, 71, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: beaconRadiusBlink 1s ease-in-out infinite;
}

.space-beacon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #ffff88 0%, #ffaa44 100%);
    border-radius: 50%;
    border: 1px solid #ffffff;
    transform: translate(-50%, -50%);
    animation: beaconCore 0.8s ease-in-out infinite alternate;
}

.space-beacon.targeting {
    border-color: #ff3333;
    background: radial-gradient(circle, #ff4444 0%, #cc1111 40%, #880000 70%, #440000 100%);
    box-shadow: 
        0 0 20px #ff3333,
        0 0 40px #ff3333,
        0 0 60px rgba(255, 51, 51, 0.9),
        inset 0 0 12px rgba(255, 255, 255, 0.4);
    animation: beaconTargetingPulse 0.3s ease-in-out infinite;
}

.space-beacon.targeting::before {
    border-color: rgba(255, 51, 51, 0.8);
    animation: beaconTargetingRadius 0.5s ease-in-out infinite;
}

.space-beacon.targeting::after {
    background: radial-gradient(circle, #ffaaaa 0%, #ff6666 100%);
}

@keyframes beaconPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 0 15px #ff6b47,
            0 0 30px #ff6b47,
            0 0 45px rgba(255, 107, 71, 0.7),
            inset 0 0 8px rgba(255, 255, 255, 0.3);
    }
    50% { 
        transform: scale(1.15);
        box-shadow: 
            0 0 20px #ff6b47,
            0 0 40px #ff6b47,
            0 0 60px rgba(255, 107, 71, 0.9),
            inset 0 0 12px rgba(255, 255, 255, 0.5);
    }
}

@keyframes beaconRadiusBlink {
    0%, 100% { 
        border-color: rgba(255, 107, 71, 0.2);
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    25% { 
        border-color: rgba(255, 107, 71, 0.8);
        transform: translate(-50%, -50%) scale(1.02);
        opacity: 1;
    }
    50% { 
        border-color: rgba(255, 255, 68, 0.9);
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.9;
    }
    75% { 
        border-color: rgba(255, 107, 71, 0.8);
        transform: translate(-50%, -50%) scale(1.02);
        opacity: 1;
    }
}

@keyframes beaconTargetingPulse {
    0%, 100% { 
        transform: scale(1.1);
        box-shadow: 
            0 0 20px #ff3333,
            0 0 40px #ff3333,
            0 0 60px rgba(255, 51, 51, 0.9),
            inset 0 0 12px rgba(255, 255, 255, 0.4);
    }
    50% { 
        transform: scale(1.25);
        box-shadow: 
            0 0 30px #ff3333,
            0 0 60px #ff3333,
            0 0 90px rgba(255, 51, 51, 1.0),
            inset 0 0 16px rgba(255, 255, 255, 0.6);
    }
}

@keyframes beaconTargetingRadius {
    0%, 100% { 
        border-color: rgba(255, 51, 51, 0.6);
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% { 
        border-color: rgba(255, 255, 255, 1.0);
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1.0;
    }
}

@keyframes beaconCore {
    0% { 
        background: #ffff88;
        transform: translate(-50%, -50%) scale(1);
    }
    100% { 
        background: #ffaa44;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.beacon-explosion {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #ffff88 0%, #ff6b47 30%, #ff3838 60%, transparent 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: beaconExplode 0.6s ease-out forwards;
    z-index: 200;
}

@keyframes beaconExplode {
    0% { 
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0.8;
    }
    100% { 
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Floating Mine Threat System */
.floating-mine {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #44ff44 0%, #228822 40%, #116611 70%, #004400 100%);
    border-radius: 50%;
    border: 3px solid #88ff88;
    box-shadow: 
        0 0 12px #44ff44,
        0 0 24px #44ff44,
        0 0 36px rgba(68, 255, 68, 0.6),
        inset 0 0 6px rgba(255, 255, 255, 0.4);
    z-index: 150;
    animation: floatingMinePulse 1.2s ease-in-out infinite;
    pointer-events: none;
    cursor: default;
}

.floating-mine::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ccffcc 0%, #88ff88 100%);
    border-radius: 50%;
    border: 1px solid #ffffff;
    transform: translate(-50%, -50%);
    animation: floatingMineCore 0.6s ease-in-out infinite alternate;
}

.floating-mine::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    border: 2px solid rgba(68, 255, 68, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: floatingMineRadius 1.5s ease-in-out infinite;
}

.floating-mine.targeted {
    border-color: #ff6666;
    background: radial-gradient(circle, #ff4444 0%, #cc2222 40%, #881111 70%, #440000 100%);
    box-shadow: 
        0 0 12px #ff4444,
        0 0 24px #ff4444,
        0 0 36px rgba(255, 68, 68, 0.8),
        inset 0 0 8px rgba(255, 255, 255, 0.3);
    animation: targetedMinePulse 0.4s ease-in-out infinite;
}

.floating-mine.targeted::before {
    background: radial-gradient(circle, #ffcccc 0%, #ffaaaa 100%);
}

@keyframes floatingMinePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 0 12px #44ff44,
            0 0 24px #44ff44,
            0 0 36px rgba(68, 255, 68, 0.6),
            inset 0 0 6px rgba(255, 255, 255, 0.4);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 
            0 0 16px #44ff44,
            0 0 32px #44ff44,
            0 0 48px rgba(68, 255, 68, 0.8),
            inset 0 0 8px rgba(255, 255, 255, 0.6);
    }
}

@keyframes targetedMinePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 0 8px #ff4444,
            0 0 16px #ff4444,
            0 0 24px rgba(255, 68, 68, 0.6);
    }
    50% { 
        transform: scale(1.2);
        box-shadow: 
            0 0 12px #ff4444,
            0 0 24px #ff4444,
            0 0 36px rgba(255, 68, 68, 0.8);
    }
}

@keyframes floatingMineRadius {
    0%, 100% { 
        border-color: rgba(68, 255, 68, 0.3);
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% { 
        border-color: rgba(68, 255, 68, 0.7);
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.8;
    }
}

@keyframes floatingMineCore {
    0% { 
        background: #88ff88;
        transform: translate(-50%, -50%) scale(1);
    }
    100% { 
        background: #aaffaa;
        transform: translate(-50%, -50%) scale(1.3);
    }
}

.shield-hint {
    font-size: 12px;
    color: #88ccaa;
    opacity: 0.8;
}

.shielded-word {
    box-shadow: 
        0 0 15px #4da6ff,
        0 0 25px #4da6ff,
        0 0 35px rgba(77, 166, 255, 0.5);
    animation: shield-pulse 2s infinite ease-in-out;
}

@keyframes shield-pulse {
    0%, 100% { 
        box-shadow: 
            0 0 15px #4da6ff,
            0 0 25px #4da6ff,
            0 0 35px rgba(77, 166, 255, 0.5);
    }
    50% { 
        box-shadow: 
            0 0 20px #66b3ff,
            0 0 30px #66b3ff,
            0 0 45px rgba(102, 179, 255, 0.6);
    }
}

.highscore-table {
    background: rgba(26, 26, 26, 0.95);
    border: 2px solid #4488ff;
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0; /* Verbesserte Abstände oben und unten */
    max-height: 60vh; /* Begrenze die maximale Höhe */
    overflow-y: auto; /* Ermögliche Scrollen bei vielen Einträgen */
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(68, 136, 255, 0.3);
}

.highscore-table h2 {
    color: #66aaff;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(45deg, #4488ff, #66aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highscore-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highscore-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(68, 136, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    gap: 20px;
}

.highscore-entry.current {
    background: rgba(68, 136, 255, 0.2);
    border-color: #4488ff;
    box-shadow: 0 0 15px rgba(68, 136, 255, 0.3);
}

.highscore-rank {
    font-weight: 700;
    color: #ffaa44;
    min-width: 40px;
    flex-shrink: 0;
}

.highscore-name {
    flex: 1;
    text-align: left;
    min-width: 120px;
}

.highscore-score {
    font-weight: 600;
    color: #44ff88;
    min-width: 90px;
    text-align: right;
    flex-shrink: 0;
}

.highscore-time {
    font-weight: 600;
    color: #66aaff;
    min-width: 70px;
    text-align: right;
    flex-shrink: 0;
}

/* Enhanced Highscore Styling for Online Leaderboard */
.highscore-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(68, 136, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    gap: 20px;
}

.highscore-entry.current-score {
    background: rgba(68, 136, 255, 0.2);
    border-color: #4488ff;
    box-shadow: 0 0 15px rgba(68, 136, 255, 0.3);
    animation: highlightCurrentScore 2s ease-in-out infinite;
}

.highscore-entry.online-entry {
    border-color: rgba(102, 255, 136, 0.3);
    background: rgba(102, 255, 136, 0.05);
}

.rank {
    font-weight: 700;
    color: #ffaa44;
    min-width: 40px;
    flex-shrink: 0;
    font-size: 18px;
}

.player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-name {
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-details {
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.score {
    color: #44ff88;
    font-weight: 600;
}

.time {
    color: #66aaff;
    font-weight: 600;
}

.words {
    color: #ffaa44;
    font-weight: 600;
}

.date {
    color: #aaaaaa;
    font-size: 12px;
    min-width: 80px;
    text-align: right;
}

.no-scores {
    text-align: center;
    color: #aaaaaa;
    font-style: italic;
    padding: 20px;
}

/* Online Leaderboard Section */
.online-leaderboard-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid rgba(68, 136, 255, 0.3);
    text-align: center;
}

.online-button {
    background: linear-gradient(45deg, #4488ff, #66aaff);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(68, 136, 255, 0.3);
}

.online-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(68, 136, 255, 0.4);
}

.submit-score-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(68, 136, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(68, 136, 255, 0.3);
}

.submit-prompt {
    color: #66aaff;
    font-size: 16px;
    margin-bottom: 15px;
}

.submit-button {
    background: linear-gradient(45deg, #44ff88, #66ffaa);
    color: #003311;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(68, 255, 136, 0.3);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(68, 255, 136, 0.4);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.privacy-note {
    color: #aaaaaa;
    font-size: 12px;
    margin-top: 10px;
    font-style: italic;
}

.back-button {
    background: rgba(255, 255, 255, 0.1);
    color: #66aaff;
    border: 1px solid rgba(68, 136, 255, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.back-button:hover {
    background: rgba(68, 136, 255, 0.2);
    border-color: #4488ff;
}

.loading {
    color: #66aaff;
    font-size: 18px;
    text-align: center;
    padding: 40px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes highlightCurrentScore {
    0%, 100% { box-shadow: 0 0 15px rgba(68, 136, 255, 0.3); }
    50% { box-shadow: 0 0 25px rgba(68, 136, 255, 0.6); }
}

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

/* Start Screen Navigation */
.start-screen-navigation {
    margin-bottom: 30px;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #66aaff;
    border: 2px solid rgba(68, 136, 255, 0.3);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 200px;
}

.nav-btn:hover {
    background: rgba(68, 136, 255, 0.2);
    border-color: #4488ff;
    transform: translateY(-2px);
}

.nav-btn.active {
    background: linear-gradient(45deg, #4488ff, #66aaff);
    color: white;
    border-color: #4488ff;
    box-shadow: 0 4px 15px rgba(68, 136, 255, 0.3);
}

.tab-content {
    display: none;
}

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

/* Start Screen Leaderboard */
.start-screen-leaderboard {
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(68, 136, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.start-screen-leaderboard h2 {
    color: #66aaff;
    font-size: 20px;
    margin-bottom: 15px;
    text-align: center;
    background: linear-gradient(45deg, #4488ff, #66aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highscore-list.compact {
    max-height: 300px;
    overflow-y: auto;
}

.highscore-entry.compact {
    padding: 8px 12px;
    margin-bottom: 5px;
    font-size: 14px;
}

.highscore-entry.compact .rank {
    font-size: 16px;
    min-width: 35px;
}

.highscore-entry.compact .player-name {
    font-size: 14px;
}

.highscore-entry.compact .score-details {
    font-size: 12px;
    gap: 10px;
}

.online-section-compact {
    margin-top: 15px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(68, 136, 255, 0.3);
}

.online-button.compact {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 20px;
}

.start-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #66aaff;
    border: 2px solid rgba(68, 136, 255, 0.3);
}

.start-button.secondary:hover {
    background: rgba(68, 136, 255, 0.2);
    border-color: #4488ff;
}

/* Responsive Design for Start Screen */
@media (max-width: 768px) {
    .nav-buttons {
        flex-direction: column;
        align-items: center;
    }

    .nav-btn {
        max-width: 250px;
        width: 100%;
    }

    .highscore-entry.compact {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .highscore-entry.compact .rank {
        min-width: auto;
    }

    /* Mobile Anpassungen für Overlays */
    .info-box {
        margin: 20px 10px; /* Bessere Abstände auf mobilen Geräten */
        padding: 25px; /* Weniger Padding */
        max-height: 90vh; /* Mehr Platz nutzen auf mobilen Geräten */
    }

    .highscore-table {
        max-height: 50vh; /* Angepasste Höhe auf mobilen Geräten */
        padding: 20px; /* Weniger Padding */
        margin: 15px 0; /* Angepasste Abstände */
    }

    .highscore-entry {
        padding: 10px 12px; /* Weniger Padding für mobile Einträge */
        font-size: 14px; /* Kleinere Schrift auf mobilen Geräten */
    }
}
/* Pulsar Endgame Mechanics */
.pulsar {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 500;
    transform: translate(-50%, -50%);
}

.pulsar.phase1 {
    background: radial-gradient(circle, rgba(68, 136, 255, 0.8) 0%, rgba(68, 136, 255, 0.4) 40%, rgba(68, 136, 255, 0.1) 70%, transparent 100%);
    box-shadow: 
        0 0 40px rgba(68, 136, 255, 0.6),
        0 0 80px rgba(68, 136, 255, 0.4),
        0 0 120px rgba(68, 136, 255, 0.2);
    animation: pulsarBlue 2s ease-in-out infinite;
}

.pulsar.phase2 {
    background: radial-gradient(circle, rgba(255, 68, 68, 0.9) 0%, rgba(255, 68, 68, 0.5) 40%, rgba(255, 68, 68, 0.2) 70%, transparent 100%);
    box-shadow: 
        0 0 60px rgba(255, 68, 68, 0.8),
        0 0 120px rgba(255, 68, 68, 0.6),
        0 0 180px rgba(255, 68, 68, 0.4);
    animation: pulsarRed 1s ease-in-out infinite;
}

@keyframes pulsarBlue {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

@keyframes pulsarRed {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.9;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }
}

.pulsar-wave {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 499;
    transform: translate(-50%, -50%);
}

.pulsar-wave.phase1 {
    border: 3px solid rgba(68, 136, 255, 0.6);
    animation: waveExpand1 1.5s ease-out forwards;
}

.pulsar-wave.phase2 {
    border: 4px solid rgba(255, 68, 68, 0.8);
    animation: waveExpand2 1s ease-out forwards;
}

@keyframes waveExpand1 {
    0% {
        width: 120px;
        height: 120px;
        opacity: 1;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

@keyframes waveExpand2 {
    0% {
        width: 120px;
        height: 120px;
        opacity: 1;
    }
    100% {
        width: 500px;
        height: 500px;
        opacity: 0;
    }
}

