/* 全局变量定义 */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --background-color: #f3f4f6;
    --card-background: #ffffff;
    --success-color: #10b981;
    --error-color: #ef4444;
    --border-radius: 0.5rem;
    --transition-speed: 0.3s;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 8px 12px rgba(0, 0, 0, 0.15);
}

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

/* 基础样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

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

/* 语言选择器 */
.language-selector {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    background: var(--card-background);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.language-selector select {
    padding: 0.5rem;
    border: 1px solid var(--text-light);
    border-radius: var(--border-radius);
    background: var(--card-background);
    color: var(--text-color);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.language-selector select:hover {
    border-color: var(--primary-color);
}

/* 导航栏样式 */
.main-nav {
    background-color: var(--card-background);
    box-shadow: var(--box-shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.logo a:hover {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

.nav-links .cta-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}

.nav-links .cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Hero 区域 */
.hero {
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 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='%23ffffff' fill-opacity='0.1'%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.1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-intro {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.primary-btn, .secondary-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.primary-btn {
    background-color: white;
    color: var(--primary-color);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.secondary-btn {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

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

/* 卡片通用样式 */
.feature-card,
.gameplay-card,
.code-card,
.update-card {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
}

.feature-card:hover,
.gameplay-card:hover,
.code-card:hover,
.update-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

/* 网格布局 */
.feature-grid,
.gameplay-grid,
.rarity-grid,
.codes-grid,
.social-grid,
.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 稀有度卡片 */
.rarity-card {
    padding: 2rem;
    border-radius: var(--border-radius);
    color: white;
    transition: all var(--transition-speed);
}

.rarity-card:hover {
    transform: translateY(-5px);
}

.common { background: linear-gradient(135deg, #4b5563, #374151); }
.rare { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.exotic { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.legendary { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* 列表样式 */
.weapon-features,
.social-features,
.update-features {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.weapon-features li,
.social-features li,
.update-features li {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.weapon-features li::before,
.social-features li::before,
.update-features li::before {
    content: "→";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 代码卡片 */
.copy-code {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    width: 100%;
}

.copy-code:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* 社交卡片 */
.social-card {
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-speed);
}

.social-card:hover {
    transform: translateY(-5px);
}

/* Footer 样式 */
footer {
    background: linear-gradient(to bottom, var(--card-background), #f8fafc);
    padding: 6rem 0 3rem;
    margin-top: 6rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--accent-color)
    );
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section h4 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2rem;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition-speed);
    display: inline-block;
    position: relative;
    padding-left: 1.5rem;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-speed);
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.footer-social a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(37, 99, 235, 0.1);
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    background-color: rgba(37, 99, 235, 0.15);
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.6;
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    grid-column: 1 / -1;
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 4rem 0 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links a {
        padding-left: 0;
    }

    .footer-links a::before {
        display: none;
    }

    .footer-social {
        justify-content: center;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-container {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        margin-top: 1rem;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .feature-grid,
    .gameplay-grid,
    .rarity-grid,
    .codes-grid,
    .social-grid,
    .updates-grid {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 3rem 0;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-section {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card,
.gameplay-card,
.code-card,
.update-card {
    animation: fadeIn 0.6s ease-out forwards;
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 文字选中样式 */
::selection {
    background: var(--primary-color);
    color: white;
}