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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.search-section {
    /* background: white; */
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    width: 100%;
    margin: 0 auto 30px auto;
}

.title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.title {
    font-size: 2.5rem;
    color: #333;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.space-link {
    font-size: 1.2rem;
    color: #2196F3;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid #2196F3;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: transparent;
}

.space-link:hover {
    background: #2196F3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.search-container {
    display: flex;
    gap: 15px;
    margin: 0 auto 20px auto;
    justify-content: center;
    flex-wrap: wrap;
    width: 50%;
    max-width: 600px;
}

.search-options {
    width: 50%;
    max-width: 600px;
    margin: 0 auto 30px auto;
    text-align: center;
}

.option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    margin-bottom: 5px;
}

.option-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.option-text {
    font-weight: 500;
}

.option-help {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 15px 20px;
    border: 3px solid #e3f2fd;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.search-input:focus {
    border-color: #2196f3;
    background: white;
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.2);
}

.search-input.has-text {
    border-color: #1976d2;
    background: white;
}

.search-button {
    padding: 15px 30px;
    background: linear-gradient(45deg, #2196f3, #1976d2);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.search-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status {
    margin: 20px auto;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    width: 50%;
    max-width: 600px;
    text-align: center;
}

.status.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 2px solid #4caf50;
}

.status.error {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #f44336;
}

.status.loading {
    background: #e3f2fd;
    color: #1976d2;
    border: 2px solid #2196f3;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

.description {
    color: #666;
    font-size: 14px;
    margin: 20px 0;
    line-height: 1.6;
}

.history-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    margin: 20px auto;
    position: relative;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 15px;
    max-width: 100%;
    overflow: hidden;
}

.history-grid-item {
    background: white;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
}

