/* File: timer.css */

/* --- THEME DEFINITIONS --- */
body.dark-theme {
    --bg-color: #1a1d21;
    --surface-color: #2c2f33;
    --primary-text: #e0e0e0;
    --secondary-text: #a9a9a9;
    --border-color: #4f545c;
    --accent-color: #3b82f6;
}
body.light-theme {
    --bg-color: #f1f5f9;
    --surface-color: #ffffff;
    --primary-text: #1e293b;
    --secondary-text: #64748b;
    --border-color: #e2e8f0;
    --accent-color: #2563eb;
}

/* --- Base Styling --- */
body {
    margin: 0;
    font-family: 'Kanit', sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

/* --- Theme Toggle Button --- */
#theme-toggle {
    position: fixed; top: 20px; right: 20px;
    background: var(--surface-color); border: 1px solid var(--border-color);
    color: var(--primary-text); width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; font-size: 18px; display: flex; justify-content: center;
    align-items: center; z-index: 1000; transition: all 0.3s;
}
#theme-toggle:hover { transform: scale(1.1); }

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 56rem; /* 896px */
    margin: 0 auto;
}
.main-card {
    background-color: var(--surface-color);
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    padding: 2rem;
    border: 1px solid var(--border-color);
}
body.dark-theme .main-card { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2); }

/* --- Header --- */
.page-header {
    text-align: center;
    margin-bottom: 2rem; /* Reduced margin to bring it closer to total days */
}
.page-header h1 {
    font-family: 'Inter', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: -0.025em;
}
.page-header p {
    color: var(--secondary-text);
    margin-top: 0.5rem;
}

/* --- NEW: Total Days Display --- */
.total-days-display {
    text-align: center;
    font-size: 1.25rem;
    color: var(--secondary-text);
    margin-bottom: 2.5rem;
}
.total-days-display span {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-color);
    margin: 0 0.5rem;
}

/* --- Timer Display --- */
.timer-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (min-width: 768px) {
    .timer-display {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.5rem;
    }
}

.time-unit {
    background-color: var(--bg-color);
    padding: 1rem 0.5rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 1px solid var(--border-color);
}
.time-unit span {
    display: block;
}
.time-unit span:first-child {
    font-family: 'Inter', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--accent-color);
}
.time-unit .label {
    font-size: 0.875rem;
    color: var(--secondary-text);
    margin-top: 0.5rem;
}
@media (min-width: 768px) {
    .time-unit span:first-child {
        font-size: 3.75rem;
    }
    .time-unit .label {
        font-size: 1rem;
    }
}

/* --- Footer Link --- */
.footer-link {
    text-align: center;
    margin-top: 2rem;
}
.footer-link a {
    color: var(--secondary-text);
    text-decoration: none;
    font-size: 0.875rem;
}
.footer-link a:hover {
    text-decoration: underline;
}