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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #0a0a0f;
    color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* ── Ad slots ──────────────────────────────────────────────── */
.ad-slot {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0d0d15;
    /* Desktop: 728×90 leaderboard */
    min-height: 90px;
}

@media (max-width: 768px) {
    /* Mobile: 320×50 banner */
    .ad-slot { min-height: 50px; }
}

/* ── App container ─────────────────────────────────────────── */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 20px;
}

#timer {
    font-size: 1.3rem;
    font-weight: 300;
    color: #555;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.1em;
    min-height: 1.6rem;
}

#ring-wrap {
    position: relative;
    width: min(70vw, 280px);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: box-shadow 0.25s ease;
}

/* Hold: steady glow */
#ring-wrap.hold {
    box-shadow:
        0 0 20px #00ff8833,
        0 0 50px #00ff8822,
        0 0 90px #00ff8811;
}

/* Squeeze: firm green glow */
#ring-wrap.squeeze {
    box-shadow:
        0 0 20px #00ff8844,
        0 0 50px #00ff8822,
        0 0 90px #00ff8811;
}

/* Push: amber glow */
#ring-wrap.push {
    box-shadow:
        0 0 20px #ffaa0044,
        0 0 50px #ffaa0022,
        0 0 90px #ffaa0011;
}

/* Done: celebratory glow */
#ring-wrap.done {
    box-shadow: 0 0 30px #00ff8844, 0 0 60px #00ff8822;
}

#ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.track {
    fill: none;
    stroke: #1a1a2e;
    stroke-width: 5;
}

.progress {
    fill: none;
    stroke: #333;
    stroke-width: 5;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke 0.25s ease;
}

#ring-wrap.hold    .progress { stroke: #00ff88; }
#ring-wrap.rest    .progress { stroke: #444; }
#ring-wrap.squeeze .progress { stroke: #00ff88; }
#ring-wrap.push    .progress { stroke: #ffaa00; }
#ring-wrap.prep    .progress { stroke: #4488ff; }
#ring-wrap.done    .progress { stroke: #00ff88; }

#countdown {
    font-size: clamp(3.5rem, 16vw, 5.5rem);
    font-weight: 700;
    z-index: 1;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

#phase {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    min-height: 2rem;
    transition: color 0.25s ease;
}

#phase.hold    { color: #00ff88; }
#phase.rest    { color: #666; }
#phase.squeeze { color: #00ff88; }
#phase.push    { color: #ffaa00; }
#phase.prep    { color: #4488ff; }
#phase.done    { color: #00ff88; }

#diffGroup {
    display: flex;
    gap: 8px;
}

.diffBtn {
    padding: 10px 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 2px solid #2a2a3a;
    border-radius: 50px;
    background: transparent;
    color: #444;
    cursor: pointer;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.diffBtn.active {
    border-color: #fff;
    color: #fff;
}

.diffBtn:disabled {
    opacity: 0.25;
    cursor: default;
}

#startBtn {
    margin-top: 12px;
    padding: 16px 56px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    background: #fff;
    color: #0a0a0f;
    cursor: pointer;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 0.1s ease, opacity 0.1s ease;
}

#startBtn:active {
    transform: scale(0.95);
    opacity: 0.9;
}

#startBtn.hidden {
    display: none;
}
