/* CPU排行榜页面样式 */

.cpu-ranking-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    padding: 80px 0 40px;
    position: relative;
}

.cpu-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* 导航链接样式 */
.chip-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInDown 0.6s ease-out;
}

.chip-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.chip-nav .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.chip-nav .nav-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.chip-nav .nav-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

.chip-nav .nav-current {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.9rem;
}

.chip-nav .nav-gpu {
    margin-left: auto;
    background: rgba(88, 101, 242, 0.2);
    border: 1px solid rgba(88, 101, 242, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

.chip-nav .nav-gpu:hover {
    background: rgba(88, 101, 242, 0.3);
    border-color: rgba(88, 101, 242, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.2);
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.page-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.title-main {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.title-subtitle {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-description {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* 筛选区域 */
.filters-section {
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    padding-right: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
}

.filter-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.4);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23007AFF' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.filter-select:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.5);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23007AFF' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.filter-select:active {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Option 样式 */
.filter-select option {
    background: rgba(28, 28, 30, 0.95);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 0.875rem;
    font-family: inherit;
}

.filter-select option:hover {
    background: rgba(0, 122, 255, 0.2);
    color: #007AFF;
}

.filter-select option:checked {
    background: rgba(0, 122, 255, 0.3);
    color: #007AFF;
    font-weight: 600;
}

/* 自定义滚动条样式 - Webkit浏览器 (Chrome, Safari, Edge) */
.filter-select::-webkit-scrollbar {
    width: 8px;
}

.filter-select::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.filter-select::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease;
}

.filter-select::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 122, 255, 0.5);
    border-color: rgba(0, 122, 255, 0.3);
}

.filter-select::-webkit-scrollbar-thumb:active {
    background: rgba(0, 122, 255, 0.7);
}

/* Firefox 滚动条样式 */
.filter-select {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.3);
}

/* 搜索行 */
.search-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.625rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-button,
.reset-button {
    padding: 0.625rem 1rem;
    background: rgba(0, 122, 255, 0.2);
    border: 1px solid rgba(0, 122, 255, 0.3);
    border-radius: 8px;
    color: #007AFF;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: rgba(0, 122, 255, 0.3);
    border-color: rgba(0, 122, 255, 0.5);
    transform: translateY(-2px);
}

.reset-button {
    background: rgba(255, 59, 48, 0.2);
    border-color: rgba(255, 59, 48, 0.3);
    color: #FF3B30;
}

.reset-button:hover {
    background: rgba(255, 59, 48, 0.3);
    border-color: rgba(255, 59, 48, 0.5);
}

.search-button svg {
    width: 16px;
    height: 16px;
}

/* 加载指示器 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 排行榜表格 */
.ranking-table-container {
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    animation: fadeInUp 1.2s ease-out 0.4s both;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
}

.ranking-table thead {
    background: rgba(0, 0, 0, 0.3);
}

.ranking-table th {
    padding: 0.75rem 0.625rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.ranking-table td {
    padding: 0.75rem 0.625rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
    font-size: 0.875rem;
}

.ranking-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.rank-col {
    width: 60px;
    text-align: center;
    font-weight: 700;
    color: #007AFF;
}

.name-col {
    min-width: 180px;
    font-weight: 600;
}

.manufacturer-col {
    width: 100px;
}

.socket-col {
    width: 100px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
}

.cores-col {
    width: 100px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
}

.frequency-col {
    width: 100px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
}

.performance-col {
    width: 120px;
    font-weight: 600;
    color: #00D4AA;
    font-size: 0.875rem;
}

.tdp-col {
    width: 80px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
}

.action-col {
    width: 80px;
}

/* 排名徽章 */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.875rem;
}

.rank-badge.top-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000000;
}

.rank-badge.top-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
    color: #000000;
}

.rank-badge.top-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    color: #ffffff;
}

.rank-badge.other {
    background: rgba(0, 122, 255, 0.2);
    color: #007AFF;
}

/* CPU名称链接 */
.cpu-name-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.cpu-name-link:hover {
    color: #007AFF;
}

/* 厂商标签 */
.manufacturer-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.manufacturer-badge.nvidia {
    background: rgba(118, 185, 0, 0.2);
    color: #76B900;
    border: 1px solid rgba(118, 185, 0, 0.3);
}

.manufacturer-badge.amd {
    background: rgba(237, 28, 36, 0.2);
    color: #ED1C24;
    border: 1px solid rgba(237, 28, 36, 0.3);
}

.manufacturer-badge.intel {
    background: rgba(0, 113, 197, 0.2);
    color: #0071C5;
    border: 1px solid rgba(0, 113, 197, 0.3);
}

/* 操作按钮 */
.action-button {
    padding: 0.375rem 0.75rem;
    background: rgba(0, 122, 255, 0.2);
    border: 1px solid rgba(0, 122, 255, 0.3);
    border-radius: 6px;
    color: #007AFF;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-button:hover {
    background: rgba(0, 122, 255, 0.3);
    border-color: rgba(0, 122, 255, 0.5);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9375rem;
}

/* 分页控件 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    min-width: 32px;
    padding: 0.5rem 0.625rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.8125rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-number:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.page-number.active {
    background: rgba(0, 122, 255, 0.3);
    border-color: #007AFF;
    color: #007AFF;
}

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .cpu-container {
        padding: 0 1.5rem;
    }
    
    .filters-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ranking-table {
        font-size: 0.875rem;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .cpu-ranking-page {
        padding: 60px 0 40px;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .search-input,
    .search-button,
    .reset-button {
        width: 100%;
    }
    
    .ranking-table-container {
        padding: 1rem;
        overflow-x: auto;
    }
    
    .ranking-table {
        min-width: 800px;
    }
    
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination-controls {
        justify-content: center;
    }
}

