/* ============================================
   Pixel Tap Quest - Feuille de styles
   Design responsive et moderne
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

#game-main{
    font-family:'Press Start 2P',monospace;
    background: linear-gradient(135deg, #0f0c29, #1a1a2e, #0d0d0d);
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

#pq-wrap{
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 100svh;
    max-height: 820px;
    overflow: hidden;
    background: #111;
}

#pq-wrap canvas{
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    touch-action: none;
}

/* ── HUD ── */
#pq-hud{
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px 6px;
    background: linear-gradient(#000c, #0000);
    pointer-events: none; z-index: 5;
}
.pq-hbox{
    background: #000a; border: 2px solid #ffe066;
    padding: 5px 9px; font-size: 7px; color: #ffe066; line-height: 1.9;
}
.pq-hval{ color: #fff; font-size: 9px; }

/* barre temps */
#pq-tbar-wrap{
    position: absolute; top: 0; left: 0; right: 0; height: 6px;
    background: #222; z-index: 6;
}
#pq-tbar{
    height: 100%; background: linear-gradient(90deg, #e63946, #ffe066);
    transition: width .15s linear;
}

/* ── OVERLAY ── */
#pq-overlay{
    position: absolute; inset: 0;
    background: #000000dd;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 22px; z-index: 20;
    padding: 30px 20px;
}
#pq-overlay h1{
    font-size: clamp(18px, 6vw, 28px);
    color: #ffe066;
    text-shadow: 4px 4px #e63946, 0 0 30px #ffe066aa;
    text-align: center; line-height: 1.5; letter-spacing: 2px;
}
.pq-sub{ font-size: clamp(6px, 2vw, 8px); color: #aaa; text-align: center; line-height: 2.4; max-width: 300px; }
.pq-tip{ font-size: clamp(5px, 1.8vw, 7px); color: #666; text-align: center; line-height: 2.2; }
.pq-btn{
    background: #e63946; color: #fff; border: none;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(8px, 2.5vw, 11px);
    padding: 14px 36px; cursor: pointer;
    border-bottom: 4px solid #8b0000;
    border-right: 4px solid #8b0000;
    letter-spacing: 1px;
    touch-action: manipulation;
}
.pq-btn:active{ transform: translate(2px, 2px); border-width: 2px; }

/* ripple tap visuel */
.pq-ripple{
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    border: 3px solid #ffe06688;
    animation: pq-ripple .5s ease-out forwards;
    z-index: 4;
}
@keyframes pq-ripple{
    from{ width: 10px; height: 10px; margin: -5px; opacity: 1; }
    to{ width: 60px; height: 60px; margin: -30px; opacity: 0; }
}

#pq-msgbox{
    position: absolute; bottom: 90px; left: 50%;
    transform: translateX(-50%);
    background: #000c; border: 2px solid #ffe066;
    color: #fff; font-size: 8px; padding: 8px 14px;
    pointer-events: none; z-index: 10;
    white-space: nowrap; text-align: center;
    opacity: 0; transition: opacity .2s;
}
#pq-msgbox.show{ opacity: 1; }

/* indicateur tap destination */
#pq-dest-ring{
    position: absolute; pointer-events: none; z-index: 4;
    display: none;
}
