/* ============================================================
   CLAWDIER — Shell Shock Game Styles
   ============================================================ */

/* ----- Game Section ----- */
#game {
    background: var(--clr-army-dark);
    padding: 60px 24px 80px;
    text-align: center;
}
.game-title {
    color: var(--clr-accent);
    text-shadow: 3px 3px 0 rgba(0,0,0,.5);
}
.game-subtitle {
    font-size: 1.3rem;
    color: var(--clr-khaki);
    margin-bottom: 30px;
    opacity: .85;
}

/* ----- Game Container ----- */
.game-container {
    max-width: 640px;
    margin: 0 auto;
}

/* ----- HUD ----- */
.game-hud {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: rgba(0,0,0,.4);
    border-radius: 8px;
    border: 2px solid var(--clr-army);
}
.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.hud-label {
    font-family: var(--font-retro);
    font-size: .4rem;
    color: var(--clr-khaki);
    letter-spacing: .08em;
    opacity: .8;
}
.hud-value {
    font-family: var(--font-retro);
    font-size: .75rem;
    color: #fff;
    text-shadow: 1px 1px 0 rgba(0,0,0,.5);
}
.life { opacity: 1; transition: opacity .3s; }
.life-lost { opacity: .2; }

/* ----- Canvas Wrapper ----- */
.game-canvas-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 600 / 500;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid var(--clr-army);
    box-shadow: 0 6px 30px rgba(0,0,0,.4);
    background: #3d2e1a;
}
#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M7 3Q5 9 4 14Q3 18 6 19Q9 19 10 14L10 9' fill='%23e84c30' stroke='%23333' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M25 3Q27 9 28 14Q29 18 26 19Q23 19 22 14L22 9' fill='%23e84c30' stroke='%23333' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='16' cy='26' r='3' fill='%23e84c30' stroke='%23333' stroke-width='1'/%3E%3C/svg%3E") 16 16, crosshair;
}

/* ----- Overlays ----- */
.game-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(26,26,26,.88);
    backdrop-filter: blur(4px);
    z-index: 10;
    gap: 16px;
    padding: 20px;
}
.game-overlay h3 {
    font-family: var(--font-retro);
    font-size: clamp(.8rem, 3vw, 1.3rem);
    color: var(--clr-claw);
    text-shadow: 2px 2px 0 rgba(0,0,0,.6);
    letter-spacing: .08em;
}
.game-overlay p {
    font-size: 1.2rem;
    color: var(--clr-khaki);
}
.game-overlay .btn {
    margin-top: 8px;
}
.high-score {
    font-family: var(--font-retro);
    font-size: .5rem;
    color: var(--clr-accent);
    opacity: .7;
    margin-top: 8px;
}

/* Countdown */
.countdown-number {
    font-family: var(--font-retro);
    font-size: 4rem;
    color: var(--clr-claw);
    text-shadow: 4px 4px 0 rgba(0,0,0,.5);
    animation: countdown-pop .9s ease-out infinite;
}

/* Game Over */
.final-score-line {
    font-family: var(--font-retro);
    font-size: .7rem;
    color: #fff;
}
.new-record {
    font-family: var(--font-retro);
    font-size: .6rem;
    color: var(--clr-accent) !important;
    animation: shake .4s ease-in-out infinite;
}

/* ----- Game Animations ----- */
@keyframes countdown-pop {
    0% { transform: scale(1.4); opacity: 0; }
    30% { transform: scale(1); opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.game-canvas-wrapper.shake {
    animation: canvas-shake .35s ease-out;
}
@keyframes canvas-shake {
    0%  { transform: translate(0,0); }
    20% { transform: translate(-5px, 3px); }
    40% { transform: translate(5px, -3px); }
    60% { transform: translate(-3px, 2px); }
    80% { transform: translate(3px, -1px); }
    100%{ transform: translate(0,0); }
}

#game-canvas:active {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M10 5Q8 9 8 14Q7 17 10 17Q12 17 12 14L12 10' fill='%23c43a22' stroke='%23333' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M22 5Q24 9 24 14Q25 17 22 17Q20 17 20 14L20 10' fill='%23c43a22' stroke='%23333' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='16' cy='24' r='3' fill='%23c43a22' stroke='%23333' stroke-width='1'/%3E%3C/svg%3E") 16 16, crosshair;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .game-container { max-width: 100%; }
    .game-hud { padding: 8px 10px; }
    .hud-label { font-size: .32rem; }
    .hud-value { font-size: .6rem; }
    #game { padding: 40px 12px 60px; }
}
@media (max-width: 480px) {
    .hud-label { font-size: .28rem; }
    .hud-value { font-size: .5rem; }
    .life { font-size: .6rem; }
}
