/* ============================================
   2026世界杯 - 主样式表
   ============================================ */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #121828;
    --card-bg: rgba(18, 24, 40, 0.85);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent: #6366f1;
    --accent-light: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --border: rgba(148, 163, 184, 0.12);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 导航栏 ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 12px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo i { color: var(--accent-light); font-size: 1.6rem; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

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

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.15);
}

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

.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 40px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.btn-admin:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

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

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 4px;
    transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
    background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
                var(--bg-primary);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%236366f1" fill-opacity="0.03"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.5;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 8px 24px;
    border-radius: 40px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-light);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.hero-content h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-light), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 36px;
}

.countdown-item {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 24px;
    min-width: 80px;
    text-align: center;
}

.countdown-item span {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.countdown-item small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: 60px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px var(--accent-glow);
}

.pulse {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 24px var(--accent-glow); }
    50% { box-shadow: 0 4px 48px rgba(99, 102, 241, 0.5); }
}

/* ---------- 统计条 ---------- */
.stats-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 32px 0;
}

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

.stat-item {
    text-align: center;
    padding: 16px;
}

.stat-item i {
    font-size: 1.6rem;
    color: var(--accent-light);
    margin-bottom: 8px;
    display: block;
}

.stat-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ---------- 通用section ---------- */
.section {
    padding: 80px 0;
}

.bg-dark {
    background: var(--bg-secondary);
}

.bg-gradient {
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ---------- 赛程卡片 ---------- */
.schedule-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.schedule-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
    cursor: default;
}

.schedule-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow);
}

.schedule-card .round {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.schedule-card .match {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.schedule-card .meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.schedule-card .status {
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-light);
}

.status.ongoing { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.status.ended { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* ---------- 球队 ---------- */
.teams-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.filter-btn {
    padding: 10px 22px;
    border-radius: 40px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.team-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: var(--transition);
    cursor: default;
}

.team-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow);
}

.team-card .flag {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 12px;
    border: 2px solid var(--border);
}

.team-card .name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.team-card .region {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.team-card .rank {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 12px;
    border-radius: 40px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-light);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ---------- 球星 ---------- */
.stars-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.star-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.star-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition);
}

.star-card:hover::before { opacity: 1; }
.star-card:hover { transform: translateY(-6px); border-color: rgba(99, 102, 241, 0.3); box-shadow: var(--shadow); }

.star-card .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 3px solid var(--accent);
    position: relative;
    z-index: 1;
}

.star-card .name {
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.star-card .country {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.star-card .position {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 40px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-light);
    font-size: 0.75rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ---------- 门票 ---------- */
.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.ticket-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ticket-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}

.ticket-card .category {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.ticket-card .price {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent-light);
    margin-bottom: 8px;
}

.ticket-card .price small {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.ticket-card .desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    min-height: 40px;
}

.ticket-card .status-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.ticket-card .status-badge.soldout {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.ticket-card .status-badge.coming {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.ticket-notify {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
}

.ticket-notify h3 {
    margin-bottom: 16px;
    font-size: 1.3rem;
}

.notify-form {
    display: flex;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.notify-form input {
    flex: 1;
    padding: 14px 18px;
    border-radius: 40px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.notify-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-msg {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-height: 24px;
}

.form-msg.success { color: #34d399; }
.form-msg.error { color: #f87171; }

/* ---------- 新闻 ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.news-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: default;
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow);
}

.news-card .news-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.news-card .news-body {
    padding: 20px;
}

.news-card .news-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.news-card .news-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-card .news-summary {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ---------- 页脚 ---------- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding-top: 48px;
}

.footer-content {
    text-align: center;
    padding-bottom: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-brand i { color: var(--accent-light); }

.footer-disclaimer {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

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

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 16px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ---------- 回到顶部 ---------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--accent-glow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: scale(1.1);
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 14, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 24px 24px;
        transition: var(--transition);
        border-left: 1px solid var(--border);
        gap: 12px;
    }

    .nav-menu.open { right: 0; }

    .nav-links {
        flex-direction: column;
        width: 100%;
    }

    .nav-links a {
        padding: 12px 16px;
        font-size: 1rem;
    }

    .btn-admin { align-self: flex-start; margin-top: 8px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-num { font-size: 1.8rem; }

    .hero-countdown { gap: 12px; }
    .countdown-item { padding: 12px 16px; min-width: 65px; }
    .countdown-item span { font-size: 1.6rem; }

    .notify-form { flex-direction: column; }

    .section { padding: 60px 0; }
    .section-header h2 { font-size: 1.8rem; }

    .admin-header { flex-direction: column; align-items: stretch; }
    .admin-header div { display: flex; flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-content h1 { font-size: 2.8rem; }
    .schedule-cards { grid-template-columns: 1fr; }
    .teams-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stars-carousel { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tickets-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .stat-item { padding: 8px; }
    .stat-num { font-size: 1.5rem; }
}