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

body, html {
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0a0015 0%, #020005 100%);
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: crosshair;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: white;
    animation: twinkle var(--duration) ease-in-out infinite alternate;
    opacity: 0;
}

@keyframes twinkle {
    0% { opacity: 0.1; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1.2); }
}

.start-overlay, .game-over-overlay, .pause-menu-overlay, .settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: radial-gradient(ellipse at center, rgba(10,0,21,0.9) 0%, rgba(2,0,5,0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.start-content {
    text-align: center;
    animation: floatUp 2s ease-in-out infinite alternate;
    padding: 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.start-emoji {
    font-size: 5rem;
    margin-bottom: 20px;
}

.start-text {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00ffff, #ff00cc, #00ffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    margin-bottom: 10px;
}

.start-instructions {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

.start-hint {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(45deg, #ff00cc, #3333ff);
    color: white;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(255,0,204,0.4);
    transition: transform 0.2s;
}

.start-hint:hover {
    transform: scale(1.05);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatUp {
    0% { transform: translateY(5px); }
    100% { transform: translateY(-5px); }
}

.hud {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    z-index: 50;
    pointer-events: none;
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: opacity 0.5s ease;
}

.menu-hint {
    pointer-events: none;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    text-transform: none;
}

.score {
    text-shadow: 0 0 10px rgba(0,255,255,0.6);
}

.lives {
    text-shadow: 0 0 10px rgba(255,51,102,0.6);
}

.weapon-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 50;
    pointer-events: auto;
    background: rgba(10, 0, 21, 0.6);
    padding: 10px 20px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    transition: opacity 0.5s ease;
}

.weapon-btn {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 900;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1.1;
    transition: all 0.2s ease;
}

.weapon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.weapon-btn.selected {
    background: linear-gradient(135deg, #00ffff, #ff00cc);
    border-color: #fff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
    transform: scale(1.15);
    color: #fff;
}

.weapon-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(200, 50, 50, 0.2);
    border-color: rgba(255, 0, 0, 0.3);
}
.weapon-btn.locked:hover {
    transform: none;
    background: rgba(200, 50, 50, 0.2);
}

/* Settings Styles */
.setting-row {
    width: 100%;
}
.modern-range {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #00ffff 0%, #a200ff var(--val, 100%), rgba(255, 255, 255, 0.2) var(--val, 100%), rgba(255, 255, 255, 0.2) 100%);
    border-radius: 5px;
    height: 8px;
    outline: none;
    margin-top: 5px;
}
.modern-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #00ffff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    transition: transform 0.2s ease;
}
.modern-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Modern Toggle Switch */
.modern-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.modern-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .3s;
    border-radius: 34px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.modern-toggle input:checked + .toggle-slider {
    background: linear-gradient(45deg, #00ffff, #00ffcc);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}
.modern-toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
}
