/* ==========================
   Timer
========================== */
.timer-page {
    min-height: calc(100vh - 70px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
}

.timer-card {
    width: min(760px, 92vw);
    padding: 45px;
    border-radius: 24px;
    background: white;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,.12);
}

.timer-card h1 {
    font-size: clamp(42px, 5vw, 60px);
    margin-bottom: 10px;
}

.timer-intro {
    color: #666;
    font-size: 18px;
    margin-bottom: 32px;
}

.timer-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 30px;
}

.mode-btn {
    height: 56px;
    background: #f4f1ff;
    color: #6b55c9;
    border: 2px solid transparent;
}

.mode-btn.active {
    background: linear-gradient(135deg, #7b4dff, #bf4cff);
    color: white;
}

.timer-inputs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 35px;
}

.timer-inputs label {
    width: 160px;
    text-align: left;
    font-weight: 700;
    color: #555;
}

.timer-inputs input {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 22px;
    text-align: center;
}

.timer-display {
    font-size: clamp(80px, 14vw, 170px);
    font-weight: 900;
    color: #7b4dff;
    line-height: 1;
    margin: 35px 0;
    text-shadow: 0 8px 25px rgba(123,77,255,.18);
}

.time-up {
    color: #ff3b70;
    animation: timerPulse .7s infinite alternate;
}

.timer-buttons {
    display: flex;
    gap: 16px;
}

.timer-buttons button {
    height: 60px;
}

.timer-start {
    background: linear-gradient(135deg, #64d947, #24bfb6);
    color: white;
}

.timer-start.running {
    background: linear-gradient(135deg, #ff3b70, #ff8c1a);
    color: white;
    box-shadow: 0 0 0 5px rgba(255, 59, 112, 0.16),
                0 12px 30px rgba(255, 59, 112, 0.35);
    animation: runningPulse 1s infinite alternate;
}

.timer-pause {
    background: linear-gradient(135deg, #ffca3a, #ff8c1a);
    color: white;
}

.timer-reset {
    background: white;
    border: 1px solid #ddd;
    color: #555;
}

.timer-start.running {
    opacity: 1;
    cursor: default;
}

@media (max-width: 700px) {
    .timer-mode,
    .timer-buttons {
        grid-template-columns: 1fr;
        display: grid;
    }

    .timer-inputs {
        flex-direction: column;
        align-items: center;
    }
}
