/* 基本样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 95%;
    max-width: 1200px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

header {
    background-color: #FF8B93;
    color: white;
    padding: 20px 30px;
    text-align: center;
    position: relative; /* 为导出按钮的绝对定位提供父容器 */
}

/* --- *** 导出按钮新样式 START *** --- */
#export-btn, #stats-btn {
    position: absolute;
    top: 24px;
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: 500;
    color: #FF8B93;
    background-color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#export-btn {
    right: 150px;
}

#stats-btn {
    right: 30px;
}

#export-btn:hover, #stats-btn:hover {
    background-color: #f1f3f5;
    transform: translateY(-1px);
}

#export-btn:disabled, #stats-btn:disabled {
    background-color: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
/* --- *** 导出按钮新样式 END *** --- */


header h1 {
    margin: 0;
    font-size: 2em;
}

#month-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

#month-navigation button {
    background: none;
    border: 2px solid white;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: background-color 0.3s, color 0.3s;
}

#month-navigation button:hover {
    background-color: white;
    color: #FF8B93;
}

#current-month {
    font-size: 1.5em;
    font-weight: 500;
}

/* 筛选器样式 */
#calendar-filters {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

#calendar-filters label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1em;
}

#calendar-filters input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
}

.checkbox-label {
    padding: 5px 12px;
    border-radius: 15px;
    color: white;
    font-weight: bold;
}

/* 成员颜色 */
.checkbox-label.yuzu {
    background-color: #F57C00; /* 橙色 */
}

.checkbox-label.luzao {
    background-color: #388E3C; /* 绿色 */
}


/* 日历样式 */
#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e0e0e0;
    padding: 10px;
}

.day-header, .day {
    padding: 10px;
    background-color: #fff;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.day-header {
    font-weight: bold;
    text-align: center;
    background-color: #f9f9f9;
    min-height: auto;
}

.date-number {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.day.other-month .date-number {
    color: #ccc;
}

.day.today .date-number {
    background-color: #FF6D75;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

/* 直播事件样式 */
.event {
    border-radius: 4px;
    padding: 8px;
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.9em;
}

/* 柚恩 - 橙色系 */
.event.event-yuzu {
    background-color: #FFF3E0;
    border-left: 5px solid #F57C00;
}
.event.event-yuzu .event-title {
    color: #E65100;
}

/* 露早 - 绿色系 */
.event.event-luzao {
    background-color: #E8F5E9;
    border-left: 5px solid #388E3C;
}
.event.event-luzao .event-title {
    color: #1B5E20;
}


.event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.event-title {
    font-weight: bold;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.event-details span {
    font-weight: bold;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-top: 4px;
}

.format-3d { background-color: #ffcdd2; color: #c62828; }
.format-2d { background-color: #c5cae9; color: #283593; }
.format-电台 { background-color: #b2dfdb; color: #00695c; }
.format-联动 { background-color: #fff9c4; color: #f57f17; }
.format-双播 { background-color: #d1c4e9; color: #4527a0; }
.format-其它 { background-color: #e0e0e0; color: #424242; }

.content-才艺 { background-color: #f8bbd0; color: #ad1457; }
.content-杂谈 { background-color: #bbdefb; color: #0d47a1; }
.content-游戏 { background-color: #c8e6c9; color: #1b5e20; }
.content-综艺 { background-color: #ffecb3; color: #ff6f00; }
.content-活动 { background-color: #ffcdd2; color: #c62828; }
.content-观影 { background-color: #d1c4e9; color: #4527a0; }
.content-特殊 { background-color: #b2ebf2; color: #006064; }
.content-投稿 { background-color: #dcedc8; color: #33691e; }
.content-歌回 { background-color: #fce4ec; color: #880e4f; }
.content-其它 { background-color: #e0e0e0; color: #424242; }

/* 加载指示器 */
#loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    z-index: 10;
}

.hidden {
    display: none;
}

/* 数据统计弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 1400px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #FF8B93 0%, #FFA5AB 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.stats-filters {
    background-color: #f8f9fa;
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group label {
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.stats-filters input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.stats-filters select,
.stats-filters input[type="date"] {
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95em;
    background-color: white;
    transition: all 0.2s;
}

.stats-filters select:focus,
.stats-filters input[type="date"]:focus {
    outline: none;
    border-color: #FF8B93;
    box-shadow: 0 0 0 3px rgba(255, 139, 147, 0.1);
}

.apply-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #FF8B93 0%, #FFA5AB 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(255, 139, 147, 0.3);
    position: relative;
    overflow: hidden;
}

.apply-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.apply-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 139, 147, 0.5);
}

.apply-btn:hover::before {
    width: 300px;
    height: 300px;
}

.apply-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 139, 147, 0.4);
}

.stats-content {
    padding: 30px;
    max-height: calc(90vh - 250px);
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
}

.chart-wide {
    grid-colum: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 139, 147, 0.1);
    position: relative;
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF8B93, #FFA5AB, #FFB8C3);
    opacity: 0;
    transition: opacity 0.4s;
}

.chart-container:hover {
    box-shadow: 0 8px 30px rgba(255, 139, 147, 0.15);
    transform: translateY(-4px);
    border-color: rgba(255, 139, 147, 0.3);
}

.chart-container:hover::before {
    opacity: 1;
}

.chart-container h3 {
    margin: 0 0 25px 0;
    font-size: 1.4em;
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
}

.chart-container canvas {
    max-height: 350px;
}

.chart-wide canvas {
    max-height: 40nter;
}

.chart-container canvas {
    max-height: 350px;
}

/* 响应式设计 */
/* 滚动条美化 */
.stats-content::-webkit-scrollbar {
    width: 10px;
}

.stats-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.stats-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF8B93, #FFA5AB);
    border-radius: 10px;
    transition: background 0.3s;
}

.stats-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FF7A82, #FF9AA2);
}

/* 图表加载动画 */
@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.chart-container canvas {
    animation: chartFadeIn 0.5s ease-out;
}

@media (max-width: 1200px) {
    .stats-content {
        grid-template-columns: 1fr;
    }
    
    .chart-wide {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .stats-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #export-btn {
        right: 30px;
        top: 70px;
    }
    
    #stats-btn {
        right: 30px;
        top: 110px;
    }
}