/* *********************************************
   HEADER
********************************************** */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.nav-bar {
    backdrop-filter: blur(18px);
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.85),
        rgba(15, 23, 42, 0.65)
    );
}
body.theme-light .nav-bar {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.85),
        rgba(255,255,255,0.65)
    );
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
}
.logo span {
    color: var(--accent);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

/* *********************************************
   NAV TABS
********************************************** */
.nav-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: transparent;
    color: var(--fg);
    border: 1px solid transparent;
    font-size: 0.85rem;
    cursor: pointer;
    position: relative;
    padding-bottom: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-tab:hover {
    background: rgba(255,255,255,0.08);
}
body.theme-light .nav-tab:hover {
    background: rgba(0,0,0,0.06);
}

.nav-tab.active {
    background: var(--tab-active);
    color: var(--fg);
    border-color: rgba(148, 163, 184, 0.6);
}

/* Underline animation */
.nav-tab::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    transform: translateX(-50%);
    transition: width 0.25s ease;
}
.nav-tab.active::after {
    width: 60%;
}

/* *********************************************
   MAIN CONTAINER
********************************************** */
.main-container {
    max-width: 960px;
    margin: 1.5rem auto 2rem;
    padding: 0 1rem 2rem;
}

/* *********************************************
   TAB PANELS (with fade/slide animation)
********************************************** */
.tab-panel {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: none;
}
.tab-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    padding: 20px;
}

.tab-panel h1 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

/* *********************************************
   TIMER DISPLAY
********************************************** */
.timer-display {
    font-variant-numeric: tabular-nums;
    font-size: 3rem;
    text-align: center;
    margin: 1rem 0 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: 18px;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
    transition: font-size 0.25s ease;
}
.timer-display.hours {
    font-size: 2.4rem;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
}

/* *********************************************
   LAPS TABLE
********************************************** */
.laps-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}
.laps-table th,
.laps-table td {
    padding: 0.35rem 0.4rem;
    text-align: right;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}
.laps-table th:first-child,
.laps-table td:first-child {
    text-align: left;
}

/* *********************************************
   INPUT GROUPS
********************************************** */
.countdown-inputs,
.pom-settings,
.interval-config {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.countdown-inputs label,
.pom-settings label,
.interval-config label {
    font-size: 0.8rem;
    color: var(--muted);
}

.countdown-inputs input,
.pom-settings input,
.interval-config input {
    width: 4rem;
    padding: 0.25rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
/*    background: rgba(15, 23, 42, 0.9);*/
    background: var(--bg-alt);
    color: var(--fg);
}

/* Light theme input overrides */
body.theme-light label {
    color: var(--fg);
}
body.theme-light input {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--fg);
}


/* *********************************************
   INTERVAL
********************************************** */

#int-container {
    padding: 1rem;
    border-radius: 12px;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* High phase background */
.int-high-bg {
    background: rgba(255, 80, 80, 0.15);
    box-shadow: 0 0 20px rgba(255, 80, 80, 0.25);
}

/* Low phase background */
.int-low-bg {
    background: rgba(80, 180, 255, 0.15);
    box-shadow: 0 0 20px rgba(80, 180, 255, 0.25);
}


/* *********************************************
   POMODORO
********************************************** */

/* Container for Pomodoro (wrap your pomodoro UI in this) */
#pom-container {
    transition: background 0.4s ease, box-shadow 0.4s ease;
    padding: 1rem;
    border-radius: 12px;
}

/* Work phase background */
.pom-work-bg {
    background: rgba(255, 80, 80, 0.15);
    box-shadow: 0 0 20px rgba(255, 80, 80, 0.25);
}

/* Break phase background */
.pom-break-bg {
    background: rgba(80, 255, 140, 0.15);
    box-shadow: 0 0 20px rgba(80, 255, 140, 0.25);
}

#pom-status {
    display: inline-block;
    padding: 1.45rem 2rem;
    margin: 60px auto 0.8rem auto;   /* center horizontally */
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    text-align: center;

    color: var(--accent);
    border: 2px solid var(--accent);
    background: rgba(0, 0, 0, 0.15);

    box-shadow: 0 0 12px rgba(77, 163, 255, 0.35);

    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    opacity: 0.95;

    /* NEW: center the element */
    display: block;
    width: fit-content;
}

#pom-status.pop {
    transform: scale(1.10);
    box-shadow: 0 0 18px rgba(77, 163, 255, 0.55);
    opacity: 1;
}


/* *********************************************
   MULTI TIMER
********************************************** */
.multi-timer-list {
    margin-top: 1rem;
    display: grid;
    gap: 0.7rem;
}

.multi-timer-card {
    padding: 0.7rem 0.8rem;
    border-radius: 16px;
    background: var(--bg-alt);
    border: 1px solid rgba(148, 163, 184, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.multi-timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.multi-timer-display {
    font-variant-numeric: tabular-nums;
    font-size: 1.4rem;
}

.multi-timer-controls {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* *********************************************
   REACTION TEST
********************************************** */
.reaction-area {
    margin-top: 1rem;
    border-radius: 18px;
    padding: 2.5rem 1rem;
    text-align: center;
    font-size: 1.2rem;
    user-select: none;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.reaction-area.idle {
    background: rgba(15, 23, 42, 0.96);
}
.reaction-area.wait {
    background: #facc15;
    color: #111827;
}
.reaction-area.go {
    background: #22c55e;
    color: #022c22;
    box-shadow: 0 18px 40px rgba(34, 197, 94, 0.55);
    transform: translateY(-1px);
}
#react-result {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-top: 0.6rem;
    color: var(--accent);
    text-shadow: 0 0 12px rgba(77, 163, 255, 0.45);
    letter-spacing: 0.03em;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#react-result.show {
    opacity: 1;
    transform: scale(1.08);
}

/* *********************************************
   FOOTER
********************************************** */
.site-footer {
    max-width: 960px;
    margin: 0 auto 1.5rem;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--muted);
    opacity: 0.85;
}

/* *********************************************
   MOBILE
********************************************** */
@media (max-width: 720px) {
    .site-header {
        flex-wrap: wrap;
        gap: 0.6rem;
    }
    .main-container {
        padding: 0 0.8rem 1.5rem;
    }
    .tab-panel {
        padding: 1.1rem 1rem 1.3rem;
        border-radius: 20px;
    }
    .timer-display {
        font-size: 2.2rem;
    }
    .site-footer {
        flex-direction: column;
        gap: 0.2rem;
        align-items: flex-start;
    }
}

/* *********************************************
   LIGHT THEME BUTTON FIXES
********************************************** */
body.theme-light .primary-btn {
    background: var(--accent);
    color: #ffffff;
}
body.theme-light .ghost-btn {
    background: var(--btn-bg-light);
    color: var(--btn-text-light);
    border: 1px solid var(--border);
}


/* *********************************************
   CONTACT FORM
********************************************** */

.contact-form {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-form label {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.5rem 0.7rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.9);
    color: var(--fg);
    font-size: 0.9rem;
}

.contact-form textarea {
    resize: vertical;
}
