:root {
    --primary: #E63946;
    --secondary: #457B9D;
    --bg: #F8FAFC;
    --text: #1D3557;
    --card-bg: #FFFFFF;
    --accent: #A8DADC;
    --hero-bg: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --footer-bg: #FFFFFF;
    --timer-bg: rgba(255, 255, 255, 0.05);
}

[data-theme='dark'] {
    --bg: #0F172A;
    --text: #F1F5F9;
    --card-bg: #1E293B;
    --hero-bg: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --footer-bg: #0F172A;
    --timer-bg: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    padding: 1.5rem 5%;
    position: absolute;
    width: 100%;
    z-index: 10;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text);
}

/* Theme Toggle Button */
.theme-btn {
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

[data-theme='dark'] .theme-btn {
    border-color: rgba(255,255,255,0.1);
}

.sun-icon { display: block; }
.moon-icon { display: none; }

[data-theme='dark'] .sun-icon { display: none; }
[data-theme='dark'] .moon-icon { display: block; }

section {
    padding: 100px 5%;
    text-align: center;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--hero-bg);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--primary);
}

.hero p {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.btn-primary {
    padding: 1rem 2.5rem;
    background-color: var(--primary);
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(230, 57, 70, 0.2);
}

/* Benefits Section */
.benefits {
    background: var(--bg);
}

.benefits h2 {
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.benefit-card {
    padding: 3rem;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

[data-theme='dark'] .benefit-card {
    border-color: rgba(255,255,255,0.05);
}

.benefit-card:hover {
    transform: translateY(-10px);
}

.benefit-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* Timer Section */
.timer-container {
    background: #1D3557; /* 타이머 섹션은 가독성을 위해 어두운 배경 유지 */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

[data-theme='dark'] .timer-container {
    background: #020617;
}

.timer-box {
    background: var(--timer-bg);
    padding: 4rem;
    border-radius: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 500px;
}

.timer-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    justify-content: center;
}

.tab-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

.tab-btn.active {
    color: white;
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
}

.display {
    font-size: 8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    font-variant-numeric: tabular-nums;
    color: white;
}

.controls {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

button[id$="btn"] {
    padding: 1rem 3rem;
    border-radius: 15px;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
}

#start-btn {
    background: white;
    color: #1D3557;
}

#start-btn.running {
    background: var(--primary);
    color: white;
}

#reset-btn {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

footer {
    padding: 3rem;
    text-align: center;
    color: #94a3b8;
    background: var(--footer-bg);
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .display { font-size: 5rem; }
}
