* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.year-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.year-btn {
    padding: 10px 20px;
    background: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.year-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.year-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.holidays-grid {
    display: grid;
    gap: 20px;
}

.holiday-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.holiday-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.holiday-name {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.holiday-dates {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.date-item {
    padding: 12px;
    background: #f8f9ff;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-item .date {
    font-weight: 600;
    color: #333;
}

.date-item .day {
    color: #666;
}

.holiday-remark {
    padding: 12px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    color: #856404;
    font-size: 0.95rem;
}

.no-data {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    padding: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.month-calendar {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out;
}

.month-title {
    text-align: center;
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 15px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #333;
    position: relative;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    min-height: 45px;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.calendar-day.empty {
    background: transparent;
    border: none;
}

.calendar-day.empty:hover {
    transform: none;
    box-shadow: none;
}

.calendar-day.weekend {
    background: #f5f5f5;
    color: #666;
}

.calendar-day.weekend:hover {
    background: #eeeeee;
}

.calendar-day.holiday {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    font-weight: 600;
    cursor: default;
    border: none;
}

.calendar-day.holiday:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.calendar-day.holiday span {
    color: white !important;
}

.calendar-day .holiday-name {
    font-size: 0.7rem;
    margin-top: 2px;
    text-align: center;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: white !important;
}

.legend {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.legend-title {
    font-size: 1.2rem;
    color: #667eea;
    margin-bottom: 15px;
    font-weight: 600;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    margin-right: 20px;
    margin-bottom: 10px;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    margin-right: 8px;
}

.legend-color.holiday {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.legend-text {
    color: #666;
    font-size: 0.95rem;
}

.holiday-details {
    margin-top: 20px;
    background: #f8f9ff;
    border-radius: 8px;
    padding: 15px;
}

.holiday-details h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1rem;
}

.holiday-details p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 5px 0;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .year-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .calendar-day {
        font-size: 0.85rem;
        min-height: 40px;
    }

    .calendar-day .holiday-name {
        font-size: 0.65rem;
    }

    .friendship-links {
        padding: 20px;
    }

    .friendship-links h3 {
        font-size: 1.2rem;
    }

    .friendship-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .friendship-link-item {
        padding: 10px;
    }

    .friendship-link-item a {
        font-size: 0.85rem;
    }
}

/* 友情链接样式 */
.friendship-links {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out;
}

.friendship-links h3 {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.friendship-links-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.friendship-link-item {
    padding: 12px;
    background: #f8f9ff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.friendship-link-item:hover {
    background: #e6e8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.friendship-link-item a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    text-align: center;
    transition: color 0.3s ease;
}

.friendship-link-item a:hover {
    color: #764ba2;
    font-weight: 600;
}

