/* ============================================================
   GameSpace - 电竞活力风样式
   主色调: 深色背景 + 橙红色高亮
   ============================================================ */

/* ---------- 重置 ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-dark:      #0a0a0f;
    --bg-card:      #16161e;
    --bg-card-hover:#1e1e2a;
    --bg-elevated:  #1a1a26;
    --border:       #2a2a3a;
    --text-primary: #f0f0f5;
    --text-secondary:#a0a0b8;
    --text-muted:   #6a6a7e;
    --accent:       #FF6B35;
    --accent-light: #F7931E;
    --accent-glow:  rgba(255, 107, 53, 0.4);
    --accent-2:     #E84393;
    --success:      #55efc4;
    --warning:      #FDCB6E;
    --radius:       8px;
    --radius-lg:    16px;
    --shadow:       0 4px 20px rgba(0,0,0,0.4);
    --transition:   all 0.3s ease;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

.accent { color: var(--accent); }

/* ---------- 顶部导航 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-icon { font-size: 1.6rem; }

.main-nav {
    display: flex;
    gap: 32px;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a.active {
    color: var(--accent);
}

.header-actions { display: flex; gap: 16px; align-items: center; }
.search-btn {
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: var(--transition);
}
.search-btn:hover { opacity: 1; }

.header-glow {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}

/* ---------- 页面容器 ---------- */
.page-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ---------- 轮播图 ---------- */
.carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.carousel-track {
    display: flex;
    transition: transform 0.6s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 420px;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.carousel-slide .slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.carousel-slide .slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.85));
}

.carousel-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    max-width: 70%;
}

.carousel-tag {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.carousel-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.carousel-summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.carousel-link {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
}

.carousel-link:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    right: 24px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--accent);
    width: 28px;
    border-radius: 5px;
}

/* ---------- 板块标题 ---------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--accent);
    border-radius: 2px;
}

.section-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.section-link:hover { color: var(--accent); }

/* ---------- 卡片网格 ---------- */
.grid {
    display: grid;
    gap: 24px;
}

.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- 新闻卡片 ---------- */
.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255,107,53,0.15);
}

.news-cover {
    height: 180px;
    position: relative;
}

.news-cover .gradient-bg {
    width: 100%;
    height: 100%;
}

.news-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,107,53,0.9);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
}

.news-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-summary {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    flex: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.news-meta .views { display: flex; gap: 4px; align-items: center; }

/* ---------- 游戏卡片 ---------- */
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.game-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255,107,53,0.15);
}

.game-cover {
    height: 200px;
    position: relative;
}

.game-cover .gradient-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.game-score-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
}

.game-body {
    padding: 16px;
}

.game-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.game-developer {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

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

/* ---------- 徽章 ---------- */
.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-released { background: rgba(85,239,196,0.15); color: var(--success); }
.badge-upcoming { background: rgba(255,107,53,0.15);  color: var(--accent); }
.badge-beta     { background: rgba(253,203,110,0.15); color: var(--warning); }
.badge-default  { background: rgba(160,160,184,0.15); color: var(--text-secondary); }

/* ---------- 评测卡片 ---------- */
.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.review-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.review-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.review-author-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.review-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.review-game-name {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.review-excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-score-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-score-num {
    font-size: 1.8rem;
    font-weight: 800;
}

/* ---------- 排行榜 ---------- */
.ranking-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.ranking-item:last-child { border-bottom: none; }

.ranking-item:hover {
    background: var(--bg-card-hover);
}

.ranking-rank {
    font-size: 1.5rem;
    font-weight: 800;
    width: 32px;
    text-align: center;
    color: var(--text-muted);
}

.ranking-item:nth-child(1) .ranking-rank { color: var(--accent); }
.ranking-item:nth-child(2) .ranking-rank { color: var(--accent-light); }
.ranking-item:nth-child(3) .ranking-rank { color: var(--warning); }

.ranking-cover {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.ranking-info { flex: 1; }
.ranking-title { font-weight: 600; margin-bottom: 4px; }
.ranking-meta { font-size: 0.8rem; color: var(--text-muted); }

.ranking-score {
    font-size: 1.4rem;
    font-weight: 800;
    text-align: right;
}

/* ---------- 分类筛选 ---------- */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.filter-chip {
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ---------- 文章详情 ---------- */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-hero {
    height: 320px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    position: relative;
}

.article-hero .gradient-bg { width: 100%; height: 100%; }

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.article-summary {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    padding-left: 16px;
    border-left: 3px solid var(--accent);
}

.article-content {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content strong {
    color: var(--accent);
    font-weight: 700;
}

/* ---------- 评测详情 ---------- */
.review-detail {
    max-width: 800px;
    margin: 0 auto;
}

.review-score-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    display: flex;
    gap: 32px;
    align-items: center;
}

.score-overall {
    text-align: center;
    flex-shrink: 0;
}

.score-overall .num {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.score-overall .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.score-breakdown {
    flex: 1;
}

.score-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.score-bar .label {
    width: 60px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.score-bar .track {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.score-bar .fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.score-bar .value {
    width: 32px;
    text-align: right;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ---------- 评论区 ---------- */
.comment-section {
    max-width: 800px;
    margin: 40px auto 0;
}

.comment-section h3 {
    font-size: 1.2rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 2px;
}

.comment-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    margin-bottom: 12px;
    transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-form textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--accent-light);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    gap: 12px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.comment-content { flex: 1; }

.comment-author {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.comment-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.comment-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ---------- 渐变背景 ---------- */
.gradient-bg {
    width: 100%;
    height: 100%;
}

/* ---------- 页脚 ---------- */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    margin-top: 80px;
    padding: 48px 24px 0;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- 工具类 ---------- */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }
.mb-24 { margin-bottom: 24px; }

/* ---------- 首页双栏布局 ---------- */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 88px;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .home-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .header-inner { padding: 0 12px; }
    .main-nav { gap: 16px; }
    .main-nav a { font-size: 0.85rem; }
    .carousel-slide { height: 280px; }
    .carousel-content { padding: 20px; max-width: 100%; }
    .carousel-title { font-size: 1.3rem; }
    .review-score-panel { flex-direction: column; text-align: center; }
    .footer-inner { grid-template-columns: 1fr; }
    .page-wrapper { padding: 20px 12px; }
}