.history-grid-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.history-grid-item.selected {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-color: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.history-item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.history-item-keyword {
    font-weight: 600;
    font-size: 18px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}

.history-grid-item.selected .history-item-keyword {
    color: white;
}

.history-item-time {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}

.history-item-upname {
    font-size: 16px;
    color: #2196F3;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}

.history-grid-item.selected .history-item-time {
    color: rgba(255, 255, 255, 0.8);
}


/* 历史搜索结果头部样式 */
.history-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

.history-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 0;
    text-align: center;
    font-weight: bold;
    flex: 1;
}

.history-sort-options {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.sort-select {
    padding: 8px 12px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    cursor: pointer;
    min-width: 160px;
}

.sort-select:hover {
    border-color: #cbd5e1;
    background: #f8f9fa;
}

.sort-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.history-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.history-select {
    padding: 15px 25px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    min-width: 320px;
    cursor: pointer;
    color: #374151;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

.history-select:hover {
    border-color: #cbd5e1;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.history-select:focus {
    border-color: #3b82f6;
    background: linear-gradient(145deg, #ffffff, #eff6ff);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.history-select:disabled {
    background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #d1d5db;
    box-shadow: none;
    transform: none;
}

.history-select option {
    padding: 15px 25px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    color: #374151;
    font-weight: 500;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    margin: 2px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.history-select option:hover {
    background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
    color: #1e293b;
    font-weight: 600;
    transform: translateX(5px);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.12);
}

.history-select option:checked {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-weight: 600;
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.3),
        0 2px 4px rgba(59, 130, 246, 0.2);
    transform: translateX(8px);
}

.history-select option:focus {
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    color: #1e40af;
    font-weight: 600;
    outline: none;
    box-shadow: 
        0 0 0 2px rgba(59, 130, 246, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.1);
}

.no-history {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

.results-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    margin: 0 auto;
    display: none;
    position: relative;
    z-index: 1;
}

.results-section.show {
    display: block;
}

.results-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
}

.chart-section {
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chart-title {
    font-size: 1.4rem;
    color: #495057;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

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

.chart-toggle-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chart-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chart-toggle-btn.active {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.chart-toggle-btn:not(.active) {
    opacity: 0.6;
    filter: grayscale(50%);
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 10px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chart-container canvas {
    width: 100% !important;
    height: 400px !important;
    border-radius: 8px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.results-table th,
.results-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    background: transparent;
}

.results-table th {
    background: linear-gradient(45deg, #2196f3, #1976d2);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.results-table tr:hover {
    background: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-link {
    color: #2196f3;
    text-decoration: none;
    font-weight: bold;
}

.video-link:hover {
    text-decoration: underline;
    background: transparent;
}

.up-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.cover-image {
    width: 120px;
    height: 67px;
    border-radius: 5px;
    object-fit: cover;
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.stat-item {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    color: #666;
}

/* 新增：UP主信息样式 */
.up-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.up-name {
    color: #2196f3;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.up-name:hover {
    color: #1976d2;
    text-decoration: underline;
}

/* 自定义下拉框样式 */
.custom-select {
    position: relative;
    min-width: 450px;
    user-select: none;
}

.custom-select-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    color: #374151;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.custom-select-header:hover {
    border-color: #cbd5e1;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.custom-select.open .custom-select-header {
    border-color: #3b82f6;
    background: linear-gradient(145deg, #ffffff, #eff6ff);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.custom-select-value {
    flex: 1;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-select-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #6b7280;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-arrow.rotated {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    background: white;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    backdrop-filter: blur(10px);
}

.custom-select-option {
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
    color: #1e293b;
    font-weight: 600;
    transform: translateX(5px);
    padding-left: 30px;
}

.custom-select-option.selected {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-weight: 600;
    transform: translateX(8px);
    padding-left: 30px;
}

.custom-select-option.selected:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.option-keyword {
    font-weight: 500;
    color: inherit;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.option-time {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 15px;
}

/* 高级分析功能模块样式 */
.advanced-analysis-section {
    margin: 40px 0;
    padding: 0 20px;
}

.section-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.analysis-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card-title {
    font-size: 1.3rem;
    color: #1f2937;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 视频质量评分样式 */
.quality-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.metric-item {
    text-align: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.metric-label {
    display: block;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 500;
}

.metric-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.score {
    font-size: 2rem;
    font-weight: 700;
    color: #3b82f6;
}

.score-max {
    font-size: 1rem;
    color: #94a3b8;
}

.metric-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* 时间序列分析样式 */
.trend-analysis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.trend-item {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.trend-label {
    display: block;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 15px;
    font-weight: 500;
}

.trend-value {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.trend-up {
    background: #dcfce7;
    color: #166534;
}

.trend-down {
    background: #fee2e2;
    color: #991b1b;
}

.trend-stable {
    background: #fef3c7;
    color: #92400e;
}

/* 聚类分析样式 */
.cluster-analysis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.cluster-item {
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

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

.cluster-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.cluster-count {
    font-size: 14px;
    color: #64748b;
}

.cluster-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

/* 性能监控样式 */
.performance-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.perf-item {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.perf-label {
    display: block;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 500;
}

.perf-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
}

/* 实时更新样式 */
.real-time-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #0ea5e9;
}

body.dark-theme .real-time-card {
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.8), rgba(25, 25, 45, 0.8));
    border: 1px solid #0ea5e9;
}

.real-time-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #94a3b8;
    margin-right: 8px;
    transition: background-color 0.3s ease;
}

.real-time-indicator.active {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.real-time-status {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.status-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

body.dark-theme .status-item {
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.status-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

.status-value {
    font-size: 1rem;
    font-weight: 600;
}

.status-connected {
    color: #059669;
}

.status-disconnected {
    color: #dc2626;
}






/* 新增：分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    position: relative;
    z-index: 10;
}

.page-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #2196f3, #1976d2);
    color: white;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    position: relative;
    z-index: 10;
}

.page-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.page-info {
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    padding: 10px 20px;
    background: white;
    border-radius: 20px;
    border: 2px solid #dee2e6;
    min-width: 150px;
    text-align: center;
}

@media (max-width: 768px) {
    .search-section,
    .results-section {
        padding: 30px 20px;
    }
    
    .title-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .space-link {
        font-size: 1rem;
        padding: 8px 16px;
    }
    
    .search-input {
        min-width: 250px;
    }
    
    .search-container {
        flex-direction: column;
        align-items: center;
        width: 90%;
        max-width: 500px;
    }
    
    .search-options {
        width: 90%;
        max-width: 500px;
    }
    
    .option-label {
        font-size: 13px;
    }
    
    .option-help {
        font-size: 11px;
    }
    
    .status {
        width: 90%;
        max-width: 500px;
        margin: 15px auto;
        padding: 12px;
        font-size: 14px;
    }
    
    .history-section {
        padding: 30px 20px;
        margin: 20px 0;
    }
    
    .history-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        max-height: 400px;
        overflow-y: auto;
        padding: 5px;
        scrollbar-width: thin;
        scrollbar-color: #ccc #f5f5f5;
    }
    
    .history-grid::-webkit-scrollbar {
        width: 6px;
    }
    
    .history-grid::-webkit-scrollbar-track {
        background: #f5f5f5;
        border-radius: 3px;
    }
    
    .history-grid::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }
    
    .history-grid::-webkit-scrollbar-thumb:hover {
        background: #999;
    }
    
    .history-grid-item {
        padding: 12px;
        min-height: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .history-item-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .history-item-keyword {
        font-size: 16px;
        font-weight: 600;
        word-wrap: break-word;
        word-break: break-all;
        line-height: 1.3;
    }
    
    .history-item-upname {
        font-size: 14px;
        word-wrap: break-word;
        word-break: break-all;
        line-height: 1.3;
        color: #666;
    }
    
    .history-item-time {
        font-size: 12px;
        word-wrap: break-word;
        word-break: break-all;
        line-height: 1.3;
        color: #999;
    }
}

/* 更小屏幕的优化（手机竖屏） */
@media (max-width: 480px) {
    .history-grid {
        max-height: 350px;
        gap: 6px;
    }
    
    .history-grid-item {
        padding: 10px;
        gap: 3px;
    }
    
    .history-item-keyword {
        font-size: 15px;
    }
    
    .history-item-upname {
        font-size: 13px;
    }
    
    .history-item-time {
        font-size: 11px;
    }
    
    .chart-section {
        padding: 20px 15px;
        margin-bottom: 30px;
    }
    
    .chart-controls {
        gap: 10px;
    }
    
    .chart-toggle-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .results-table {
        font-size: 12px;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 10px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .page-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .page-info {
        font-size: 14px;
        min-width: 120px;
    }
}

/* 图表Tooltip样式 */
.chart-tooltip {
    position: fixed;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    color: #333;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    max-width: 320px;
    pointer-events: none;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.tooltip-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 182, 193, 0.6);
    font-size: 15px;
    line-height: 1.4;
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tooltip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    margin: 3px 0;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.02);
}

.tooltip-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.tooltip-label {
    font-weight: bold;
    margin-right: 10px;
    padding: 2px 4px;
    color: #333;
    font-size: 13px;
}

.tooltip-value {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 集数显示样式 */
.episode-count {
    color: #ff6b35;
    font-weight: bold;
    margin-right: 8px;
    font-size: 14px;
}

/* 封面单元格样式 */
.cover-cell {
    position: relative;
}

/* 封面悬停简介卡片样式 */
.cover-tooltip {
    position: fixed;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.98);
    color: #333;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    max-width: 560px;
    pointer-events: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.2s ease-in-out;
}

.cover-tooltip-content {
    display: flex;
    flex-direction: column;
}

.cover-tooltip-item {
    line-height: 1.5;
}

.cover-tooltip-value {
    color: #333;
    font-weight: normal;
    word-break: break-word;
    text-align: left;
}

/* 封面tooltip淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 悬浮球样式 */
.floating-ball {
    position: fixed;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 20px;
    bottom: 20px;
}

.floating-ball:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.floating-ball.menu-open {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    transform: scale(1.05);
}

.floating-ball-icon {
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.floating-ball.menu-open .floating-ball-icon {
    transform: rotate(45deg);
}

/* 悬浮球菜单样式 */
.floating-menu {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    min-width: 180px;
    z-index: 1001;
    animation: slideUp 0.3s ease-out;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.menu-item:hover {
    background: #f8f9fa;
    color: #2196f3;
    transform: translateX(5px);
}

.menu-item:first-child {
    border-radius: 15px 15px 0 0;
}

.menu-item:last-child {
    border-radius: 0 0 15px 15px;
}

.menu-item svg {
    flex-shrink: 0;
    color: inherit;
}

/* 深色主题样式 */
body.dark-theme {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    color: #e0e0e0;
}

body.dark-theme .search-section {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .title {
    color: #e0e0e0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-theme .space-link {
    color: #64b5f6;
    border-color: #64b5f6;
}

body.dark-theme .space-link:hover {
    background: #64b5f6;
    color: white;
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

body.dark-theme .search-input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

body.dark-theme .search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #2196f3;
}

body.dark-theme .search-input::placeholder {
    color: #a0a0a0;
}

body.dark-theme .option-label {
    color: #a0a0a0;
}

body.dark-theme .option-help {
    color: #666;
}

body.dark-theme .results-section {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .results-title {
    color: #e0e0e0;
}

body.dark-theme .chart-section {
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.9) 0%, rgba(25, 25, 45, 0.9) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-theme .chart-title {
    color: #e0e0e0;
}

body.dark-theme .chart-container {
    background: rgba(30, 30, 50, 0.8);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-theme .results-table {
    background: rgba(20, 20, 40, 0.8);
    color: #e0e0e0;
}

body.dark-theme .results-table th,
body.dark-theme .results-table td {
    background: transparent;
}

body.dark-theme .results-table th {
    background: linear-gradient(45deg, #2196f3, #1976d2);
    color: white;
}

body.dark-theme .results-table tr:hover {
    background: transparent;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

body.dark-theme .video-link {
    color: #64b5f6;
}

body.dark-theme .video-link:hover {
    background: transparent;
}

body.dark-theme .up-name {
    color: #64b5f6;
}

body.dark-theme .history-section {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .history-title {
    color: #e0e0e0;
}

body.dark-theme .history-header {
    color: #e0e0e0;
}

body.dark-theme .sort-label {
    color: #a0a0a0;
}

body.dark-theme .sort-select {
    background: rgba(25, 25, 45, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

body.dark-theme .sort-select:hover {
    background: rgba(35, 35, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark-theme .sort-select:focus {
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.2);
}

body.dark-theme .history-grid-item {
    background: rgba(25, 25, 45, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

body.dark-theme .history-grid-item:hover {
    background: rgba(35, 35, 55, 0.9);
    border-color: #4a9eff;
}

body.dark-theme .history-grid-item.selected {
    background: linear-gradient(135deg, #4a9eff, #2d5aa0);
    border-color: #2d5aa0;
    color: white;
}

body.dark-theme .history-item-keyword {
    color: #e0e0e0;
}

body.dark-theme .history-grid-item.selected .history-item-keyword {
    color: white;
}

body.dark-theme .history-item-time {
    color: #a0a0a0;
}

body.dark-theme .history-grid-item.selected .history-item-time {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-theme .history-item-upname {
    color: #64b5f6;
}

body.dark-theme .history-grid-item.selected .history-item-upname {
    color: rgba(255, 255, 255, 0.9);
}

body.dark-theme .history-grid::-webkit-scrollbar-track {
    background: rgba(25, 25, 45, 0.8);
}

body.dark-theme .history-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

body.dark-theme .history-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

body.dark-theme .custom-select-header {
    background: rgba(25, 25, 45, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

body.dark-theme .custom-select-dropdown {
    background: rgba(15, 15, 35, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

body.dark-theme .custom-select-option {
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .custom-select-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-theme .custom-select-option.selected {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

body.dark-theme .analysis-card {
    background: rgba(20, 20, 40, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .card-title {
    color: #e0e0e0;
}

body.dark-theme .metric-item,
body.dark-theme .trend-item,
body.dark-theme .cluster-item,
body.dark-theme .perf-item {
    background: rgba(25, 25, 45, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .metric-label,
body.dark-theme .trend-label,
body.dark-theme .perf-label,
body.dark-theme .status-label {
    color: #a0a0a0;
}

body.dark-theme .cluster-name {
    color: #e0e0e0;
}

body.dark-theme .cluster-count {
    color: #a0a0a0;
}

body.dark-theme .pagination {
    background: rgba(20, 20, 40, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .page-info {
    background: rgba(25, 25, 45, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

body.dark-theme .chart-tooltip,
body.dark-theme .cover-tooltip {
    background: rgba(15, 15, 35, 0.98);
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.dark-theme .tooltip-item {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-theme .tooltip-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-theme .tooltip-label {
    color: #e0e0e0;
}

body.dark-theme .tooltip-value {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

body.dark-theme .floating-menu {
    background: rgba(15, 15, 35, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

body.dark-theme .menu-item {
    color: #e0e0e0;
}

body.dark-theme .menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #64b5f6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .floating-ball {
        width: 50px;
        height: 50px;
        left: 15px;
        bottom: 15px;
    }
    
    .floating-menu {
        min-width: 160px;
        bottom: 65px;
    }
    
    .menu-item {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .history-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .history-title {
        margin-bottom: 15px;
    }
    
    .history-sort-options {
        position: static;
        transform: none;
        justify-content: center;
    }
    
    .sort-select {
        min-width: 140px;
        font-size: 13px;
    }
} 