* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.tab-btn {
    padding: 12px 35px;
    font-size: 1.1rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    backdrop-filter: blur(10px);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.tab-btn[data-platform="douyin"].active {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.tab-btn[data-platform="baidu"].active {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.tab-btn[data-platform="weibo"].active {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
}

.file-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.file-selector label {
    font-size: 1rem;
    color: #aaa;
}

.file-selector select {
    padding: 10px 20px;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    min-width: 250px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.file-selector select:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.file-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
}

.file-selector select option {
    background: #1a1a2e;
    color: #fff;
}

#date-select {
    padding: 10px 20px;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    min-width: 150px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#date-select:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

#date-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
}

#date-select option {
    background: #1a1a2e;
    color: #fff;
}

.refresh-btn {
    padding: 10px 25px;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.refresh-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-wrapper {
    overflow-x: auto;
}

#chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 400px;
}

.chart-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.chart-row:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.keyword-container {
    width: 450px;
    flex-shrink: 0;
}

.keyword {
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.chart-row:hover .keyword {
    color: #667eea;
}

.percentage-label {
    font-size: 0.75rem;
    color: #888;
    margin-top: 3px;
}

.bar-container {
    flex: 1;
    height: 35px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.bar {
    height: 100%;
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 4px;
}

.bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, transparent 100%);
    border-radius: 8px 8px 0 0;
}

.hotindex-label {
    width: 120px;
    text-align: right;
    font-size: 0.9rem;
    font-weight: 600;
    color: #aaa;
    flex-shrink: 0;
}

.label-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: normal;
}

.label-badge.new {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
}

.label-badge.recommend {
    background: linear-gradient(135deg, #feca57 0%, #f9a826 100%);
    color: #333;
}

.label-badge.hot {
    background: linear-gradient(135deg, #ff4757 0%, #c0392b 100%);
    color: #fff;
}

.stats-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-panel h3 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.3rem;
}

#stats-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: #888;
}

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

.chart-row {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.chart-row:nth-child(1) { animation-delay: 0.05s; }
.chart-row:nth-child(2) { animation-delay: 0.1s; }
.chart-row:nth-child(3) { animation-delay: 0.15s; }
.chart-row:nth-child(4) { animation-delay: 0.2s; }
.chart-row:nth-child(5) { animation-delay: 0.25s; }
.chart-row:nth-child(6) { animation-delay: 0.3s; }
.chart-row:nth-child(7) { animation-delay: 0.35s; }
.chart-row:nth-child(8) { animation-delay: 0.4s; }
.chart-row:nth-child(9) { animation-delay: 0.45s; }
.chart-row:nth-child(10) { animation-delay: 0.5s; }

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 10px 25px;
        font-size: 1rem;
    }
    
    .keyword-container {
        width: 180px;
    }
    
    .hotindex-label {
        width: 80px;
        font-size: 0.8rem;
    }
    
    .file-selector select {
        min-width: 120px;
    }
    
    #date-select {
        min-width: 100px;
    }
}
