/* ============================================
   游艺盒 - 前台样式
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 25px rgba(99,102,241,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ------- 顶部导航 ------- */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(102,126,234,0.3);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 40px;
    height: 64px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}
.logo-icon { font-size: 28px; }
.logo-text { background: linear-gradient(90deg, #fff, #e0e7ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.site-nav { display: flex; gap: 8px; margin-left: auto; }
.site-nav a {
    padding: 8px 16px;
    border-radius: 8px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    transition: all 0.2s;
}
.site-nav a:hover, .site-nav a.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ------- Hero 搜索区 ------- */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 0;
    text-align: center;
    color: #fff;
}

/* Hero 背景遮罩，让文字更清晰 */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.1) 100%);
    z-index: 0;
}
.hero-section .container {
    position: relative;
    z-index: 1;
}
.hero-title { font-size: 42px; font-weight: 800; margin-bottom: 10px; }
.hero-subtitle { font-size: 18px; opacity: 0.9; margin-bottom: 30px; }
.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 0;
}
.search-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 50px 0 0 50px;
    font-size: 16px;
    outline: none;
}
.search-btn {
    padding: 14px 32px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 0 50px 50px 0;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.search-btn:hover { background: #0f172a; }

/* ------- 主内容 ------- */
.main-content { padding: 30px 0; }

.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.filter-label { font-weight: 600; color: var(--text-light); }
.filter-tag {
    padding: 6px 14px;
    border-radius: 20px;
    background: #f1f5f9;
    font-size: 13px;
    transition: all 0.2s;
}
.filter-tag:hover { background: #e2e8f0; }
.filter-tag.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.filter-count { margin-left: auto; color: var(--text-light); font-size: 13px; }

/* ------- 游戏卡片网格 ------- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.game-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: block;
}
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.game-cover {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    background: #f1f5f9;
}
.game-cover img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.game-card:hover .game-cover img { transform: scale(1.05); }
.game-cat-tag {
    position: absolute;
    top: 10px; left: 10px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}
.game-info { padding: 12px 14px; }
.game-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ------- 分页 ------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-block;
    padding: 8px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
}
.page-dots { padding: 8px 6px; color: var(--text-light); }

/* ------- 游戏详情页 ------- */
.game-detail-page { padding: 30px 0; }
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}
.detail-main { min-width: 0; }

.game-hero {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.game-hero-cover {
    width: 200px;
    flex-shrink: 0;
}
.game-hero-cover img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 3/4;
    object-fit: cover;
}
.game-hero-info { flex: 1; }
.game-detail-title { font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.game-meta { margin-bottom: 16px; color: var(--text-light); }
.meta-item { margin-right: 20px; }
.game-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
}
.tag-cat { background: #ede9fe; color: #7c3aed; }

/* ------- 区块盒子 ------- */
.section-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

/* 下载区 */
.download-box { display: flex; flex-direction: column; gap: 12px; }
.download-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 10px;
    border: 1px solid #bae6fd;
}
.download-item.quark {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #6ee7b7;
}
.download-icon { font-size: 36px; }
.download-info { flex: 1; }
.download-name { font-size: 18px; font-weight: 700; color: #065f46; margin-bottom: 4px; }
.download-code { font-size: 14px; color: #047857; }
.code-text { font-weight: 700; font-family: monospace; letter-spacing: 2px; }
.copy-btn {
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 12px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.download-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}
.download-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16,185,129,0.4); }
.download-tip { margin-top: 12px; font-size: 13px; color: var(--text-light); }

/* 配置要求 */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.config-col {
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}
.config-col:last-child { border-left-color: #10b981; }
.config-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary);
}
.config-title.rec { color: #10b981; }
.config-content { font-size: 13px; color: var(--text-light); line-height: 2; }

/* 简介 */
.game-description {
    font-size: 14px;
    line-height: 1.8;
    color: #334155;
    white-space: pre-wrap;
}

/* 截图 */
.screenshot-list { display: flex; flex-direction: column; gap: 16px; }
.screenshot-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.screenshot-item img { width: 100%; }

/* ------- 边栏 ------- */
.detail-sidebar { min-width: 0; }
.sidebar-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 20px;
}
.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.sidebar-empty { color: var(--text-light); font-size: 13px; text-align: center; padding: 20px 0; }

.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}
.related-item:hover { background: #f1f5f9; }
.related-item img {
    width: 48px; height: 64px;
    object-fit: cover;
    border-radius: 4px;
}
.related-item span {
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-list { display: flex; flex-direction: column; gap: 4px; }
.cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}
.cat-item:hover { background: #f1f5f9; color: var(--primary); }

/* ------- 普通页面 ------- */
.page-content { padding: 40px 0; }
.page-header {
    text-align: center;
    margin-bottom: 30px;
}
.page-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.page-header p { color: var(--text-light); }
.page-body {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.about-content { margin-bottom: 30px; line-height: 1.8; }
.about-section { margin-bottom: 30px; }
.about-section h2 {
    font-size: 20px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}
.disclaimer-box {
    padding: 20px;
    background: #fffbeb;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    line-height: 1.8;
    font-size: 14px;
    color: #92400e;
}
.contact-box { line-height: 2; color: var(--text-light); }

/* ------- 留言页 ------- */
.message-box {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.message-form .form-row { margin-bottom: 16px; }
.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text);
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.form-textarea { resize: vertical; }
.required { color: #ef4444; }
.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102,126,234,0.4); }

.success-tip, .error-tip {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.success-tip { background: #dcfce7; color: #166534; }
.error-tip { background: #fee2e2; color: #991b1b; }

/* ------- 页脚 ------- */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 30px 0 20px;
    margin-top: 40px;
}
.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #334155;
    margin-bottom: 16px;
}
.footer-label { font-weight: 600; color: #cbd5e1; }
.footer-links a { color: #94a3b8; font-size: 13px; }
.footer-links a:hover { color: #fff; }
.footer-disclaimer {
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 16px;
    opacity: 0.8;
}
.footer-copyright {
    text-align: center;
    font-size: 12px;
    padding-top: 12px;
    border-top: 1px solid #334155;
}

/* ------- Toast 提示 ------- */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    border-radius: 8px;
    z-index: 9999;
    animation: toastIn 0.3s;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ------- 空状态 ------- */
.empty-tip {
    text-align: center;
    padding: 60px 0;
    color: var(--text-light);
    font-size: 16px;
}

/* ------- 响应式 ------- */
@media (max-width: 768px) {
    .site-nav { display: none; }
    
/* Hero 背景遮罩，让文字更清晰 */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.1) 100%);
    z-index: 0;
}
.hero-section .container {
    position: relative;
    z-index: 1;
}
.hero-title { font-size: 28px; }
    .game-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .detail-layout { grid-template-columns: 1fr; }
    .game-hero { flex-direction: column; }
    .game-hero-cover { width: 100%; max-width: 200px; margin: 0 auto; }
    .game-hero-info { text-align: center; }
    .config-grid { grid-template-columns: 1fr; }
    .header-inner { height: 56px; }
}


