/**
 * 考试倒计时插件样式
 * 包含：侧边栏样式、单独页面样式、小程序样式
 */

/* ==================== 通用样式 ==================== */

/* 倒计时颜色定义 */
.days-180 {
    color: #4CAF50 !important; /* 绿色 - 180天以上 */
}

.days-60 {
    color: #FFC107 !important; /* 黄色 - 60-180天 */
}

.days-30 {
    color: #FF9800 !important; /* 橙色 - 30-60天 */
}

.days-7 {
    color: #F44336 !important; /* 红色 - 7-30天 */
}

.ended {
    color: #999 !important;
}

/* 励志短语样式 */
.exam-motivation {
    font-style: italic;
    text-align: center;
    padding: 15px;
    background-color: #e8f5e9;
    border-radius: 10px;
    font-size: 16px;
    color: #333;
    margin-top: 15px;
    line-height: 1.6;
}

/* ==================== 侧边栏样式 ==================== */
.exam-countdown-sidebar {
    background: #fff;
}

.exam-countdown-sidebar .exam-countdown-header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.exam-countdown-sidebar .exam-countdown-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

/* ==================== Slider样式 ==================== */
.exam-countdown-slider {
    position: relative;
    overflow: hidden;
}

.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 15px;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.3s ease;
}

.slider-item {
    flex: 0 0 100%;
    min-width: 100%;
    box-sizing: border-box;
}

.slider-item .exam-item {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slider-item .exam-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.slider-item .exam-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.slider-item .exam-countdown {
    font-size: 28px;
    font-weight: bold;
    margin: 8px 0;
}

.slider-item .exam-countdown .days {
    font-size: 28px;
}

.slider-item .exam-date {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Slider控制按钮 */
.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.slider-prev,
.slider-next {
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-prev:hover,
.slider-next:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.slider-prev:active,
.slider-next:active {
    transform: scale(0.95);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.slider-dot.active {
    background: #4CAF50;
    transform: scale(1.2);
}

.slider-dot:hover {
    background: #bbb;
    transform: scale(1.1);
}

.slider-dot.active:hover {
    background: #45a049;
}

/* 自动轮播指示器 */
.slider-auto-play {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.slider-auto-play input[type="checkbox"] {
    margin: 0;
}

.exam-countdown-sidebar .exam-motivation {
    font-size: 14px;
    padding: 12px 6px;
}

/* ==================== 单独页面样式 ==================== */
.exam-countdown-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.exam-countdown-page .exam-countdown-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 30px;
}

.exam-countdown-page .exam-item {
    width: calc(50% - 10px);
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 768px) {
    .exam-countdown-page .exam-item {
        width: 100%;
    }
}

.exam-countdown-page .exam-item:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    z-index: 1;
}

.exam-countdown-page .exam-name {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.exam-countdown-page .exam-countdown {
    font-size: 32px;
    text-align: center;
    font-weight: bold;
    margin: 15px 0;
    min-height: 40px;
}

.exam-countdown-page .exam-countdown .countdown-display {
    font-family: 'Courier New', monospace;
}

.exam-countdown-page .exam-date {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

.exam-countdown-page .exam-motivation {
    font-size: 20px;
    padding: 20px;
    margin-top: 30px;
}

/* ==================== 小程序样式 ==================== */
.exam-countdown-miniprogram {
    /* 小程序端使用自己的样式 */
    display: none;
}

/* 小程序数据容器（用于隐藏数据） */
.exam-countdown-miniprogram[data-exam-data] {
    display: none;
}

/* ==================== 动画效果 ==================== */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.exam-countdown .days-7 {
    animation: pulse 2s infinite;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 480px) {
    .exam-countdown-sidebar {
        padding: 10px;
    }
    
    .exam-countdown-sidebar .exam-countdown {
        font-size: 20px;
    }
    
    .exam-countdown-sidebar .exam-countdown .days {
        font-size: 24px;
    }
    
    .exam-countdown-page {
        padding: 10px;
    }
    
    .exam-countdown-page .exam-countdown {
        font-size: 24px;
    }
    
    .exam-countdown-page .exam-motivation {
        font-size: 16px;
        padding: 15px;
    }
}
