/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.3);
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 控制面板样式 */
.controls {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(78, 205, 196, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.controls select, .controls button {
    padding: 12px 20px;
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    color: #333;
    cursor: pointer;
    transition: none;
}

.controls select:focus, .controls button:focus {
    outline: none;
    border-color: #44a08d;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

.control-select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    transition: none;
}

.control-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 主内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

/* 侧边栏样式 */
.sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.sidebar h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar h3 i {
    color: #667eea;
}

.filter-section, .legend-section, .stats-section {
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #4a5568;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 10px;
}

.legend-color.holiday {
    background: #48bb78;
}

.legend-color.event {
    background: #f6e05e;
}

.legend-color.religious {
    background: #9f7aea;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.stat-label {
    color: #718096;
}

.stat-value {
    color: #4a5568;
    font-weight: 600;
}

/* 日历容器样式 */
.calendar-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 12px 40px rgba(78, 205, 196, 0.2);
    margin-bottom: 30px;
}

/* 日历头部 */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2f8f5;
}

.calendar-header h2 {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 600;
}

.nav-btn {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.nav-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.calendar-grid {
    width: 100%;
}

/* 日历星期标题 */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.weekday {
    text-align: center;
    font-weight: 600;
    color: #4ecdc4;
    padding: 12px;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 8px;
    font-size: 14px;
}

/* 日历日期网格 */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    min-height: 120px;
    padding: 8px;
    background: #f7fafc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.calendar-day:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: #4ecdc4;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.2);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid #5a67d8;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.calendar-day.today .day-number {
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.calendar-day.has-events {
    border: 2px solid #667eea;
}

.day-number {
    font-weight: 600;
    margin-bottom: 5px;
}

.day-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-dot {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    margin-bottom: 2px;
}

.event-dot.holiday {
    background: #48bb78;
}

.event-dot.event {
    background: #f6e05e;
}

.event-dot.political {
    background: #f6e05e;
}

.event-dot.technology {
    background: #f6e05e;
}

.event-dot.environmental {
    background: #f6e05e;
}

.event-dot.religious {
    background: #9f7aea;
}

.event-text {
    font-size: 10px;
    color: #4a5568;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
/* 事件条目样式 */
.event-item {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    color: white;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 2px;
}

.event-item .country-flag {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    padding: 1px 3px;
    font-size: 9px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.event-item .event-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}   cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-item:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.event-item.holiday {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.event-item.public {
    background: linear-gradient(135deg, #38b2ac, #319795);
}

.event-item.religious {
    background: linear-gradient(135deg, #81c784, #66bb6a);
}

.event-item.political {
    background: linear-gradient(135deg, #f6e05e, #ecc94b);
}

.event-item.technology {
    background: linear-gradient(135deg, #f6e05e, #ecc94b);
}

.event-item.environmental {
    background: linear-gradient(135deg, #f6e05e, #ecc94b);
}

.event-item.event {
    background: linear-gradient(135deg, #f6e05e, #ecc94b);
}

.more-events {
    font-size: 10px;
    color: #92400e;
    text-align: center;
    padding: 2px;
    font-style: italic;
    background: rgba(246, 224, 94, 0.1);
    border-radius: 3px;
}

/* 保留原有的事件点样式作为备用 */

/* 事件详情弹窗 */
.event-details {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.event-details-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(78, 205, 196, 0.3);
}

.event-details-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e2f8f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-details-header h3 {
    color: #4ecdc4;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #718096;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(78, 205, 196, 0.1);
    color: #4ecdc4;
}

.event-details-body {
    padding: 25px;
}

.event-item {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(246, 224, 94, 0.05);
    border-radius: 12px;
    border-left: 4px solid #f6e05e;
}

.event-item h4 {
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 1rem;
}

.event-item p {
    color: #718096;
    font-size: 14px;
    line-height: 1.5;
}

.event-country {
    margin: 8px 0;
    padding: 4px 8px;
    background: #e8f4fd;
    border-radius: 4px;
    font-size: 0.9em;
    color: #2980b9;
    display: inline-block;
}

.event-country i {
    margin-right: 5px;
}

.event-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
}

.event-type.holiday {
    background: #c6f6d5;
    color: #22543d;
}

.event-type.event {
    background: #fef3c7;
    color: #92400e;
}

.event-type.political {
    background: #fef3c7;
    color: #92400e;
}

.event-type.technology {
    background: #fef3c7;
    color: #92400e;
}

.event-type.environmental {
    background: #fef3c7;
    color: #92400e;
}

.event-type.religious {
    background: #e9d8fd;
    color: #553c9a;
}

/* 统计面板样式 */
.stats {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(78, 205, 196, 0.15);
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-item {
    flex: 1;
}

.stat-item h3 {
    color: #4ecdc4;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-item p {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading.show {
    display: block;
}

.loading-spinner {
    text-align: center;
    color: #4a5568;
}

.loading-spinner i {
    font-size: 3rem;
    color: #4ecdc4;
    margin-bottom: 15px;
}

.loading-spinner p {
    font-size: 1.1rem;
}

.spinner {
    border: 4px solid rgba(78, 205, 196, 0.2);
    border-top: 4px solid #4ecdc4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .calendar-container {
        order: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .controls {
        justify-content: center;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 8px;
    }
    
    .sidebar {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
        width: 100%;
    }
    
    .control-select, .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 5px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .event-text {
        font-size: 8px;
    }
}