/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-top: 5px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 主要内容区域 */
.main {
    padding: 20px 0;
    flex: 1;
}

.game-main {
    padding: 10px 0;
}

/* 统计栏 */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.stat-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.7rem;
    opacity: 0.9;
}

/* 游戏网格 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* 游戏卡片 */
.game-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-cover {
    transform: scale(1.05);
}

.game-info {
    padding: 20px;
}

.game-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.game-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 悬停时展示完整描述 */
.game-card:hover .game-description {
    line-clamp: unset;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    display: block;
    overflow: visible;
    text-overflow: unset;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.click-count {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.play-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.play-btn:hover {
    background: #45a049;
}

/* 游戏详情页样式 */
.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

.game-frame-wrapper {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 520px;
}

#game-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 错误消息 */
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.error-message h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* 底部 */
.footer {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
}

/* SEO优化样式 */
.hero-section {
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

.hero-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    line-height: 1.4;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.feature-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.feature-item h2 {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.feature-item p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.4;
}

/* Game Categories */
.game-categories {
    margin: 2rem 0;
    text-align: center;
}

.game-categories h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.category-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* User Reviews */
.user-reviews {
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-reviews h2 {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.review-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.stars {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.review-item p {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.4rem;
    line-height: 1.4;
    font-size: 0.85rem;
}

.reviewer {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Breadcrumb */
.breadcrumb {
    margin: 1rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumb span {
    color: white;
    font-weight: 500;
}

/* Internal Links */
.internal-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.internal-link:hover {
    color: white;
    text-decoration-color: white;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* FAQ Section */
.faq-section {
    margin: 2rem 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.faq-item h2 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.faq-item p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.faq-item ul, .faq-item ol {
    color: rgba(255, 255, 255, 0.9);
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.faq-item li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.faq-item strong {
    color: white;
    font-weight: 600;
}

/* Game Guide Section */
.guide-section {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.guide-section header h1 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.guide-intro {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.guide-content h2 {
    color: white;
    font-size: 1.6rem;
    margin: 2rem 0 1rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

.guide-content h3 {
    color: white;
    font-size: 1.3rem;
    margin: 1.5rem 0 0.8rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.guide-content p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.guide-content ul, .guide-content ol {
    color: rgba(255, 255, 255, 0.9);
    margin-left: 1.5rem;
    margin-bottom: 1.2rem;
}

.guide-content li {
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

.guide-content strong {
    color: white;
    font-weight: 600;
}

/* Category Page Styles */
.category-intro {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
}

.category-intro-content h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.category-intro-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
}

.category-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-features .feature {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.category-features .feature h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.category-features .feature p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.category-suggestions {
    margin-top: 2rem;
    text-align: center;
}

.category-suggestions h4 {
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.suggestion-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.suggestion-links a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.suggestion-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
    color: white;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Mobile Responsive for Category Pages */
@media (max-width: 768px) {
    .category-intro {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .category-intro-content h2 {
        font-size: 1.6rem;
    }
    
    .category-intro-content p {
        font-size: 1rem;
    }
    
    .category-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-features .feature {
        padding: 1rem;
    }
    
    .suggestion-links {
        flex-direction: column;
        align-items: center;
    }
    
    .suggestion-links a {
        width: 200px;
        text-align: center;
    }
}

.games-section h2 {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main {
        padding: 10px 0;
    }
    
    .hero-section {
        margin-bottom: 15px;
    }
    
    .hero-section h2 {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }
    
    .hero-section p {
        font-size: 0.9rem;
        line-height: 1.3;
        max-width: 90%;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin: 1.5rem 0;
    }
    
    .feature-item {
        padding: 0.8rem;
    }
    
    .feature-item h2 {
        font-size: 0.9rem;
    }
    
    .feature-item p {
        font-size: 0.75rem;
    }
    
    .user-reviews {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .user-reviews h2 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .review-item {
        padding: 0.8rem;
    }
    
    .review-item p {
        font-size: 0.8rem;
    }
    
    .reviewer {
        font-size: 0.75rem;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
        padding: 6px 12px;
    }
    
    .stat-number {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
    
    .games-section h2 {
        display: none;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .header-nav {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .game-main { padding: 6px 0; }
    .game-frame-wrapper { height: 90vh; min-height: 500px; }
    .game-info { display: none; }
    .game-info.visible { display: block; }
    .game-meta .game-description {
        display: -webkit-box;
        line-clamp: 2;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* 移动端信息切换按钮 */
.info-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 0.9rem;
    backdrop-filter: blur(6px);
}