:root {
    --gold: #D4AF37;
    --dark-blue: #0A192F;
    --glass-bg: rgba(10, 25, 47, 0.7);
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #006994;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    touch-action: none; /* Prevents default browser actions on swipe */
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    /* Create a deep water gradient */
    background: linear-gradient(to bottom, #004d73 0%, #0077be 100%);
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let touches pass through to canvas handler */
}

#score-board {
    position: absolute;
    top: env(safe-area-inset-top, 20px);
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.1s;
}

#score-icon {
    font-size: 20px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

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

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    pointer-events: auto; /* Catch taps on the panel if needed */
}

h1, h2 {
    margin: 0 0 10px 0;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 28px; }

p {
    margin: 10px 0;
    font-size: 18px;
    color: #e0e0e0;
}

p.small {
    font-size: 14px;
    color: #aaa;
    margin-top: 20px;
}

.blink {
    animation: blinker 1.5s linear infinite;
    color: var(--gold);
    font-weight: bold;
    margin-top: 30px;
}

@keyframes blinker {
    50% { opacity: 0; }
}

.countdown-text {
    font-size: 48px !important;
    color: #fff !important;
    margin-top: 20px !important;
    text-shadow: 0 0 10px var(--gold);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Quick pop animation for score */
.pop {
    transform: scale(1.2);
}

#domain-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--gold);
    padding: 14px 10px;
    text-align: center;
    pointer-events: auto;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

#domain-banner a {
    color: var(--dark-blue);
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    display: block;
    line-height: 1.4;
}