/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #fbbf24;
    --secondary: #6366f1;
    --secondary-dark: #4f46e5;
    --accent: #06b6d4;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark2: #1e293b;
    --dark3: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --bg: #0b1121;
    --bg2: #111827;
    --bg3: #1f2937;
    --border: #374151;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
}

.text-center { text-align: center; }
.mt-3 { margin-top: 2rem; }

/* ========== 导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 17, 33, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(11, 17, 33, 0.95);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.logo i {
    font-size: 1.6rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 6px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.nav-admin {
    background: rgba(245, 158, 11, 0.15) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.nav-admin:hover {
    background: rgba(245, 158, 11, 0.25) !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(11, 17, 33, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        transform: translateY(-120%);
        transition: var(--transition);
        border-bottom: 1px solid var(--border);
    }
    .nav-links.show {
        transform: translateY(0);
    }
    .nav-links a {
        padding: 12px 16px;
        font-size: 1rem;
    }
}

/* ========== Hero ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
    background: radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
                var(--bg);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
    color: #fff;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    color: var(--border);
    font-size: 1.5rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-ball {
    position: absolute;
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.ball {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(245, 158, 11, 0.15), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(255,255,255,0.05);
    animation: float 6s ease-in-out infinite;
    position: relative;
}

.ball::after {
    content: '';
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    border: 2px dashed rgba(245, 158, 11, 0.2);
    animation: spin 20s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

@media (max-width: 768px) {
    .hero h1 { font-size: 2.4rem; }
    .hero-stats { gap: 12px; }
    .stat-number { font-size: 1.6rem; }
    .hero-ball { display: none; }
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    color: #fff;
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
}

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    color: #fff;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* ========== 标题 ========== */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 12px auto 0;
    border-radius: 4px;
}

.page-hero {
    padding: 120px 0 60px;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.05), transparent);
}

.page-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.page-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ========== 倒计时 ========== */
.countdown-section {
    padding: 60px 0;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.countdown-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.countdown-item {
    text-align: center;
    background: var(--bg3);
    border-radius: var(--radius);
    padding: 20px 28px;
    min-width: 100px;
    border: 1px solid var(--border);
}

.countdown-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 6px;
}

.countdown-sep {
    font-size: 2.5rem;
    color: var(--border);
    font-weight: 300;
}

@media (max-width: 600px) {
    .countdown-grid { gap: 10px; }
    .countdown-item { padding: 14px 16px; min-width: 70px; }
    .countdown-number { font-size: 2rem; }
    .countdown-sep { font-size: 1.5rem; }
}

/* ========== 卡片网格 ========== */
.quick-nav, .matches-highlight, .schedule-list, .groups-section, .bracket-section, .stadiums-section {
    padding: 80px 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.nav-card {
    background: var(--bg2);
    border-radius: var(--radius);
    padding: 32px 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}

.nav-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,255,255,0.1);
}

.nav-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 18px;
}

.nav-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.nav-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.card-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ========== 比赛卡片 ========== */
.matches-list {
    display: grid;
    gap: 16px;
}

.match-card {
    background: var(--bg2);
    border-radius: var(--radius);
    padding: 20px 24px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: var(--transition);
    flex-wrap: wrap;
}

.match-card:hover {
    border-color: rgba(255,255,255,0.1);
    box-shadow: var(--shadow);
}

.match-stage {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--bg3);
    padding: 4px 12px;
    border-radius: 50px;
}

.match-teams {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.match-team {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}

.match-vs {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.match-score {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    min-width: 60px;
    text-align: center;
}

.match-score.pending {
    color: var(--text-muted);
    font-weight: 500;
}

.match-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.match-info i {
    width: 16px;
    margin-right: 4px;
}

.match-cards {
    display: grid;
    gap: 16px;
}

/* ========== 筛选栏 ========== */
.filter-bar {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.filter-group select,
.filter-group input {
    background: var(--bg2);
    border: 1px solid var(--border);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    min-width: 160px;
    outline: none;
    transition: var(--transition);
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* ========== 小组积分表 ========== */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.group-card {
    background: var(--bg2);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
}

.group-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-card h3 span {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 50px;
}

.group-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.group-table th {
    text-align: left;
    padding: 8px 6px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
}

.group-table td {
    padding: 10px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text);
}

.group-table .team-name {
    font-weight: 600;
    color: #fff;
}

.group-table .rank {
    color: var(--text-muted);
    font-weight: 500;
}

.group-table .qualified {
    color: var(--success);
}

/* ========== 淘汰赛 bracket ========== */
.bracket {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bracket-round {
    background: var(--bg2);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
}

.bracket-round h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bracket-matches {
    display: grid;
    gap: 12px;
}

.bracket-match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg3);
    border-radius: var(--radius-sm);
    gap: 12px;
    flex-wrap: wrap;
}

.bracket-match .teams {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.bracket-match .score {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

/* ========== 场馆卡片 ========== */
.stadiums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.stadium-card {
    background: var(--bg2);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stadium-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,255,255,0.1);
}

.stadium-card h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.stadium-card .location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stadium-card .capacity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========== 后台管理 ========== */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 60px;
}

.login-card {
    background: var(--bg2);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 420px;
    width: 100%;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.login-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin: 0 auto 20px;
}

.login-card h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.login-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 16px;
}

.admin-panel {
    padding: 120px 0 60px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-header h2 {
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: var(--bg2);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border);
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--bg3);
    color: #fff;
}

.tab-btn:hover {
    color: #fff;
}

.admin-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th {
    text-align: left;
    padding: 12px 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.admin-table input {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    width: 100%;
    min-width: 60px;
    outline: none;
}

.admin-table input:focus {
    border-color: var(--primary);
}

/* ========== 页脚 ========== */
.footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========== 响应式 ========== */
@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .section-title { font-size: 1.6rem; }
    .page-hero h1 { font-size: 1.8rem; }
    .match-card { flex-direction: column; align-items: stretch; }
    .match-teams { justify-content: center; }
    .match-info { justify-content: center; }
    .groups-grid { grid-template-columns: 1fr; }
    .stadiums-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; }
    .filter-group select,
    .filter-group input { min-width: 100%; }
    .admin-tabs { flex-direction: column; }
}

/* ========== 小工具 ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--dark3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}