/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 20px;
}

/* 直播日历容器样式 */
.livestream-calendar-container {
    max-width: 1200px !important;
    width: 1000px !important;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    position: relative;
}

/* 标题部分 */
.header {
    margin-bottom: 20px;
    text-align: center;
}

.header h1 {
    font-size: 2.1rem;
    color: #2c3e50;
    margin: 0;
    font-weight: bold;
}

.header p {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 5px 0 0;
}

/* 日历头部（January & 2026） */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    height: 80px;
}

.calendar-header .left {
    display: flex;
    justify-content: space-between;
    align-items: center ;
    /* background-color: #000; */
    background: linear-gradient(to right, #000, transparent);
    color: white;
    font-size: 2rem;
    font-weight: bold;
    padding: 12px 15px;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    position: relative;
    z-index: 1;
    width: 40vw;
    text-align: left;
}


.calendar-header .time-label {
    /* background-color: #000; */
    color: white;
    font-size: 0.8rem;
    padding: 5px 10px;
    position: relative;
    z-index: 1;
    width: 150px;
    text-align: left;
    margin-left: -10px;
}

.calendar-header .year {
    font-size: 4rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
}

.calendar-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, #000, transparent);
    z-index: 0;
}

/* 日历表格 */
.calendar-grid {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed; /* 固定表格布局，确保每列等宽 */
}

.calendar-grid th {
    background-color: #3498db;
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
    width: 14.2857%; /* 精确的7列宽度 */
    box-sizing: border-box;
}

.calendar-grid th.weekend {
    background-color: #e74c3c;
}

.calendar-grid td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
    height: 100px;
    vertical-align: middle;
    width: 14.2857%; /* 与表头保持一致 */
    box-sizing: border-box;
    position: relative;
    transition: background-color 0.2s ease;
}

.calendar-grid td:hover {
    background-color: #f0f8ff;
}

.calendar-grid tr:nth-child(even) {
    background-color: #f9f9f9;
}

.calendar-grid tr:nth-child(odd) {
    background-color: white;
}

.calendar-grid .weekend {
    background-color: #ffebee;
}

.calendar-grid .date {
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.calendar-grid .date:hover {
    color: #0073e6;
}

.calendar-grid .live {
    background-color: #f39c12;
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 12px;
    margin-top: 4px;
    display: inline-block;
    width: fit-content;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* 按钮 */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    position: relative;
    overflow: hidden;
    border: none;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-icon {
    margin-right: 8px;
    font-size: 1.2rem;
    display: inline-block;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.modal-header h2 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.6rem;
    font-weight: 600;
}

.event-date {
    margin: 0;
    color: #6c757d;
    font-size: 1rem;
}

.modal-body {
    padding: 25px;
}

.event-time {
    font-weight: 600;
    color: #007bff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    background-color: #e3f2fd;
    padding: 10px 15px;
    border-radius: 6px;
    display: inline-block;
}

.event-description {
    color: #495057;
    line-height: 1.7;
    font-size: 1rem;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    text-align: right;
    background-color: #f8f9fa;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.modal-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close:hover,
.close:focus {
    color: #000;
    background-color: #f0f0f0;
    transform: rotate(90deg);
}

/* 日期提示样式 */
.date-tooltip {
    position: absolute;
    background: #343a40;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    z-index: 10001;
    display: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.date-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #343a40 transparent transparent transparent;
}

/* 错误提示样式 */
.calendar-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #f5c6cb;
    animation: errorSlideDown 0.3s ease-out;
}

@keyframes errorSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    animation: spin 1s linear infinite;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .livestream-calendar-container {
        max-width: 1200px !important;
        width: 95% !important;
        padding: 15px;
    }
    
    .calendar-header {
        flex-direction: column;
        height: auto;
        gap: 10px;
    }
    
    .calendar-header .month,
    .calendar-header .time-label {
        width: 100%;
        text-align: center;
        margin-left: 0;
    }
    
    .calendar-header .month {
        border-radius: 8px;
    }
    
    .calendar-header .year {
        font-size: 2.5rem;
    }
    
    .calendar-grid td {
        padding: 8px;
        height: 50px;
        font-size: 1rem;
    }
    
    .calendar-grid th {
        font-size: 0.8rem;
        padding: 8px;
    }
    
    .btn {
        width: 100%;
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .livestream-calendar-container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .calendar-header .month {
        font-size: 1.5rem;
    }
    
    .calendar-header .year {
        font-size: 2rem;
    }
    
    .calendar-grid td {
        padding: 6px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .calendar-grid th {
        font-size: 0.7rem;
        padding: 6px;
    }
    
    .calendar-grid .live {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
}