/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 苹果风格颜色系统 */
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --error-color: #FF3B30;
    --background-color: #F2F2F7;
    --surface-color: #FFFFFF;
    --text-primary: #000000;
    --text-secondary: #8E8E93;
    --border-color: #C6C6C8;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --border-radius-large: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--border-radius);
}

.nav-link:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 12px;
    margin-left: 5px;
    transition: var(--transition);
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    padding: 10px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    list-style: none;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

/* 移动端导航切换按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* 主要内容区域 */
main {
    margin-top: 70px;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    min-height: 60vh;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: 640px;
    z-index: 2;
    position: relative;
    padding: 0 20px;
}

.hero-kicker { font-weight: 700; letter-spacing: 0.08em; opacity: 0.85; margin-bottom: 6px; }
.hero-title { font-size: 2.6rem; font-weight: 800; margin-bottom: 10px; line-height: 1.15; }

.hero-subtitle { font-size: 1.05rem; margin-bottom: 16px; opacity: 0.95; font-weight: 500; }
.hero-search { display: flex; gap: 10px; margin: 14px 0 16px; }
.hero-search input { flex: 1; height: 44px; border-radius: 12px; border: none; padding: 0 14px; }
.hero-search button { height: 44px; border-radius: 12px; border: none; padding: 0 16px; font-weight: 700; background: #fff; color: #333; cursor: pointer; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-badges .badge { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3); padding: 6px 10px; border-radius: 999px; font-size: 12px; }
.hero-stats { display: flex; gap: 24px; margin: 8px 0 18px; }
.hero-stats .stat { text-align: left; }
.hero-stats .stat-number { font-size: 1.4rem; font-weight: 800; }
.hero-stats .stat-label { font-size: 12px; opacity: 0.85; }

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: var(--border-radius-large);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.hero-image { display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 2; position: relative; }

.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.thumb-grid img { width: 100%; height: 140px; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow-medium); }
.hero-note { font-size: 12px; opacity: 0.9; }

.game-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* 区域标题 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* 特色游戏区域 */
.featured-games {
    padding: 100px 0;
    background: var(--surface-color);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.game-card {
    background: var(--surface-color);
    border-radius: var(--border-radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.game-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.game-card:hover .game-image img {
    transform: scale(1.1);
}

.play-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.play-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.game-info {
    padding: 20px;
}

.game-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.game-info p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
}

.game-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-icon {
    font-size: 14px;
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.game-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: var(--background-color);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* 游戏分类区域 */
.game-categories {
    padding: 100px 0;
    background: var(--background-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    background: var(--surface-color);
    border-radius: var(--border-radius-large);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.category-stats {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.category-count,
.category-players {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.category-count {
    color: var(--primary-color);
}

.category-players {
    color: var(--success-color);
}

/* 游戏资讯区域 */
.game-news {
    padding: 100px 0;
    background: var(--surface-color);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background: var(--surface-color);
    border-radius: var(--border-radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 25px;
}

.news-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.4;
}

.news-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.news-category {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* 页脚 */
.footer {
    background: #1C1C1E;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
}

.footer-section p {
    color: #8E8E93;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #8E8E93;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    color: #8E8E93;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #8E8E93;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.social-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #2C2C2E;
    color: #8E8E93;
}

/* 游戏模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    background-color: var(--surface-color);
    margin: 2% auto;
    border-radius: var(--border-radius-large);
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--error-color);
    background-color: var(--background-color);
}

.modal-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 30px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.game-iframe-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.game-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.game-details h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.game-details p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

.game-details ul {
    list-style: none;
    padding: 0;
}

.game-details ul li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
}

.game-details ul li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero { display: block; text-align: center; padding: 40px 0; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .thumb-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--surface-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .game-iframe-container {
        height: 300px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .game-card {
        margin: 0 10px;
    }

    .category-card {
        padding: 30px 15px;
    }

    .modal-content {
        margin: 5% auto;
        width: 95%;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-body {
        padding: 15px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 焦点样式 */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 选择文本样式 */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* 游戏攻略样式 */
.guides {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.guides .section-title {
    color: white;
    text-align: center;
    margin-bottom: 50px;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.guide-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 300% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.guide-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.guide-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.guide-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
    line-height: 1.3;
}

.guide-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 20px;
}

.guide-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.guide-category {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.guide-read-time {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

.guide-stats {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.guide-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.guide-stats .stat-icon {
    font-size: 1rem;
}

.guide-stats .stat-value {
    font-weight: 600;
    color: white;
}

/* 响应式设计 - 攻略区域 */
@media (max-width: 768px) {
    .guides-grid {
        grid-template-columns: 1fr;
    }
    
    .guide-card {
        padding: 20px;
    }
    
    .guide-icon {
        font-size: 2.5rem;
    }
    
    .guide-card h3 {
        font-size: 1.2rem;
    }
}
