/* ================================================================
   ARCADE CAR RACING — Styles
   ================================================================ */

/* ── Launch Button ─────────────────────────────────────────────── */
#acr-open-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99998;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #e63946, #c1121f);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,.45);
    transition: transform .15s, box-shadow .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#acr-open-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(0,0,0,.55);
}

/* ── Overlay ───────────────────────────────────────────────────── */
#acr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.72);
    align-items: center;
    justify-content: center;
}
#acr-overlay.acr-visible {
    display: flex;
}

/* ── Modal Container ───────────────────────────────────────────── */
#acr-modal {
    position: relative;
    background: #0d0d1a;
    border: 2px solid #e63946;
    border-radius: 16px;
    box-shadow: 0 8px 48px rgba(230,57,70,.35), 0 0 0 1px rgba(255,255,255,.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 12px 16px;
    gap: 8px;
    max-height: 96vh;
    overflow: hidden;
    width: min(400px, 96vw);
}

/* ── Close Button ──────────────────────────────────────────────── */
#acr-close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    z-index: 10;
    transition: color .15s;
}
#acr-close-btn:hover { color: #fff; }

/* ── Header Row ────────────────────────────────────────────────── */
#acr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 4px;
    font-family: 'Courier New', Courier, monospace;
}
#acr-title {
    font-size: 15px;
    font-weight: bold;
    color: #e63946;
    letter-spacing: 1px;
}
#acr-score-display,
#acr-lives-display {
    font-size: 13px;
    color: #ccc;
}
#acr-score-display strong,
#acr-lives-display span {
    color: #fff;
    font-weight: bold;
}

/* ── Canvas ────────────────────────────────────────────────────── */
#acr-canvas {
    display: block;
    border-radius: 8px;
    background: #111;
    /* width/height set by JS */
    max-width: 100%;
}

/* ── Overlay Screens (start / gameover) ────────────────────────── */
.acr-screen {
    position: absolute;
    top: 52px;          /* below header */
    left: 0; right: 0;
    bottom: 76px;       /* above controls */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10,10,20,.88);
    border-radius: 8px;
    z-index: 5;
}
.acr-screen-inner {
    text-align: center;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    padding: 20px;
}
.acr-screen-inner h2 {
    font-size: 28px;
    margin: 0 0 10px;
    color: #e63946;
    text-shadow: 0 0 12px rgba(230,57,70,.6);
}
.acr-screen-inner p {
    font-size: 14px;
    color: #ccc;
    margin: 6px 0;
}
.acr-screen-inner ul {
    list-style: none;
    padding: 0;
    margin: 12px 0 20px;
}
.acr-screen-inner ul li {
    font-size: 13px;
    color: #aaa;
    margin: 5px 0;
}
.acr-btn-primary {
    background: linear-gradient(135deg, #e63946, #c1121f);
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 12px 40px;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 2px;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 4px 16px rgba(230,57,70,.4);
    transition: transform .12s, box-shadow .12s;
    margin-top: 8px;
}
.acr-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(230,57,70,.6);
}
.acr-btn-primary:active {
    transform: translateY(0);
}

/* ── Control Buttons ───────────────────────────────────────────── */
#acr-controls {
    display: flex;
    gap: 16px;
    width: 100%;
    padding: 0 4px;
}
.acr-ctrl-btn {
    flex: 1;
    height: 56px;
    background: linear-gradient(160deg, #1e1e2e, #16162a);
    border: 2px solid #333355;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    cursor: pointer;
    letter-spacing: 1px;
    transition: background .1s, border-color .1s, transform .08s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.acr-ctrl-btn:hover,
.acr-ctrl-btn.acr-pressed {
    background: linear-gradient(160deg, #2a2a45, #22223a);
    border-color: #e63946;
    color: #e63946;
}
.acr-ctrl-btn:active {
    transform: scale(.96);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 480px) {
    #acr-modal {
        border-radius: 10px;
        padding: 10px 8px 12px;
    }
    .acr-ctrl-btn {
        height: 52px;
        font-size: 14px;
    }
    #acr-open-btn {
        width: 52px;
        height: 52px;
        font-size: 22px;
        bottom: 16px;
        right: 16px;
    }
}
