/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ==================== 头部 ==================== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    gap: 30px;
}

.logo a {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo a:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    color: #555;
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav a:hover::before,
.nav a.active::before {
    width: 70%;
}

.nav a:hover,
.nav a.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.search-box form {
    display: flex;
    gap: 10px;
    background: #f8f9fa;
    padding: 6px;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-box form:focus-within {
    border-color: #667eea;
    background: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.search-box input[type="text"] {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    width: 280px;
    outline: none;
    font-size: 14px;
    background: transparent;
}

.search-box button {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ==================== 主内容区 ==================== */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.stats {
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==================== 封面网格 ==================== */
.cover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.cover-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.cover-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.cover-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(102, 126, 234, 0.25);
}

.cover-card:hover::before {
    opacity: 1;
}

.cover-image {
    position: relative;
    width: 100%;
    padding-top: 141.4%;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.cover-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cover-card:hover .cover-image img {
    transform: scale(1.1);
}

.cover-info {
    padding: 18px;
    position: relative;
    z-index: 2;
}

.cover-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2c3e50;
}

.cover-title a:hover {
    color: #667eea;
}

.cover-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 14px;
    color: #7f8c8d;
    font-size: 13px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    color: #667eea;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.page-link {
    padding: 10px 18px;
    background: white;
    border: 2px solid transparent;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 45px;
    text-align: center;
}

.page-link:hover,
.page-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* ==================== 详情页 ==================== */
.detail-page {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.breadcrumb {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #7f8c8d;
    font-size: 14px;
}

.breadcrumb a {
    color: #667eea;
    font-weight: 500;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.detail-cover {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.detail-cover:hover {
    transform: scale(1.02);
}

.detail-cover img {
    width: 100%;
    height: auto;
}

.game-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.game-meta {
    margin-bottom: 25px;
}

.meta-row {
    display: flex;
    margin-bottom: 14px;
    font-size: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.meta-row:hover {
    background: #f0f1f2;
}

.meta-label {
    width: 110px;
    color: #7f8c8d;
    flex-shrink: 0;
    font-weight: 500;
}

.meta-value {
    color: #2c3e50;
    flex: 1;
    font-weight: 600;
}

.tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    font-size: 13px;
    color: #667eea;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.tag:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.game-description {
    margin: 25px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.game-description h3 {
    margin-bottom: 15px;
    font-size: 20px;
    color: #2c3e50;
}

.game-description p {
    line-height: 1.9;
    color: #555;
}

.download-section {
    margin-top: 35px;
}

.download-btn-large {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.download-btn-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.download-btn-large:hover::before {
    left: 100%;
}

.download-btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.5);
}

/* ==================== 相关游戏 ==================== */
.related-games {
    margin-top: 50px;
    padding-top: 50px;
    border-top: 2px solid #f0f0f0;
}

.related-games h2 {
    margin-bottom: 25px;
    font-size: 26px;
    color: #2c3e50;
    position: relative;
    padding-left: 15px;
}

.related-games h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

/* ==================== 页脚 ==================== */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 35px 0;
    text-align: center;
    color: #7f8c8d;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 50px;
}

.footer a {
    color: #667eea;
    font-weight: 500;
}

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

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box input[type="text"] {
        width: 100%;
    }
    
    .nav {
        justify-content: center;
    }
    
    .cover-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .detail-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .game-title {
        font-size: 28px;
    }
    
    .download-btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .detail-page {
        padding: 25px;
    }
}

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

.cover-card {
    animation: fadeInUp 0.6s ease-out;
}

.cover-card:nth-child(1) { animation-delay: 0.05s; }
.cover-card:nth-child(2) { animation-delay: 0.1s; }
.cover-card:nth-child(3) { animation-delay: 0.15s; }
.cover-card:nth-child(4) { animation-delay: 0.2s; }
.cover-card:nth-child(5) { animation-delay: 0.25s; }
.cover-card:nth-child(6) { animation-delay: 0.3s; }
