/* ─── Reset & Base ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0f;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    user-select: none;
}

/* ─── Game Wrapper ─── */
#game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

/* ─── Header ─── */
#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 780px;
    max-width: 100%;
    padding: 0 4px;
}

#header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #00f5d4;
    text-shadow: 0 0 20px rgba(0, 245, 212, 0.4), 0 0 60px rgba(0, 245, 212, 0.15);
}

#score-board {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 6px 18px;
}

.score-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.4);
}

#score {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    min-width: 50px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ─── Canvas ─── */
#gameCanvas {
    border-radius: 16px;
    box-shadow:
        0 0 30px rgba(0, 245, 212, 0.10),
        0 0 80px rgba(0, 245, 212, 0.05),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
    background: #0f0f1a;
    cursor: none;
    max-width: 100%;
    height: auto;
}

/* ─── Footer ─── */
#footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 780px;
    max-width: 100%;
    padding: 0 4px;
}

#footer p {
    color: rgba(255,255,255,0.25);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

#restartBtn {
    padding: 8px 22px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #00f5d4, #00b4d8);
    color: #0a0a0f;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.2);
}

#restartBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(0, 245, 212, 0.4);
}

#restartBtn:active {
    transform: scale(0.95);
}

/* ─── Responsywność ─── */
@media (max-width: 820px) {
    #header, #footer {
        width: 90vw;
    }
    #gameCanvas {
        width: 90vw;
        height: auto;
        aspect-ratio: 780 / 520;
    }
    #header h1 {
        font-size: 1.1rem;
    }
    #score {
        font-size: 1.2rem;
    }
}
