@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;900&display=swap');

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

body {
    background-color: #120b05;
    background-image: radial-gradient(circle at center, #2a1a0d 0%, #120b05 100%);
    color: #f0e0d0;
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 800px;
    max-width: 100vw;
    height: 600px;
    max-height: 100vh;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(0,0,0,0.5);
    background-color: #2c1a0b;
    border: 6px solid #4a2c11;
    border-radius: 12px;
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#hud {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.hud-item {
    background: rgba(40, 20, 10, 0.85);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 22px;
    font-weight: 900;
    border: 2px solid #734a26;
    text-shadow: 2px 2px 0 #000, 0 0 8px rgba(255, 204, 0, 0.5);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(115, 74, 38, 0.5);
    color: #ffcc00;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-label {
    color: #f2e3d5;
    font-weight: 700;
    text-shadow: 2px 2px 0 #000;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 11, 5, 0.9);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 20;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

#overlay-title {
    font-size: 72px;
    color: #ffaa00;
    text-transform: uppercase;
    letter-spacing: 6px;
    text-shadow: 4px 4px 0 #5c3a1e, 0 0 25px rgba(255, 170, 0, 0.6);
    margin-bottom: 20px;
    font-weight: 900;
}

#overlay-desc {
    font-size: 22px;
    line-height: 1.6;
    margin-bottom: 40px;
    color: #f2e3d5;
    text-shadow: 2px 2px 4px #000;
    font-weight: 400;
    max-width: 80%;
}

#overlay-instruction {
    font-size: 26px;
    font-weight: 700;
    animation: pulse 1.5s infinite;
    color: #fff;
    background: linear-gradient(135deg, #a6531c, #d97529);
    padding: 16px 36px;
    border-radius: 12px;
    border: 2px solid #ffaa00;
    box-shadow: 0 8px 20px rgba(217, 117, 41, 0.4), inset 0 2px 4px rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#score-display {
    margin-top: 40px;
    font-size: 28px;
    color: #ffcc00;
    text-shadow: 3px 3px 0 #000;
    background: rgba(0, 0, 0, 0.6);
    padding: 24px 40px;
    border-radius: 16px;
    border: 2px solid #ff9900;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    font-weight: 700;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 8px 20px rgba(217, 117, 41, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 12px 30px rgba(217, 117, 41, 0.6); }
    100% { transform: scale(1); box-shadow: 0 8px 20px rgba(217, 117, 41, 0.4); }
}
