/* 现代化首页样式 - 响应式设计 */

/* 基础重置和变量 */
:root {
    --primary-color: #00cc7d;
    --primary-dark: #00a86b;
    --secondary-color: #667eea;
    --accent-color: #f093fb;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-light: #a0aec0;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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(--bg-secondary);
    overflow-x: hidden;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 现代化首页主体 */
.modern-homepage {
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 50vh;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem 0;
}

/* Back-to-top button (match detail close button gradient) */
.back-to-top{
  position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px;
  border-radius: 50%; border: 0; display: none; cursor: pointer; z-index: 2000;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color:#fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.back-to-top::after{content:'\2191'; font-size: 20px;}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
        width: 100%;
    padding: 0 20px;
    z-index: 2;
    position: relative;
}

.hero-content {
    color: white;
    text-align: left;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-icon {
    font-size: 1.2rem;
}

.badge-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-title {
    font-size: clamp(2.2rem, 4.5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
    line-height: 1.5;
}

.hero-features {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.feature-icon {
    font-size: 1.1rem;
}

.feature-text {
    font-size: 0.85rem;
    font-weight: 500;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.stat-item {
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex: 1;
}

.stat-number {
        display: block;
    font-size: clamp(1.4rem, 2.8vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    backdrop-filter: blur(10px);
}

.btn-primary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1rem;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.filter-panel{
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(10px);
}
.filter-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.filter-label{color:#fff;font-size:0.95rem}
.filter-control{width:220px;height:40px;border-radius:10px;border:1px solid rgba(255,255,255,0.5);padding:0 10px;background:rgba(255,255,255,0.9)}
.filter-actions{display:flex;gap:10px;margin-top:8px}
.btn-primary.small,.btn-secondary.small{padding:0.55rem 1.1rem;font-size:0.9rem}

/* Hero装饰元素 */
.hero-decoration {
        position: absolute;
    top: 0;
        left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.element-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.element-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.element-4 {
    width: 40px;
    height: 40px;
    top: 30%;
    right: 30%;
    animation-delay: 1.5s;
}

.element-5 {
    width: 80px;
    height: 80px;
    bottom: 40%;
    right: 10%;
    animation-delay: 3s;
}

/* 游戏区域 */
.games-section {
    padding: 2rem 0;
    background: var(--bg-primary);
}

.section-header {
        text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
        margin: 0 auto;
}

/* 游戏网格 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 游戏卡片 */
.game-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
        position: relative;
    }

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.game-card.hover-effect {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.game-link {
        display: block;
    text-decoration: none;
    color: inherit;
}

/* 游戏图片容器 */
.game-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;/*var(--border-radius);*/
    transition: var(--transition);
}

.game-overlay {
        position: absolute;
    top: 0;
    left: 0;
        right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    transform: scale(0.8);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.game-card:hover .play-button {
    transform: scale(1);
}

.play-icon {
    margin-left: 2px; /* 微调播放图标位置，让它看起来更居中 */
    font-weight: bold;
}

/* 游戏信息 */
.game-info {
    padding: 1.2rem;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.tag {
    padding: 0.2rem 0.6rem;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
}

.tag-reverse {
    background: #ff6b6b;
}

.tag-tech {
    background: #4ecdc4;
}

.tag-lang {
    background: #45b7d1;
}

.tag-category {
    background: #96ceb4;
}

.game-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 特性区域 */
.features-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-features {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .game-showcase {
        max-width: 250px;
    }
    
    .games-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .game-image-container {
        aspect-ratio: 1 / 1;
    }
    
    .games-section,
    .features-section {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 50vh;
    }
    
    .game-info {
        padding: 0.6rem;
    }
    
    .feature-card {
        padding: 1.2rem;
    }
    
    .floating-element {
        display: none;
    }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* 超宽屏优化 */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element {
        animation: none;
    }
}

/* 打印样式 */
@media print {
    .hero-section,
    .features-section {
        display: none;
    }
    
    .games-section {
        padding: 1rem 0;
    }
    
    .game-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    }