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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 40px);
}

header {
    margin-bottom: 15px;
    text-align: center;
}

h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 15px;
    font-size: 2em;
    font-weight: 700;
}

.controls {
    display: none; /* 隐藏下拉选择器 */
}

.main-content {
    display: flex;
    gap: 20px;
    flex: 1;
    align-items: flex-start;
}

.country-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.country-sidebar h2 {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.country-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.country-list-item {
    padding: 10px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 0.95em;
    transition: all 0.3s;
    cursor: pointer;
    display: block;
}

.country-list-item:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
}

.country-list-item.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: 600;
}

/* 语言快速切换按钮组 */
.language-switcher {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f7ff;
    border-radius: 10px;
}

.language-switcher-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.lang-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}

.lang-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.lang-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: 600;
}

/* 国家快速链接区域 */
.country-switcher {
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.country-switcher-label {
    font-size: 1em;
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.country-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.country-link {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
    transition: all 0.3s;
    display: inline-block;
}

.country-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.country-link.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: 600;
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.date-navigation button {
    background: #667eea;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-navigation button:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.date-navigation button:active {
    transform: scale(0.95);
}

#current-month-year {
    font-size: 1em;
    font-weight: 600;
    color: #333;
    min-width: 150px;
    text-align: center;
}

.calendar-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.calendar-wrapper {
    margin-bottom: 15px;
    background: white;
    padding: 0;
    border-radius: 0;
}

/* 全年日历样式 */
.year-calendar-section {
    margin-bottom: 40px;
}

.year-calendar-section .section-title {
    font-size: 1.5em;
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.month-calendar {
    background: #fafafa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.month-title {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}

.month-calendar .calendar-table {
    width: 100%;
    font-size: 0.8em;
}

.month-calendar .calendar-table th {
    padding: 6px 2px;
    font-size: 0.85em;
}

.month-calendar .calendar-table td {
    padding: 4px 2px;
    min-height: 40px;
}

.month-calendar .calendar-day {
    min-height: 35px;
    padding: 2px;
}

.month-calendar .day-number {
    font-size: 0.9em;
}

.month-calendar .holiday-name {
    font-size: 0.65em;
    line-height: 1.1;
}

.year-selector {
    font-size: 1.2em;
    font-weight: 600;
    color: #667eea;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.calendar-table thead {
    background: #f5f5f5;
}

.calendar-table th {
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    color: #333;
    border: 1px solid #ddd;
    font-size: 0.9em;
}

.calendar-table td {
    padding: 8px 4px;
    text-align: center;
    border: 1px solid #ddd;
    vertical-align: top;
    width: 14.28%;
    min-height: 60px;
    position: relative;
}

.calendar-day {
    min-height: 50px;
    padding: 4px;
    background: white;
    cursor: default;
    display: block;
    position: relative;
}

.calendar-day.other-month {
    color: #ccc;
    background: #fafafa;
}

.calendar-day.today {
    background: #e3f2fd;
    font-weight: 700;
}

.calendar-day.today .day-number {
    color: #1976d2;
}

.calendar-day.holiday {
    background: #ffebee;
}

.calendar-day.holiday .day-number {
    color: #c62828;
    font-weight: 700;
}

.calendar-day.today.holiday {
    background: #fff3e0;
}

.calendar-day.today.holiday .day-number {
    color: #e65100;
}

.day-number {
    font-size: 1em;
    margin-bottom: 2px;
    font-weight: normal;
    color: #333;
}

.holiday-name {
    font-size: 0.75em;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
    max-width: 100%;
    color: #c62828;
    margin-top: 2px;
    font-weight: 500;
}

/* 周末样式 */
.calendar-table tr td:first-child,
.calendar-table tr td:last-child {
    background: #fafafa;
}

.calendar-table tr td.holiday:first-child,
.calendar-table tr td.holiday:last-child {
    background: #ffebee;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid #ddd;
}

.legend-color.today {
    background: #667eea;
    border-color: #764ba2;
}

.legend-color.holiday {
    background: #ff6b6b;
    border-color: #ff5252;
}

.holiday-list {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.holiday-list h2 {
    margin-bottom: 15px;
    color: #667eea;
}

.holiday-item {
    padding: 10px;
    margin-bottom: 10px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #ff6b6b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.holiday-date {
    font-weight: 600;
    color: #333;
}

.holiday-regions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.region-badge {
    padding: 4px 10px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.5em;
    }

    .main-content {
        flex-direction: column;
    }

    .country-sidebar {
        width: 100%;
        max-height: 200px;
    }

    .calendar-day {
        padding: 3px 2px;
    }

    .day-number {
        font-size: 0.85em;
    }

    .holiday-name {
        font-size: 0.6em;
    }

    .holiday-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* 全年日历响应式 */
    .months-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .month-calendar {
        padding: 10px;
    }

    .month-calendar .calendar-table {
        font-size: 0.7em;
    }

    .month-calendar .calendar-table th {
        padding: 4px 1px;
        font-size: 0.75em;
    }

    .month-calendar .calendar-table td {
        padding: 2px 1px;
        min-height: 30px;
    }

    .month-calendar .calendar-day {
        min-height: 28px;
        padding: 1px;
    }

    .month-calendar .day-number {
        font-size: 0.8em;
    }

    .month-calendar .holiday-name {
        font-size: 0.55em;
    }
}

@media (max-width: 480px) {
    .months-grid {
        grid-template-columns: 1fr;
    }
}

