:root {
    --primary: #FFD700;
    --font-heading: 'Space Grotesk', sans-serif;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #111;
    font-family: var(--font-heading);
    touch-action: none; /* Prevent zooming/scrolling on mobile */
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, #1a0b2e 0%, #000 100%);
}

#game-canvas, #three-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
}

#three-canvas {
    position: absolute;
    inset: 0;
}

#three-canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

#score-board {
    padding: 20px;
    font-size: 24px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    pointer-events: auto;
}

.mute-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--primary);
    border: 1px solid rgba(255, 215, 0, 0.4);
    padding: 8px 14px;
    font-size: 0.85rem;
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    pointer-events: auto;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.1s;
}

.mute-btn:hover { background: rgba(255, 215, 0, 0.15); }
.mute-btn:active { transform: scale(0.95); }
.mute-btn[aria-pressed="true"] { opacity: 0.6; }

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.overlay p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    max-width: 80%;
}

.cta-text {
    color: #ff6b6b;
    font-weight: bold;
    margin: 20px 0;
}

.btn {
    background: var(--primary);
    color: black;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.btn-buy {
    background: #4ade80;
}

.game-over-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.back-link {
    color: white;
    text-decoration: underline;
    margin-top: 30px;
    font-size: 1rem;
}

.submit-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 500px;
}

#nickname-input {
    flex: 1 1 200px;
    min-width: 0;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-heading);
    border-radius: 24px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    outline: none;
}

#nickname-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.submit-status {
    min-height: 1.5em;
    font-size: 0.95rem;
    margin: 6px 0 0;
}

.btn-share {
    background: #1d9bf0;
    color: white;
}

.btn-share:hover {
    box-shadow: 0 0 20px rgba(29, 155, 240, 0.6);
}
