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

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.site-header {
    background-color: #337ab7;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#logo {
    text-align: center;
}

#logo img {
    max-width: 200px;
    height: auto;
}

/* 主内容区域 */
.main-content {
    padding: 30px 0;
}

/* 日历部分 */
.calendar-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 30px;
}

/* 日历日期头部 */
#dateHeader {
    text-align: center;
    margin-bottom: 20px;
}

#gz {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* 日历控制按钮 */
#panel {
    text-align: center;
    margin-bottom: 20px;
}

.calendar-btn {
    background-color: #337ab7;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 14px;
}

.calendar-btn:hover {
    background-color: #286090;
    transform: translateY(-2px);
}

.calendar-btn:active {
    transform: translateY(0);
}

.today-btn {
    background-color: #5cb85c;
}

.today-btn:hover {
    background-color: #4cae4c;
}

/* 年份月份选择器 */
#combox {
    text-align: center;
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

#sy, #sm {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 0 5px;
    font-size: 14px;
    cursor: pointer;
}

/* 日历表格 */
#calendar {
    width: 100%;
    overflow-x: auto;
}

#calendarhead {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

#calendarhead tr td {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    color: #666;
    border-bottom: 2px solid #337ab7;
}

/* 日历单元格 */
#calendar table {
    width: 100%;
    border-collapse: collapse;
}

#calendar table td {
    padding: 15px 10px;
    text-align: center;
    border: 1px solid #eee;
    min-width: 80px;
    height: 80px;
    transition: background-color 0.2s ease;
}

/* 今天日期的明显标识 */
#calendar table td[style*="backgroundImage"],
#calendar table td.today-highlight {
    background-color: #4a90e2 !important;
    color: white !important;
    font-weight: bold !important;
    border: 2px solid #357abd !important;
    font-size: 18px;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    position: relative;
    z-index: 1;
}

#calendar table td:hover {
    background-color: #f0f7ff;
}

/* 日期查询工具 */
.date-query-tool {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: center;
}

.date-query-tool h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.query-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.query-select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-size: 14px;
    min-width: 100px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.query-select:focus {
    outline: none;
    border-color: #337ab7;
    box-shadow: 0 0 0 2px rgba(51, 122, 183, 0.2);
}

.query-btn {
    padding: 10px 20px;
    background-color: #337ab7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.query-btn:hover {
    background-color: #286090;
    transform: translateY(-2px);
}

.query-btn:active {
    transform: translateY(0);
}

/* 详情页面样式 */
.detail-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 30px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.date-section {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.date-header {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.date-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-align: center;
    display: block;
    width: 100%;
    margin: 0 auto;
    clear: both;
}

/* 确保动态加载的日期信息也居中 */
#gz {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-align: center;
    display: block;
    width: 100%;
    margin: 0 auto;
    clear: both;
    white-space: normal;
}

/* 针对API内容中的日期信息进行样式优化 */
.api-content-container {
    width: 100%;
    text-align: center;
}

#api-content {
    width: 100%;
    text-align: center;
}

/* 彻底删除列表项的小黑点标记 */
.api-content-container ul,
#api-content ul {
    list-style-type: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.api-content-container li,
#api-content li {
    padding-left: 0 !important;
    margin-bottom: 5px;
    text-align: center;
}

/* 确保没有任何伪元素生成的标记 */
.api-content-container li::before,
#api-content li::before {
    display: none !important;
    content: none !important;
}

.panel-section {
    text-align: center;
    margin-bottom: 20px;
}

.back-btn {
    background-color: #337ab7;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
    min-width: 100px;
    text-align: center;
    white-space: nowrap;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.back-btn:hover {
    background-color: #286090;
    transform: translateY(-2px);
}

.back-btn:active {
    transform: translateY(0);
}

/* API内容容器 */
.api-content-container {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
    min-height: 200px;
}

.api-loading {
    text-align: center;
    padding: 50px 20px;
    color: #666;
    font-size: 16px;
    font-style: italic;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* 页脚样式 */
.site-footer {
    background-color: #337ab7;
    color: white;
    padding: 20px 0;
    margin-top: 40px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.footer-copyright {
    text-align: center;
}

.footer-item {
    margin: 8px 0;
    font-size: 14px;
}

.footer-item a {
    color: white;
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.footer-item a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .calendar-section, .date-query-tool, .detail-content {
        padding: 15px;
    }
    
    .query-form {
        flex-direction: column;
    }
    
    .query-select, .query-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .date-title, #gz {
        font-size: 20px;
    }
    
    .calendar-btn {
        padding: 8px 12px;
        margin: 3px;
        font-size: 13px;
    }
    
    #calendar table td {
        padding: 10px 5px;
        min-width: 60px;
        height: 60px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #logo img {
        max-width: 150px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    #panel {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .calendar-btn {
        flex: 1;
        min-width: 80px;
        margin: 2px;
    }
    
    .back-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-section, .date-query-tool, .detail-content {
    animation: fadeIn 0.5s ease-out;
}