/* Game Page Styles */

.game-main {
    padding-top: 80px;
    background: var(--bg-dark);
    overflow-x: hidden;
}

.game-hero {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, var(--bg-darker) 100%);
    padding: 2rem 0 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.game-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 30%, rgba(255, 0, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.game-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.game-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--accent-color);
    font-weight: 400;
    letter-spacing: 2px;
}

.game-section {
    padding: 2rem 0 2rem;
    background: var(--bg-dark);
}

.game-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(255, 0, 0, 0.3);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.game-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.game-canvas-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #0a0a0a;
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(255, 0, 0, 0.2);
}

.game-canvas-container:fullscreen {
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0;
}

.game-canvas-container:fullscreen #gameCanvas {
    width: auto;
    height: 100vh;
    max-width: 100vw;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

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

.game-overlay.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    max-width: 500px;
}

.overlay-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    letter-spacing: 3px;
    text-shadow: 2px 2px 8px rgba(255, 0, 0, 0.5);
}

.game-over-title {
    color: #ff0000;
    animation: pulse 2s infinite;
}

.level-complete-title {
    color: #ffff00;
    animation: glow 2s infinite;
}

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

@keyframes glow {
    0%, 100% {
        text-shadow: 2px 2px 8px rgba(255, 255, 0, 0.5);
    }
    50% {
        text-shadow: 2px 2px 20px rgba(255, 255, 0, 0.8),
                     0 0 30px rgba(255, 255, 0, 0.6);
    }
}

.overlay-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

#newHighScore {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.3rem;
    animation: flash 1s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.game-info {
    max-width: 900px;
    margin: 2rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-section {
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1.25rem;
}

.info-section h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

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

.info-section li {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.info-section li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.8rem;
}

.info-section li strong {
    color: var(--accent-color);
    font-weight: 600;
}

.info-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 1rem;
    }

    .game-header {
        padding: 0.8rem;
        gap: 0.5rem;
    }

    .game-stat {
        flex: 1;
        min-width: 120px;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .overlay-title {
        font-size: 1.8rem;
    }

    .overlay-text {
        font-size: 1rem;
    }

    .overlay-content {
        padding: 1.5rem;
        max-width: 90%;
    }

    .game-info {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .game-hero {
        padding: 1.5rem 0 1rem;
    }

    .game-section {
        padding: 1.5rem 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2rem;
    }

    .game-subtitle {
        font-size: 0.9rem;
    }

    .game-container {
        padding: 0.8rem;
        border-width: 1px;
    }

    .game-canvas-container {
        border-width: 2px;
    }

    .overlay-title {
        font-size: 1.5rem;
    }

    .game-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .info-section {
        padding: 1rem;
    }

    .info-section h3 {
        font-size: 1.1rem;
    }

    .game-hero {
        padding: 1rem 0 0.75rem;
    }

    .game-section {
        padding: 1rem 0 1rem;
    }

    .game-info {
        margin-top: 1rem;
    }
}

/* Special effects for game elements */
.game-canvas-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 0, 0, 0.03) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Scanline effect */
.game-canvas-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 2;
    opacity: 0.3;
}
