/* 历史热搜样式 */

/* 历史热搜链接样式由 history.js 控制 */
.history-link:hover {
    color: #f0b90b;
}

/* 历史热搜容器 */
.history-container {
    display: none;
    margin-top: 10px; /* 减小顶部间距 */
}

.history-container.active {
    display: block;
}

/* 当前选中日期显示 */
.current-date {
    text-align: center;
    font-size: 18px;
    color: #f0b90b;
    margin-bottom: 15px;
    font-weight: 500;
}

/* 日期选择器容器 */
.date-selector-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 10px 0;
}

/* 日期选择器 */
.date-selector {
    display: flex;
    gap: 10px;
    flex: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.date-selector::-webkit-scrollbar {
    height: 4px;
}

.date-selector::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.date-selector::-webkit-scrollbar-thumb {
    background: rgba(240, 185, 11, 0.3);
    border-radius: 2px;
}

.date-selector::-webkit-scrollbar-thumb:hover {
    background: rgba(240, 185, 11, 0.5);
}

.date-item {
    flex-shrink: 0;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 14px;
}

.date-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(240, 185, 11, 0.3);
}

.date-item.active {
    background: linear-gradient(135deg, #f0b90b 0%, #f8d33a 100%);
    color: #0a0a0a;
    border-color: #f0b90b;
    font-weight: 500;
}

/* 日历按钮 */
.calendar-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    white-space: nowrap;
}

.calendar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(240, 185, 11, 0.3);
}

/* 时间线 */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.timeline-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(240, 185, 11, 0.2);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-time {
    font-size: 18px;
    color: #f0b90b;
    font-weight: 500;
}

.timeline-badge {
    padding: 4px 12px;
    background: rgba(240, 185, 11, 0.1);
    border: 1px solid rgba(240, 185, 11, 0.3);
    border-radius: 12px;
    font-size: 12px;
    color: #f0b90b;
}

.timeline-topics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-topics.collapsed .timeline-topic:nth-child(n+4) {
    display: none;
}

.timeline-topic {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    transition: background 0.3s;
}

.timeline-topic:hover {
    background: rgba(255, 255, 255, 0.05);
}

.topic-rank {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0b90b 0%, #f8d33a 100%);
    color: #0a0a0a;
    font-weight: bold;
    font-size: 14px;
    border-radius: 6px;
}

.topic-content {
    flex: 1;
}

.topic-title {
    font-size: 15px;
    color: #fff;
    margin-bottom: 4px;
    font-weight: 500;
}

.topic-heat {
    font-size: 13px;
    color: #f0b90b;
}

/* 展开按钮 */
.expand-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.expand-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(240, 185, 11, 0.3);
    color: #f0b90b;
}

/* 日历弹窗 */
.calendar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.calendar-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.calendar-title {
    font-size: 18px;
    color: #fff;
    font-weight: 500;
}

.calendar-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 20px;
}

.calendar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* 快速跳转按钮 */
.quick-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.quick-jump-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
}

.quick-jump-btn:hover {
    background: rgba(240, 185, 11, 0.1);
    border-color: rgba(240, 185, 11, 0.3);
    color: #f0b90b;
}

/* 月份导航 */
.month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.month-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.month-nav-btn:hover:not(:disabled) {
    background: rgba(240, 185, 11, 0.1);
    border-color: rgba(240, 185, 11, 0.3);
}

.month-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.month-display {
    font-size: 16px;
    color: #fff;
    font-weight: 500;
}

/* 日历网格 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    color: #888;
    padding: 8px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    position: relative;
}

.calendar-day:hover:not(.other-month):not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(240, 185, 11, 0.3);
}

.calendar-day.other-month {
    color: #444;
    cursor: default;
}

.calendar-day.today {
    background: linear-gradient(135deg, #f0b90b 0%, #f8d33a 100%);
    color: #0a0a0a;
    border-color: #f0b90b;
    font-weight: 500;
}

.calendar-day.has-data::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #f0b90b;
    border-radius: 50%;
}

.calendar-day.today.has-data::after {
    background: #0a0a0a;
}

.calendar-day:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .history-link {
        top: 8px;
        right: 15px;
        font-size: 13px;
    }
    
    .history-container {
        margin-top: 8px;
    }
    
    .current-date {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .date-selector-container {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .date-item,
    .calendar-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .timeline-item {
        padding: 15px;
    }
    
    .timeline-time {
        font-size: 16px;
    }
    
    .timeline-badge {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .topic-rank {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .topic-title {
        font-size: 14px;
    }
    
    .topic-heat {
        font-size: 12px;
    }
    
    .calendar-content {
        padding: 20px;
    }
    
    .calendar-title {
        font-size: 16px;
    }
    
    .quick-jump-btn {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .month-display {
        font-size: 14px;
    }
    
    .calendar-day {
        font-size: 13px;
    }
}

