/* Game Styles - Separated from main styles.css */

/* CSS Variables - Always Dark Theme for Game */
:root,
html,
body,
html[data-theme="dark"],
html[data-theme="light"],
body[data-theme="dark"],
body[data-theme="light"] {
    --primary: #558bc2 !important;
    --secondary: #7b68ee !important;
    --text: #e0e7f0 !important;
    --background: #0a0e1a !important;
    --glass-bg: rgba(255, 255, 255, 0.05) !important;
    --glass-border: rgba(255, 255, 255, 0.1) !important;
}

/* Body */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f35 100%) !important;
    color: #e0e7f0 !important;
    overflow: hidden;
}

/* Particle Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Game Overlay */
.easter-egg-game {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10;
    display: none;
    pointer-events: none;
}

.easter-egg-game.active {
    display: block;
    pointer-events: all;
}

.game-content {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Game Screens */
.game-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #e0e7f0 !important;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px;
    min-width: 400px;
    max-width: 90vw;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

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

.game-screen h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #558bc2 !important;
}

.game-screen p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    color: #e0e7f0 !important;
}

.final-time {
    font-size: 3rem !important;
    font-weight: bold;
    color: var(--secondary) !important;
    margin: 1rem 0 !important;
}

.game-button {
    margin-top: 1rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    padding: 15px 50px;
    font-size: 1.3rem;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e0e7f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    width: 220px;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
}

.game-button:hover {
    background: rgba(85, 139, 194, 0.3);
    border-color: var(--primary);
}

/* Game Timer */
.game-timer {
    position: absolute;
    bottom: max(80px, calc(40px + env(safe-area-inset-bottom)));
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    font-weight: bold;
    color: #558bc2 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 50;
}

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

/* Touch Controls */
.game-controls {
    position: absolute;
    bottom: max(80px, calc(40px + env(safe-area-inset-bottom)));
    left: 0;
    right: 0;
    display: none;
    justify-content: space-between;
    padding: 0 40px;
    padding-left: max(40px, calc(40px + env(safe-area-inset-left)));
    padding-right: max(40px, calc(40px + env(safe-area-inset-right)));
    z-index: 50;
}

.game-controls.active {
    display: flex;
}

.game-control-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid #558bc2 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #558bc2 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.game-control-btn:active {
    transform: scale(0.9);
    background: #558bc2 !important;
    color: white !important;
}

/* Gears Container */
#game-gears-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10;
}

.game-gear {
    position: fixed;
    color: #808080 !important;  /* Gray color */
    pointer-events: none;
    animation: rotateCW 2s linear infinite;
    /* Debug collision visualization - hidden by default */
    /* background: rgba(0, 255, 0, 0.3); */
    /* border: 2px solid green; */
    /* border-radius: 50%; */
}

@keyframes rotateCW {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Game Rocket */
.game-rocket {
    position: fixed;
    width: 240px;
    height: 240px;
    z-index: 20;
    transition: left 0.1s linear;
    opacity: 0;
}

/* Hide collision debug overlays */
.rocket-collision-debug,
.rocket-collision-debug-svg,
.gear-collision-debug,
.powerup-collision-circle-debug {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .game-screen {
        min-width: 0;
        width: auto;
        max-width: none;
        padding: 30px 20px;
        left: 20px;
        right: 20px;
        transform: translate(0, -50%);
    }

    .game-screen h2 {
        font-size: 2rem;
    }

    .game-control-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}
