/* ── Countdown Page ── */

.countdown-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 3rem 1.5rem 4rem;
}

/* ── Header ── */
.countdown-header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeSlideUp 0.8s ease-out;
}

.countdown-header h1 {
    font-size: 2.6rem;
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, #4E342E, #795548);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.countdown-header .event-label {
    font-size: 1.15rem;
    color: #795548;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.countdown-header .event-label .event-name {
    font-weight: 700;
    color: #4E342E;
}

/* ── Timer Grid ── */
.timer-grid {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    animation: fadeSlideUp 1s ease-out 0.15s both;
}

.timer-unit {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(161, 136, 127, 0.25);
    border-radius: 18px;
    padding: 1.6rem 1.4rem 1.2rem;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(93, 64, 55, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timer-unit:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(93, 64, 55, 0.14);
}

.timer-unit .value {
    font-size: 3rem;
    font-weight: 700;
    color: #4E342E;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: transform 0.25s ease;
}

.timer-unit .value.tick {
    animation: tickBounce 0.35s ease;
}

.timer-unit .label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #A1887F;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* ── Completed State ── */
.timer-completed {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeSlideUp 0.6s ease-out;
}

.timer-completed .emoji {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: celebrateBounce 1s ease infinite;
}

.timer-completed h2 {
    font-size: 2rem;
    color: #4E342E;
    margin-bottom: 0.4rem;
}

.timer-completed p {
    color: #795548;
    font-size: 1.1rem;
}

/* ── Tasks Section ── */
.tasks-section {
    width: 100%;
    max-width: 560px;
    animation: fadeSlideUp 1.2s ease-out 0.3s both;
}

.tasks-section h2 {
    font-size: 1.6rem;
    color: #4E342E;
    margin-bottom: 0.4rem;
    text-align: center;
}

.tasks-section .tasks-subtitle {
    font-size: 0.95rem;
    color: #A1887F;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Progress bar */
.progress-wrapper {
    margin-bottom: 1.8rem;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
    color: #795548;
    font-weight: 500;
}

.progress-bar-bg {
    height: 8px;
    background: rgba(161, 136, 127, 0.2);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #795548, #4E342E);
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    width: 0%;
}

/* Task list */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(161, 136, 127, 0.15);
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
    cursor: default;
}

.task-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(93, 64, 55, 0.08);
}

.task-item.completed {
    opacity: 0.55;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #A1887F;
}

/* Custom checkbox */
.task-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 2px solid #A1887F;
    background: transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.task-item.completed .task-checkbox {
    background: linear-gradient(135deg, #795548, #4E342E);
    border-color: #4E342E;
}

.task-checkbox .check-icon {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
    color: #F5F5DC;
    font-size: 0.7rem;
}

.task-item.completed .task-checkbox .check-icon {
    opacity: 1;
    transform: scale(1);
}

/* Task text */
.task-text {
    font-size: 1rem;
    font-weight: 500;
    color: #5D4037;
    transition: color 0.25s ease;
}

.task-category {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    background: rgba(161, 136, 127, 0.15);
    color: #795548;
    flex-shrink: 0;
}

/* ── Back link (override for this page) ── */
.countdown-body .back-link {
    margin-top: 3rem;
}

/* ── Animations ── */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tickBounce {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes celebrateBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .countdown-header h1 {
        font-size: 2rem;
    }

    .timer-unit {
        min-width: 75px;
        padding: 1.2rem 1rem 1rem;
    }

    .timer-unit .value {
        font-size: 2.2rem;
    }

    .task-category {
        display: none;
    }
}
