/* ===========================================
   SPACE SHOOTER - STYLESHEET
   A complete styling for the 2D space shooter game
   =========================================== */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(to bottom, #000000, #0a0a2e, #16213e);
    color: #00ff00;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

/* Main game container */
.game-container {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

/* Title */
h1 {
    font-size: 2.5em;
    letter-spacing: 8px;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
    animation: pulse 2s infinite;
}

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

/* Stats panel */
.stats-panel {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 50, 0, 0.5);
    border-radius: 5px;
    border: 2px solid #00ff00;
}

.stat {
    font-size: 1.2em;
}

.stat .label {
    color: #00cc00;
    margin-right: 5px;
}

.stat span:last-child {
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff00;
}

/* Canvas */
#gameCanvas {
    display: block;
    margin: 0 auto;
    background: #000000;
    border: 3px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    cursor: none;
}

/* Buttons */
.btn {
    background: linear-gradient(to bottom, #00ff00, #00cc00);
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 1.3em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 4px 0 #008800;
    transition: all 0.1s;
    letter-spacing: 2px;
}

.btn:hover {
    background: linear-gradient(to bottom, #00ff33, #00dd00);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #008800;
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #008800;
}

/* Game over screen */
.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 40px;
    border-radius: 10px;
    border: 3px solid #ff0000;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    z-index: 10;
}

.game-over h2 {
    color: #ff0000;
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff0000;
    animation: blink 1s infinite;
}

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

.game-over p {
    color: #ffffff;
    font-size: 1.5em;
    margin-bottom: 30px;
}

#finalScore {
    color: #ffff00;
    font-weight: bold;
    font-size: 1.3em;
}

/* Start screen */
.start-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 40px;
    border-radius: 10px;
    border: 3px solid #00ff00;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
    z-index: 10;
}

.start-screen h2 {
    color: #00ff00;
    font-size: 2em;
    margin-bottom: 30px;
    text-shadow: 0 0 10px #00ff00;
}

.controls-info {
    background: rgba(0, 50, 0, 0.5);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    border: 1px solid #00cc00;
}

.controls-info p {
    color: #00ff00;
    font-size: 1.1em;
    margin: 8px 0;
}

.controls-info strong {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

/* Instructions */
.instructions {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 50, 0, 0.3);
    border-radius: 5px;
    font-size: 1em;
}

.instructions p {
    color: #00cc00;
}

.instructions strong {
    color: #00ff00;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Audio Settings Panel */
.audio-settings {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 10px;
    min-width: 220px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    z-index: 100;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 5px;
}

.settings-header span {
    color: #00ff00;
    font-weight: bold;
    font-size: 1.1em;
}

.settings-toggle {
    background: none;
    border: none;
    color: #00ff00;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s;
}

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

.settings-content {
    margin-top: 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.settings-content.open {
    max-height: 300px;
}

.setting-row {
    margin: 10px 0;
    padding: 5px 0;
}

.setting-label {
    color: #00ff00;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #00ff00;
}

.slider-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slider-row label {
    color: #00cc00;
    font-size: 0.9em;
}

.slider-row input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(0, 100, 0, 0.5);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #00ff00;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px #00ff00;
}

.slider-row input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #00ff00;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px #00ff00;
}

.slider-row span {
    color: #00ff00;
    font-size: 0.9em;
    text-align: right;
    min-width: 40px;
}

/* Audio Unlock Overlay */
.audio-unlock {
    position: fixed;
    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: 1000;
}

.unlock-content {
    text-align: center;
    background: rgba(0, 50, 0, 0.8);
    padding: 40px;
    border-radius: 10px;
    border: 3px solid #00ff00;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
}

.unlock-content h3 {
    color: #00ff00;
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ff00;
}

.unlock-content p {
    color: #00cc00;
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
        letter-spacing: 4px;
    }

    .stats-panel {
        gap: 20px;
        font-size: 0.9em;
    }

    .btn {
        padding: 12px 30px;
        font-size: 1.1em;
    }

    .game-over h2,
    .start-screen h2 {
        font-size: 2em;
    }

    .audio-settings {
        top: 10px;
        right: 10px;
        min-width: 180px;
        font-size: 0.9em;
    }
}
