/* 日历组件样式 */
.calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}

.calendar-modal.show {
    display: flex;
}

.calendar-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.calendar-header {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.calendar-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.calendar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-nav-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: #e0e0e0;
}

.calendar-month {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

body.dark-theme .calendar-month {
    color: #FFFFFF;
}

body.dark-theme .calendar-nav-btn {
    background: #3A3A40;
    color: #E8E8E8;
}

body.dark-theme .calendar-nav-btn:hover {
    background: #4A4A50;
    color: #d4af37;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    color: #666;
    padding: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    position: relative;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day:not(.empty):hover {
    background: #f0f0f0;
}

.calendar-day.has-sessions {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
}

.calendar-day.has-sessions:hover {
    background: #bbdefb;
}

.calendar-day.today {
    background: #07c160;
    color: white;
}

.calendar-day.today.has-sessions {
    background: #05a050;
}

.calendar-session-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}



.calendar-stats {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.calendar-stats-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.calendar-stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 5px;
}

.calendar-stat-label {
    color: #666;
}

.calendar-stat-value {
    color: #333;
    font-weight: 600;
}

/* 暗色主题 */
body.dark-theme .calendar-content {
    background: #25252B;
    color: #E8E8E8;
}

body.dark-theme .calendar-header {
    background: #25252B;
    border-bottom-color: #3A3A40;
}

body.dark-theme .calendar-title {
    color: #E8E8E8;
}

body.dark-theme .calendar-close {
    color: #B8B8B8;
}

body.dark-theme .calendar-day:not(.empty):hover {
    background: #25252B;
}

body.dark-theme .calendar-day.has-sessions {
    background: #3A3A40;
    color: #d4af37;
}

body.dark-theme .calendar-day.has-sessions:hover {
    background: #4A4A50;
    color: #d4af37;
}

body.dark-theme .calendar-day.today {
    background: #d4af37;
    color: #000000;
}

body.dark-theme .calendar-sessions {
    border-top-color: #3A3A40;
    background: #1A1A1F;
}

body.dark-theme .calendar-session-item {
    border-color: #3A3A40;
    background: #1A1A1F;
}

body.dark-theme .calendar-session-item:hover {
    background: #3A3A40;
    border-color: #d4af37;
}

body.dark-theme .calendar-stats {
    background: #1A1A1F;
    color: #E8E8E8;
}

body.dark-theme .calendar-stats-title {
    color: #E8E8E8;
}

body.dark-theme .calendar-stat-item {
    color: #E8E8E8;
}

body.dark-theme .calendar-stat-label {
    color: #B8B8B8;
}

body.dark-theme .calendar-stat-value {
    color: #FFFFFF;
    font-weight: 600;
}

body.dark-theme .calendar-session-category {
    background: #25252B;
    color: #d4af37;
}

/* 重要标记样式 */
.calendar-day.important {
    border: 2px solid #ff6b35 !important;
    position: relative;
}

.calendar-important-marker {
    position: absolute;
    top: 0;
    left: 0;
    background: #ff6b35;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.calendar-day.important.has-sessions {
    border-color: #ff6b35 !important;
    background: #fff3e0 !important;
    color: #e65100 !important;
}

.calendar-day.important.today {
    border-color: #ff6b35 !important;
    background: #ff9800 !important;
    color: white !important;
}

/* 暗色主题重要标记样式 */
body.dark-theme .calendar-day.important {
    border-color: #ff6b35 !important;
}



body.dark-theme .calendar-day.important.has-sessions {
    border-color: #ff6b35 !important;
    background: #2ea18e !important;
    color: #ffa726 !important;
}

body.dark-theme .calendar-day.important.today {
    border-color: #ff6b35 !important;
    background: #e65100 !important;
    color: white !important;
}

/* 移动端样式调整 */
@media (max-width: 768px) {
    .calendar-session-count {
        top: -2px;
        right: -2px;
        width: 14px;
        height: 14px;
        font-size: 9px;
    }
    
    .calendar-important-marker {
        top: -2px;
        left: -2px;
        width: 12px;
        height: 12px;
        font-size: 8px;
    }
    
    /* 已标记日期的会话数容器 - 确保在右上角 */
    .calendar-day.important .calendar-session-count {
        top: -2px;
        right: -2px;
        width: 14px;
        height: 14px;
        font-size: 9px;
    }
}