/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主题颜色 */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);

    /* 颜色 */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);

    /* 玻璃拟态 */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);

    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* 过渡 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--background);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== 玻璃拟态效果 ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.glass:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(30, 60, 114, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: var(--spacing-sm) 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--text-primary);
}

.nav-menu a:hover::after {
    width: 100%;
}

.cta-button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: white;
    transition: var(--transition);
}

/* ===== Hero 区域 ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    top: 50%;
    right: -10%;
    animation-delay: 5s;
}

.orb-3 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    bottom: -20%;
    left: 30%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease-out;
}

.highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2.5rem;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 特性区域 ===== */
.features {
    padding-top: var(--spacing-xl);
    position: relative;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.feature-card {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== 游戏区域 ===== */
.games {
    padding-top: var(--spacing-xl);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
}

.game-category {
    margin-bottom: var(--spacing-lg);
}

.category-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.category-icon {
    font-size: 2.5rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.game-card {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    position: relative;
}

.game-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.game-card h4 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-xs);
}

.game-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.game-badge {
    display: inline-block;
    margin-top: var(--spacing-sm);
    padding: 0.25rem 0.75rem;
    background: var(--primary-gradient);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== 排行榜区域 ===== */
.leaderboard {
    padding-top: var(--spacing-md);
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

.leaderboard-content {
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    max-width: 700px;
    margin: 0 auto;
}

.table-header, .table-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.75rem 1rem;
    gap: var(--spacing-md);
    align-items: center;
    font-size: 1.1rem;
    text-align: center;
}

.table-header {
    font-weight: 700;
    border-bottom: 2px solid var(--glass-border);
    margin-bottom: var(--spacing-sm);
}

.table-row {
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.table-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.rank {
    font-weight: 700;
}

.rank.gold { color: #ffd700; }
.rank.silver { color: #c0c0c0; }
.rank.bronze { color: #cd7f32; }

.score {
    font-weight: 700;
    color: #4facfe;
}

.leaderboard-cta {
    text-align: center;
    margin-top: var(--spacing-lg);
}

.leaderboard-cta p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
}

/* ===== 关于我们区域 ===== */
.about {
    padding-top: var(--spacing-xl);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.about-feature-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-gradient);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
}

.about-visual {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
}

.stats-showcase {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.stat-showcase-item {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.stat-showcase-item h3 {
    font-size: 2.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-showcase-item p {
    color: var(--text-secondary);
}

/* ===== 联系我们区域 ===== */
.contact {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.contact-card {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-xs);
}

.contact-card p {
    color: var(--text-secondary);
}

/* ===== 页脚 ===== */
.footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-brand .brand-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-brand p {
    color: var(--text-muted);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-column h4 {
    margin-bottom: var(--spacing-xs);
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid,
    .games-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .table-header, .table-row {
        grid-template-columns: 1fr 1fr 1fr;
        font-size: 1rem;
        padding: 0.6rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 滚动动画 ===== */
@media (prefers-reduced-motion: no-preference) {
    .feature-card,
    .game-card,
    .contact-card {
        opacity: 0;
        animation: fadeInUp 0.6s ease-out forwards;
    }

    .feature-card:nth-child(1) { animation-delay: 0.1s; }
    .feature-card:nth-child(2) { animation-delay: 0.2s; }
    .feature-card:nth-child(3) { animation-delay: 0.3s; }
    .feature-card:nth-child(4) { animation-delay: 0.4s; }
    .feature-card:nth-child(5) { animation-delay: 0.5s; }
    .feature-card:nth-child(6) { animation-delay: 0.6s; }
}
