/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f5f5f5;
    --holiday-color: #d32f2f;
    --weekend-color: #ffebee;
    --accent-color: #e53935;
    --text-color: #333;
    --border-color: #ddd;
    --max-width: 1200px;
}

body {
    font-family: 'PingFang TC', 'Microsoft JhengHei', 'STHeiti', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #ffffff;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Navigation */
.main-nav {
    background-color: #fff;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.month-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 1rem 0;
    gap: 0;
}

.month-nav li {
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.month-nav a {
    display: block;
    padding: 0.8rem 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 0 2px;
}

.month-nav a:hover,
.month-nav a.active {
    background-color: var(--holiday-color);
    color: white;
}

/* Main Content */
main {
    padding: 2rem 0;
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-left: 4px solid var(--holiday-color);
    padding-left: 1rem;
}

/* Year Overview */
.year-overview {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.holidays-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.holiday-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.holiday-item .date {
    font-weight: bold;
    color: var(--holiday-color);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.holiday-item .holiday-name {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.holiday-item .eng {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* Calendar Grid */
.calendar-months {
    margin-bottom: 3rem;
}

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

.calendar-month {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.calendar-month h3 {
    text-align: center;
    color: var(--holiday-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-table th {
    padding: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.calendar-table td {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    min-height: 40px;
    vertical-align: top;
}

.calendar-table .day-number {
    font-weight: bold;
    font-size: 1rem;
}

.calendar-table .weekend {
    background-color: var(--weekend-color);
}

.calendar-table .holiday {
    background-color: var(--holiday-color);
    color: white;
    font-weight: bold;
    border-radius: 4px;
}

.calendar-table .today {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    border-radius: 4px;
}

/* SEO Content */
.seo-content {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.seo-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.copyright {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Monthly Pages */
.month-calendar {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.month-calendar table {
    width: 100%;
    max-width: 800px;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.month-calendar th {
    background-color: var(--holiday-color);
    color: white;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.month-calendar td {
    padding: 0.8rem 0.5rem;
    text-align: center;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    min-height: 50px;
    vertical-align: top;
    height: 80px;
}

.month-calendar .day-number {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.month-calendar .lunar-date {
    font-size: 0.75rem;
    color: #999;
    display: block;
    margin-top: 0.3rem;
}

/* Navigation Controls */
.nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

.nav-controls a {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--holiday-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.nav-controls a:hover {
    background-color: #b71c1c;
}

.nav-controls .current-month {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .month-nav {
        flex-direction: column;
    }

    .month-nav li {
        width: 100%;
    }

    .month-nav a {
        padding: 1rem;
        margin: 2px 0;
    }

    .holidays-summary {
        grid-template-columns: 1fr;
    }

    .calendar-month {
        padding: 1rem;
    }

    .calendar-table th,
    .calendar-table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.8rem;
    }

    .month-calendar th,
    .month-calendar td {
        padding: 0.8rem 0.5rem;
    }

    .month-calendar .lunar-date {
        font-size: 0.7rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .nav-controls {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .seo-content {
        padding: 1.5rem;
    }

    .seo-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }

    .calendar-table th,
    .calendar-table td {
        padding: 0.3rem 0.2rem;
        font-size: 0.75rem;
    }

    .month-calendar th,
    .month-calendar td {
        padding: 0.6rem 0.3rem;
    }
}

/* Print Styles */
@media print {
    .main-nav,
    .nav-controls,
    footer {
        display: none;
    }

    body {
        background: white;
    }
}

