body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #0f172a;
    /* Deep space blue-black */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    user-select: none;
    cursor: default;
    /* Show normal cursor by default */
    touch-action: none;
}


/* Hide cursor when game is active for custom plasma cursor */
body.game-active {
    cursor: none;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.hidden {
    display: none !important;
}

/* Start Screen */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10;
}

.content-box {
    background: rgba(30, 41, 59, 0.9);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 2px solid #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    max-width: 600px;
    width: 90%;
}

.game-title {
    font-family: "Honk", system-ui;
    font-size: 6rem;
    margin: 0;
    line-height: 1;
}

.subtitle {
    color: #94a3b8;
    margin-top: 0.5rem;
    font-style: italic;
}

.how-to-play {
    margin: 1.5rem 0;
    text-align: left;
    background: rgba(15, 23, 42, 0.5);
    padding: 1rem;
    border-radius: 0.5rem;
}

.how-to-play h3 {
    margin-top: 0;
    color: #60a5fa;
}

button {
    background: linear-gradient(to bottom, #3b82f6, #2563eb);
    border: none;
    padding: 1rem 2rem;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    width: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

button:active {
    transform: translateY(0);
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    /* Let clicks pass through to canvas */
    z-index: 5;
}

#score-board {
    position: absolute;
    left: 1rem;
    top: 1rem;
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat .label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: bold;
}

.stat span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f8fafc;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#mute-btn {
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: auto;
    padding: 0.5rem 1rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #475569;
    pointer-events: auto;
}

/* Game Over Modal */
#game-over-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.modal-content {
    background: #1e293b;
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
    border: 2px solid #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}

.modal-content h1 {
    color: #ef4444;
    font-size: 3rem;
    margin: 0 0 1rem 0;
}

.final-score {
    font-size: 1.5rem;
    margin: 2rem 0;
}

.high-scores {
    margin-top: 1rem;
    text-align: left;
    max-height: 150px;
    overflow-y: auto;
}

.high-scores ul {
    list-style: none;
    padding: 0;
}

.high-scores li {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid #334155;
    font-size: 0.9rem;
}

.high-scores li .player-name-val {
    color: #fbbf24;
    font-weight: bold;
}

/* Name Entry */
.name-entry {
    margin: 1.5rem 0;
}

#player-name {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid #334155;
    border-radius: 0.5rem;
    color: #fbbf24;
    font-size: 1.1rem;
    text-align: center;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#player-name:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

#player-name::placeholder {
    color: #475569;
}

/* Info Button */
.info-btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    background: rgba(59, 130, 246, 0.3);
    border: 1px solid #3b82f6;
}

.info-btn:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* Info Modal */
#info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30;
}

.info-modal-content {
    background: #1e293b;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 2px solid #3b82f6;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
    max-width: 500px;
    width: 90%;
}

.info-modal-content h2 {
    color: #60a5fa;
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
}

.info-modal-content p {
    color: #cbd5e1;
    line-height: 1.6;
    margin: 1rem 0;
}

.info-modal-content strong {
    color: #fbbf24;
}