:root {
    --bg-gradient-top: #0a0a0f;
    --bg-gradient-bottom: #1a1525;
    --text-primary: #ffffff;
    --glass-bg: rgba(20, 15, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent: #00e5ff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-gradient-top), var(--bg-gradient-bottom));
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    z-index: 1;
    background-color: rgba(0,0,0,0.3);
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    display: block;
    /* Responsive sizing for mobile */
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

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

#header {
    display: flex;
    justify-content: center;
    padding: 20px;
    width: 100%;
}

.score-container {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: var(--glass-bg);
    padding: 10px 30px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

#score {
    color: var(--accent);
    font-weight: 900;
    margin-left: 10px;
    text-shadow: 0 0 10px var(--accent);
}

.glass-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-bg);
    padding: 40px 60px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.05);
    text-align: center;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

#game-over-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
    background: linear-gradient(to right, #00e5ff, #0066ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.4));
}

#game-over-score {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #cbd5e1;
}

#game-over-score span {
    color: white;
    font-weight: 700;
}

#restart-btn {
    background: linear-gradient(135deg, #00e5ff, #0066ff);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    outline: none;
}

#restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.6);
}

#restart-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 229, 255, 0.4);
}

.hidden {
    display: none !important;
}
