/* ═══════════════════════════════════════════════════
   Countdown Page — iucc.me aesthetic
   ═══════════════════════════════════════════════════ */

.countdown-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 4.5rem 2rem 6rem;
}

/* ── Header ── */
.countdown-header {
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fade-in-up 0.56s ease 0.1s forwards;
}

.countdown-header h1 {
    font-size: clamp(1.35rem, 3vw, 2.1rem);
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: 0.01em;
}

.countdown-header .event-label {
    font-size: 0.96rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.countdown-header .event-label .event-name {
    font-weight: 600;
    color: #fff;
}

/* ── Timer Grid ── */
.timer-grid {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
    opacity: 0;
    animation: fade-in-up 0.56s ease 0.2s forwards;
}

.timer-unit {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 1.8rem 1.6rem 1.2rem;
    min-width: 95px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.14s ease, background-color 0.14s ease;
}

.timer-unit:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.timer-unit .value {
    font-size: 2.4rem;
    font-weight: 500;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: transform 0.25s ease;
}

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

.timer-unit .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.55rem;
    font-weight: 500;
}

/* ── Completed State ── */
.timer-completed {
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fade-in-up 0.56s ease 0.15s forwards;
}

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

.timer-completed h2 {
    font-size: 1.4rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 0.5rem;
}

.timer-completed p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.96rem;
}

/* ── Tasks Section ── */
.tasks-section {
    width: 100%;
    max-width: 28rem;
    opacity: 0;
    animation: fade-in-up 0.56s ease 0.35s forwards;
}

.tasks-section h2 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #fff;
    margin-bottom: 0.4rem;
    text-align: center;
}

.tasks-section .tasks-subtitle {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ── Progress ── */
.progress-wrapper {
    margin-bottom: 1.5rem;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
}

.progress-bar-bg {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    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.5rem;
}

.task-item {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.14s ease, background-color 0.14s ease;
    cursor: default;
}

.task-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

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

.task-item.completed .task-text {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.3);
}

/* ── Checkbox ── */
.task-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.14s ease, border-color 0.14s ease;
}

.task-item.completed .task-checkbox {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}

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

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

.task-text {
    font-size: 0.88rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.78);
    transition: color 0.14s ease;
}

/* ── Priority ── */
.priority-badge {
    margin-left: auto;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    flex-shrink: 0;
    border: 1px solid;
}

.priority-badge.prio-1 {
    border-color: rgba(248, 113, 113, 0.3);
    color: #f87171;
}
.priority-badge.prio-2 {
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}
.priority-badge.prio-3 {
    border-color: rgba(96, 165, 250, 0.3);
    color: #60a5fa;
}

.task-main-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

/* ── Subtasks ── */
.subtask-list {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 0 2.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subtask-item.completed { opacity: 0.35; }
.subtask-item.completed .subtask-text {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.25);
}

.subtask-checkbox {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subtask-item.completed .subtask-checkbox {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.subtask-check-icon {
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
    color: #000;
    font-size: 0.45rem;
}

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

.subtask-text {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ── Animations ── */
@keyframes fade-in-up {
    0%   { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

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

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

/* ── Responsive ── */
@media (max-width: 520px) {
    .countdown-body {
        padding: 3rem 1rem 5rem;
    }
    .countdown-header h1 {
        font-size: 1.4rem;
    }
    .timer-unit {
        min-width: 70px;
        padding: 1.4rem 1.2rem 1rem;
    }
    .timer-unit .value {
        font-size: 1.8rem;
    }
}
