/* ========================================
   体育导航 - 样式表
   ======================================== */

/* CSS变量 */
:root {
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #f97316;
    --accent-secondary: #ea580c;
    --accent-glow: rgba(249, 115, 22, 0.3);
    --success: #22c55e;
    --danger: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* 重置样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   头部导航
   ======================================== */

.header {
    position: relative;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.header-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(249, 115, 22, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 0%, rgba(234, 88, 12, 0.1), transparent);
    pointer-events: none;
}

.nav-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    transition: opacity var(--transition-fast);
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
}

.logo-text {
    background: linear-gradient(135deg, var(--accent-primary), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all var(--transition-fast);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-primary);
}

.nav-count {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-weight: 600;
}

/* ========================================
   Hero区域
   ======================================== */

.hero {
    position: relative;
    padding: 80px 24px;
    text-align: center;
    overflow: hidden;
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    margin-bottom: 24px;
}

.title-line {
    display: block;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-highlight {
    display: block;
    font-size: clamp(16px, 2.5vw, 20px);
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 12px;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-search:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    background: var(--accent-primary);
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-btn:hover {
    background: var(--accent-secondary);
}

.search-btn svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

/* ========================================
   统计区域
   ======================================== */

.stats-section {
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon-sites {
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-primary);
}

.stat-icon-categories {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.stat-icon-updated {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========================================
   分类区域
   ======================================== */

.category-section {
    padding: 50px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.category-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.category-icon-football { background: #22c55e; }
.category-icon-basketball { background: #f97316; }
.category-icon-tennis { background: #eab308; }
.category-icon-other { background: #64748b; }

.category-count {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 8px;
}

.more-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-primary);
    transition: gap var(--transition-fast);
}

.more-link:hover {
    gap: 10px;
}

.more-link svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   站点卡片
   ======================================== */

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.sites-grid-large {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.site-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.site-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(249, 115, 22, 0.3);
}

.site-link {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
}

.site-favicon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-favicon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favicon-placeholder svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.site-info {
    flex: 1;
    min-width: 0;
}

.site-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-domain {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   Sitemap区域
   ======================================== */

.sitemaps-section {
    padding: 50px 0;
    background: var(--bg-secondary);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.sitemaps-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sitemap-link {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.sitemap-link:hover {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
    color: var(--accent-primary);
}

.sitemap-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.sitemap-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* ========================================
   页脚
   ======================================== */

.footer {
    padding: 40px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.footer-logo {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
}

.footer-desc {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.icp {
    font-size: 12px;
}

/* ========================================
   返回顶部
   ======================================== */

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-secondary);
    transform: translateY(-4px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

/* ========================================
   面包屑
   ======================================== */

.breadcrumb {
    padding: 20px 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    font-size: 14px;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: var(--text-muted);
}

.breadcrumb-list a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.breadcrumb-list a:hover {
    color: var(--accent-primary);
}

/* ========================================
   分类页面
   ======================================== */

.category-page .page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-count {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-muted);
}

.page-keywords {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========================================
   分页
   ======================================== */

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-muted);
}

.pagination-links {
    display: flex;
    gap: 8px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.page-link:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.page-link.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

/* ========================================
   紧凑头部
   ======================================== */

.header-compact {
    padding: 0;
}

.header-compact .hero {
    display: none;
}

/* ========================================
   动画
   ======================================== */

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

.animate-fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ========================================
   响应式
   ======================================== */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        transition: all var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-link {
        width: 100%;
    }
    
    .hero {
        padding: 50px 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .sites-grid,
    .sites-grid-large {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .pagination-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========================================
   无障碍
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* 跳转链接 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-primary);
    color: #fff;
    padding: 8px 16px;
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.3);
        --text-muted: #94a3b8;
    }
}
