:root {
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-color: #343a40;
    --muted-text-color: #6c757d;
    --header-text-color: #212529;
    --accent-color: #e7f1ff;
    --accent-text-color: #0056b3;
    --border-color: #dee2e6;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 0.75rem;
    --font-family: 'Noto Sans KR', sans-serif;
    --primary-color: #007bff;
    --saturday-color: #0056b3;
    --sunday-holiday-color: #d93025;
}

html[data-theme="dark"] {
    --background-color: #121212;
    --card-background: #1e1e1e;
    --text-color: #e0e0e0;
    --muted-text-color: #9e9e9e;
    --header-text-color: #f5f5f5;
    --accent-color: #1c2a3e;
    --accent-text-color: #90caff;
    --border-color: #424242;
    --primary-color: #3a96ff;
    --saturday-color: #90caff;
    --sunday-holiday-color: #f28b82;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Navigation */
.header {
    background-color: var(--card-background);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo a {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--header-text-color);
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    color: var(--muted-text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary-color);
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    gap: 0.5rem;
}

.theme-switcher button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--muted-text-color);
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s, color 0.2s;
}

.theme-switcher button:hover {
    background-color: var(--accent-color);
    color: var(--accent-text-color);
}

/* Hero Section */
.hero-section {
    background-color: var(--accent-color);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
    transition: background-color 0.3s;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--header-text-color);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--muted-text-color);
    max-width: 600px;
    margin: 0 auto;
}

/* App Container */
.app-container {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 3rem;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    text-align: center;
}

.current-year {
    font-size: 2rem;
    font-weight: 700;
    color: var(--header-text-color);
}

.selected-weeks {
    font-size: 1rem;
    color: var(--muted-text-color);
    margin-top: 0.5rem;
    min-height: 1.5rem;
}

.year-nav-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
    color: var(--muted-text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.year-nav-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

#calendar-grid-container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Content Sections */
.content-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.content-section {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--header-text-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.section-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--header-text-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.section-text {
    font-size: 1rem;
    color: var(--text-color);
}
.section-text + .section-text {
    margin-top: 1rem;
}

.list {
    padding-left: 1.5rem;
}

.list-item {
    margin-bottom: 0.5rem;
}

.tips-list {
    list-style-position: inside;
    padding-left: 0;
}

.tip-item {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.tip-item strong {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    margin-top: auto;
    color: var(--muted-text-color);
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer .nav {
    justify-content: flex-end;
}

/* Responsive Design */
@media (min-width: 768px) {
    .content-sections {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 1rem;
    }
    .header {
        position: sticky;
    }
    .header .container {
        flex-direction: row;
        height: 4.5rem;
        padding: 0 1rem;
    }
    .header-left {
        gap: 1rem;
    }
    .logo a {
        font-size: 1.2rem;
    }
    .nav {
        display: none; /* Hide nav links, can be replaced with a hamburger menu */
    }

    .hero-title {
        font-size: 2rem;
    }
    .app-container {
        padding: 1rem;
    }
    .app-header {
        flex-direction: row; /* Revert to row for smaller app header */
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .current-year {
        font-size: 1.5rem;
    }

    .year-nav-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.2rem;
    }
    .content-section, .about-section {
        padding: 1.5rem;
    }
    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer .nav {
        justify-content: center;
        margin-top: 1rem;
    }
}
