/* ==========================================================================
   PixesGame - 深色沉浸式游戏风格样式
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
    /* 主色调 */
    --bg-primary: #0a0a12;
    --bg-secondary: #12121f;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252540;

    /* 强调色 */
    --accent-primary: #ff6b35;
    --accent-secondary: #f7931e;
    --accent-gradient: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff6b35 100%);

    /* 文字色 */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b80;

    /* 边框/分隔 */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 107, 53, 0.3);

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(255, 107, 53, 0.2);

    /* 布局 */
    --header-height: 70px;
    --container-max: 1400px;
    --card-radius: 16px;

    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* --------------------------------------------------------------------------
   Base Styles
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景纹理 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255, 107, 53, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(247, 147, 30, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.h1 img {
    width: 28px;
    height: 28px;
}

.h2 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
header.main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(10, 10, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

header.main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--accent-primary) 50%,
            transparent 100%);
    opacity: 0.3;
}

.main-section {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header内部布局 */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 2rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    height: 40px;
    width: auto;
    transition: transform var(--transition-normal);
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

/* 桌面端导航 */
.desktop-nav {
    display: flex;
    align-items: center;
}

.desktop-nav ul {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-nav ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.desktop-nav ul li a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.desktop-nav ul li a img {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

/* 移动端导航 */
.mobile-nav {
    display: none;
    position: relative;
}

.mobile-nav input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.openIcon {
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.openIcon:hover {
    background: rgba(255, 255, 255, 0.05);
}

.openIcon svg {
    width: 24px;
    height: 24px;
    fill: var(--text-primary);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(10, 10, 18, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    min-width: 180px;
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.mobile-menu ul li a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-menu ul li a img {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    transition: transform var(--transition-normal);
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */
.app-container {
    position: relative;
    z-index: 1;
    padding-top: var(--header-height);
    min-height: 100vh;
}

.content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   Games Grid
   -------------------------------------------------------------------------- */
.main-section h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.main-section h2 img {
    width: 28px;
    height: 28px;
}

/* 游戏列表容器 */
ul.games,
.games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 游戏卡片 */
ul.games li,
.games li {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

ul.games li:hover,
.games li:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

ul.games li a,
.games li a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 游戏图标容器 */
ul.games li .icon,
.games li .icon {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-secondary);
}

ul.games li .icon .clamp,
.games li .icon .clamp {
    position: absolute;
    inset: 0;
    margin: 0;
    width: 100%;
    padding-bottom: 100%;
}

ul.games li .icon img,
.games li .icon img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

ul.games li:hover .icon img,
.games li:hover .icon img {
    transform: scale(1.08);
}

/* 游戏名称 */
.name-container {
    padding: 0.75rem;
}

.name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Homepage Recommended Carousel
   -------------------------------------------------------------------------- */
.recommended-carousel {
    position: relative;
    width: min(100%, 1080px);
    margin: 0 auto 28px;
    padding: 0 76px;
}

.recommended-carousel .recommended-carousel-list {
    display: block;
    grid-template-columns: none;
    gap: 0;
    margin: 0;
    min-height: 252px;
    padding: 0;
}

.recommended-carousel .recommended-carousel-item {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
}

/* JS 初始化前，先展示第一张，避免首屏闪烁为普通列表 */
.recommended-carousel:not([data-carousel-initialized="1"]) .recommended-carousel-item:first-child,
.recommended-carousel .recommended-carousel-item.is-active {
    display: block;
}

.recommended-carousel .recommended-carousel-item:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.recommended-carousel .recommended-carousel-link {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(140deg, rgba(26, 26, 46, .98) 0%, rgba(24, 24, 40, .96) 46%, rgba(34, 26, 22, .92) 100%);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
    text-align: left;
    color: var(--text-primary);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.recommended-carousel .recommended-carousel-link:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 107, 53, .5);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .52), 0 0 24px rgba(255, 107, 53, .2);
    color: var(--text-primary);
}

.recommended-carousel .recommended-media {
    flex: 0 0 220px;
}

.recommended-carousel .recommended-carousel-item .icon {
    width: 220px;
    height: 220px;
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .4);
}

.recommended-carousel .recommended-carousel-item .icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommended-carousel .recommended-content {
    flex: 1;
    min-width: 0;
}

.recommended-carousel .recommended-content .name-container {
    margin-bottom: 10px;
}

.recommended-carousel .recommended-content .name {
    font-size: clamp(1.3rem, 2.2vw, 1.9rem);
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommended-carousel .recommended-desc {
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 1rem;
    line-height: 1.65;
    max-width: 62ch;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2.5rem;
    background: var(--accent-gradient);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.4);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-highlight,
.play-btn {
    background: var(--accent-gradient);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    display: inline-block;
    text-decoration: none;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.btn-highlight:hover,
.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.5);
    color: white;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer.main {
    position: relative;
    z-index: 1;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.tags {
    margin-bottom: 1.5rem;
}

.tags nav.main ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.tags nav.main ul li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.tags nav.main ul li a:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.tags nav.main ul li a img {
    width: 16px;
    height: 16px;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* --------------------------------------------------------------------------
   Back to Top
   -------------------------------------------------------------------------- */
.backToTop {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    transition: all var(--transition-fast);
    cursor: pointer;
    z-index: 999;
}

.backToTop:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.backToTop img {
    width: 24px;
    height: 24px;
}

/* --------------------------------------------------------------------------
   Game Detail Page
   -------------------------------------------------------------------------- */
.game .background {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.game .background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(10, 10, 18, 0.7) 0%,
            rgba(10, 10, 18, 0.9) 100%);
}

.backgroundDarken {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem 1.5rem;
}

.backgroundDarken .main-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.backgroundDarken .icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.backgroundDarken .icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.backgroundDarken h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin: 0;
}

.play-btn-container {
    margin-top: 0.5rem;
}

.similarGames {
    margin-top: 2rem;
}

.similarGames h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Detail Editorial Content
   -------------------------------------------------------------------------- */
.game-editorial-content {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.game-editorial-content .editorial-panel {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(18, 18, 31, 0.95) 100%);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    border-radius: 16px;
    padding: 1.25rem 1.25rem 1.1rem 1.15rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.game-editorial-content .editorial-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top right, rgba(255, 107, 53, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.game-editorial-content .editorial-panel::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 17px;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 107, 53, 0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

/* Section Title with Icon */
.game-editorial-content .section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.6rem;
    font-size: clamp(1.05rem, 1.85vw, 1.22rem);
    line-height: 1.35;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.game-editorial-content .section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.game-editorial-content .section-icon svg {
    width: 20px;
    height: 20px;
}

.game-editorial-content .how-to-play-panel .section-icon {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.game-editorial-content .features-panel .section-icon {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.game-editorial-content .tips-panel .section-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.game-editorial-content .faq-panel .section-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.game-editorial-content .safety-panel .section-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Hover effect on icon */
.game-editorial-content .editorial-panel:hover .section-icon {
    transform: scale(1.1);
}

.game-editorial-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.72;
    font-size: 1rem;
    max-width: 100%;
}

/* How to Play enhanced content */
.game-editorial-content .how-to-play-content {
    position: relative;
    padding-left: 1rem;
}

.game-editorial-content .how-to-play-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #f97316 0%, #fb923c 50%, #f97316 100%);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
}

.game-editorial-content .how-to-play-content p {
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.game-editorial-content .feature-list {
    list-style: none;
    margin: 0.2rem 0 0;
    padding-left: 0;
    display: grid;
    gap: 0.6rem;
}

.game-editorial-content .feature-list li {
    padding: 0.6rem 0 0.6rem 2rem;
    border: 0;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.08);
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    transition: all 0.2s ease;
}

.game-editorial-content .feature-list li:hover {
    background: rgba(168, 85, 247, 0.15);
    transform: translateX(4px);
}

.game-editorial-content .feature-list li::before {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

/* FAQ Accordion */
.game-editorial-content .faq-accordion {
    display: grid;
    gap: 0.6rem;
}

.game-editorial-content .faq-item {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-editorial-content .faq-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.05);
}

.game-editorial-content .faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.45;
    transition: all 0.25s ease;
}

.game-editorial-content .faq-header:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.game-editorial-content .faq-question {
    flex: 1;
}

.game-editorial-content .faq-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    transition: all 0.25s ease;
}

.game-editorial-content .faq-toggle .toggle-icon {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-editorial-content .faq-item[data-expanded="true"] .faq-toggle {
    background: #3b82f6;
    color: #fff;
    transform: rotate(180deg);
}

.game-editorial-content .faq-item[data-expanded="true"] .faq-toggle .toggle-icon {
    transform: rotate(180deg);
}

.game-editorial-content .faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
}

.game-editorial-content .faq-item[data-expanded="true"] .faq-content {
    max-height: 300px;
}

.game-editorial-content .faq-content p {
    padding: 0 1rem 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Legacy FAQ support (for non-accordion version) */
.game-editorial-content .faq-list {
    display: grid;
    gap: 0.7rem;
}

.game-editorial-content .faq-list .faq-item h3 {
    margin: 0 0 0.32rem;
    font-size: 0.99rem;
    line-height: 1.45;
    color: var(--text-primary);
}

.game-editorial-content .faq-list .faq-item p {
    font-size: 0.96rem;
}

.game-editorial-content .how-to-play-panel {
    border-left-color: #f97316;
    border-image: linear-gradient(180deg, #f97316, #fb923c) 1;
}

.game-editorial-content .features-panel {
    border-left-color: #a855f7;
}

.game-editorial-content .tips-panel {
    border-left-color: #10b981;
}

.game-editorial-content .faq-panel {
    border-left-color: #3b82f6;
}

.game-editorial-content .safety-panel {
    border-left-color: #f59e0b;
}

.game-editorial-content .editorial-panel:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 107, 53, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 20px rgba(255, 107, 53, 0.15);
}

.game-editorial-content .editorial-panel:hover::after {
    opacity: 1;
}

.game-editorial-content .editorial-panel:hover .section-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Section Title with Icon */
.game-editorial-content .section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.75rem;
    font-size: clamp(1.1rem, 1.9vw, 1.3rem);
    line-height: 1.35;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    font-weight: 600;
}

.game-editorial-content .section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.game-editorial-content .section-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
}

.game-editorial-content .section-icon svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

.game-editorial-content .editorial-panel:hover .section-icon {
    transform: scale(1.1);
}

/* 宽屏利用率优化：详情内容改为分栏布局 */
@media (min-width: 1100px) {
    .game-editorial-content {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 1.1rem;
        align-items: stretch;
    }

    .game-editorial-content .how-to-play-panel {
        grid-column: span 7;
    }

    .game-editorial-content .features-panel {
        grid-column: span 5;
    }

    .game-editorial-content .tips-panel,
    .game-editorial-content .faq-panel {
        grid-column: span 6;
    }

    .game-editorial-content .safety-panel {
        grid-column: 1 / -1;
    }
}

/* --------------------------------------------------------------------------
   Category Page
   -------------------------------------------------------------------------- */
.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.category-title img {
    width: 28px;
    height: 28px;
}

/* --------------------------------------------------------------------------
   Loading Animation
   -------------------------------------------------------------------------- */
.loading-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    animation: fadeOut 0.3s ease 1s forwards;
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots div {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots div:nth-child(2) {
    animation-delay: 0.16s;
    background: var(--accent-secondary);
}

.loading-dots div:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */

/* Large Desktop */
@media (min-width: 1200px) {

    ul.games,
    .games {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* Desktop */
@media (max-width: 1024px) {
    .main-section {
        padding: 0 1.25rem;
    }

    ul.games,
    .games {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 980px) {
    .recommended-carousel {
        padding: 0 56px;
    }

    .recommended-carousel .recommended-media {
        flex-basis: 176px;
    }

    .recommended-carousel .recommended-carousel-item .icon {
        width: 176px;
        height: 176px;
    }

    .recommended-carousel .recommended-content .name {
        font-size: 1.35rem;
    }

    .recommended-carousel .recommended-desc {
        font-size: .95rem;
        -webkit-line-clamp: 3;
    }
}

/* Tablet */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .header-inner {
        gap: 1rem;
    }

    .logo-text {
        display: none;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .content {
        padding: 1.5rem 1rem;
    }

    ul.games,
    .games {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.875rem;
    }

    .game .background {
        min-height: 300px;
    }

    .game-editorial-content .editorial-panel {
        padding: 0.9rem 0.9rem 0.88rem 0.82rem;
    }

    .game-editorial-content .section-icon {
        width: 28px;
        height: 28px;
    }

    .game-editorial-content .section-icon svg {
        width: 18px;
        height: 18px;
    }

    .game-editorial-content .feature-list li {
        padding: 0.4rem 0 0.4rem 1.5rem;
    }

    .game-editorial-content .feature-list li::before {
        width: 8px;
        height: 8px;
    }

    .game-editorial-content .feature-list li:hover {
        transform: translateX(2px);
    }

    .game-editorial-content .faq-header {
        padding: 0.65rem 0.72rem;
    }

    .game-editorial-content .faq-content p {
        padding: 0 0.72rem 0.65rem;
    }

    .game-editorial-content .faq-list .faq-item {
        padding: 0.65rem 0.72rem;
        border-radius: 9px;
    }

    .game-editorial-content .faq-list .faq-item h3 {
        font-size: 0.95rem;
    }

    .game-editorial-content .faq-list .faq-item p {
        font-size: 0.93rem;
    }

    .backgroundDarken .icon {
        width: 100px;
        height: 100px;
        border-radius: 20px;
    }

    .tags nav.main ul li a {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 760px) {
    .recommended-carousel {
        padding: 0 44px;
        max-width: 100%;
    }

    .recommended-carousel .recommended-carousel-list {
        min-height: 176px;
    }

    .recommended-carousel .recommended-carousel-link {
        gap: 14px;
        padding: 14px;
        border-radius: 16px;
    }

    .recommended-carousel .recommended-media {
        flex-basis: 108px;
    }

    .recommended-carousel .recommended-carousel-item .icon {
        width: 108px;
        height: 108px;
        border-radius: 12px;
    }

    .recommended-carousel .recommended-content .name {
        font-size: 1.04rem;
    }

    .recommended-carousel .recommended-desc {
        font-size: .88rem;
        -webkit-line-clamp: 2;
    }
}

/* Mobile - 更大卡片 */
@media (max-width: 480px) {
    .content {
        padding: 1rem 0.75rem;
    }

    .game-editorial-content {
        gap: 0.9rem;
    }

    .game-editorial-content .editorial-panel {
        border-radius: 11px;
        padding: 0.84rem 0.78rem 0.82rem 0.74rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
    }

    .game-editorial-content .section-title {
        font-size: 1rem;
    }

    .game-editorial-content .section-icon {
        width: 26px;
        height: 26px;
    }

    .game-editorial-content .section-icon svg {
        width: 16px;
        height: 16px;
    }

    .game-editorial-content h2 {
        margin-bottom: 0.48rem;
        font-size: 1.02rem;
    }

    .game-editorial-content p,
    .game-editorial-content .feature-list li {
        font-size: 0.95rem;
        line-height: 1.68;
    }

    .game-editorial-content .faq-header {
        padding: 0.6rem 0.66rem;
    }

    .game-editorial-content .faq-content p {
        padding: 0 0.66rem 0.6rem;
        font-size: 0.91rem;
    }

    .game-editorial-content .faq-list .faq-item {
        padding: 0.6rem 0.66rem;
    }

    .game-editorial-content .faq-list .faq-item h3 {
        font-size: 0.92rem;
    }

    .game-editorial-content .faq-list .faq-item p {
        font-size: 0.91rem;
    }

    ul.games,
    .games {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    /* 移动端更大卡片 */
    ul.games li,
    .games li {
        border-radius: 12px;
    }

    .name-container {
        padding: 0.6rem;
    }

    .name {
        font-size: 0.75rem;
    }

    .h1 {
        font-size: 1.25rem;
    }

    .h2 {
        font-size: 1.1rem;
    }

    .backgroundDarken .icon {
        width: 80px;
        height: 80px;
        border-radius: 16px;
    }

    .backgroundDarken h1 {
        font-size: 1.5rem;
    }

    .btn-primary {
        padding: 0.75rem 1.75rem;
        font-size: 0.9rem;
    }

    .footer-content {
        padding: 1.5rem 1rem;
    }

    /* 游戏列表页移动端优化 - 更大卡片 */
    .main-section>ul.games,
    .main-section>.games {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-section>ul.games li,
    .main-section>.games li {
        margin-bottom: 0;
    }

    /* 确保卡片高度一致 */
    ul.games li .icon,
    .games li .icon {
        min-height: 100px;
    }

    /* 详情页相似游戏移动端优化 */
    .similarGames ul.games,
    .similarGames .games {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .similarGames ul.games li .icon,
    .similarGames .games li .icon {
        min-height: 80px;
    }
}

@media (max-width: 520px) {
    .recommended-carousel {
        padding: 0 10px;
    }

    .recommended-carousel .recommended-carousel-link {
        gap: 12px;
        padding: 12px;
    }

    .recommended-carousel .recommended-media {
        flex-basis: 88px;
    }

    .recommended-carousel .recommended-carousel-item .icon {
        width: 88px;
        height: 88px;
    }
}

/* Small Mobile - 最大程度利用屏幕 */
@media (max-width: 360px) {

    ul.games,
    .games {
        gap: 0.5rem;
    }

    .name {
        font-size: 0.7rem;
    }

    .name-container {
        padding: 0.4rem;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {

    ul.games li:hover,
    .games li:hover {
        transform: none;
    }

    ul.games li:active,
    .games li:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(255, 107, 53, 0.3);
    color: white;
}

/* --------------------------------------------------------------------------
   Consent Popup (GDPR)
   -------------------------------------------------------------------------- */
#consentPopup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
}

.consent-box-holder {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.consent-box {
    background: var(--bg-card);
    max-width: 450px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.consent-box-logo {
    display: inline-block;
    width: 140px;
    height: 60px;
    margin-bottom: 1.5rem;
}

.consent-box-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.consent-box-message {
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.consent-box-message strong {
    color: var(--text-primary);
}

.consent-box-button {
    display: inline-block;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
    text-decoration: none;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    background: var(--accent-gradient);
    color: #fff;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.consent-box-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.4);
}

.consent-box-links {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.consent-box-links a {
    color: var(--accent-primary);
    transition: color var(--transition-fast);
}

.consent-box-links a:hover {
    color: var(--accent-secondary);
}

/* --------------------------------------------------------------------------
   Game Fullscreen Module
   -------------------------------------------------------------------------- */
.app-module {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background-color: #0a0a12 !important;
    overflow: hidden !important;
}

.app-module iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

.app-module .setting {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    cursor: pointer !important;
    z-index: 10000 !important;
}

.app-module .setting img {
    width: 40px !important;
    height: 40px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 8px !important;
    padding: 8px !important;
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumb {
    max-width: var(--container-max);
    margin: 0 auto 1rem;
    padding: 1.5rem 1.5rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.breadcrumb-separator {
    color: var(--text-muted);
    opacity: 0.3;
    display: flex;
    align-items: center;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 10px;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Welcome Section (Homepage)
   -------------------------------------------------------------------------- */
.welcome-section {
    margin-bottom: 3.5rem;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.7) 0%, rgba(20, 20, 35, 0.8) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(228, 76, 37, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-section h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fff 0%, #e44c25 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-content {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    line-height: 1.8;
}

.welcome-content p {
    margin-bottom: 1.5rem;
}

.welcome-content strong {
    color: var(--accent-primary);
    font-weight: 600;
}

.welcome-content em {
    color: #fff;
    font-style: normal;
    font-weight: 500;
    border-bottom: 1px dashed rgba(228, 76, 37, 0.4);
}

@media (max-width: 768px) {
    .welcome-section {
        padding: 1.75rem;
        margin-bottom: 2.5rem;
        border-radius: 16px;
    }
    
    .welcome-section h1 {
        font-size: 1.6rem;
    }
    
    .welcome-content {
        font-size: 1rem;
    }

    .breadcrumb {
        padding: 1rem 1rem 0.5rem;
        margin-bottom: 0.5rem;
        font-size: 0.75rem;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* --------------------------------------------------------------------------
   Interactive Elements
   -------------------------------------------------------------------------- */
.games li a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.games li a:hover {
    transform: translateY(-5px);
    filter: brightness(1.1);
}

.games li a:hover .icon {
    box-shadow: 0 10px 20px rgba(228, 76, 37, 0.3);
    border-color: var(--accent-primary);
}

.btn-primary, .btn-highlight {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover, .btn-highlight:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(228, 76, 37, 0.4);
}

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

.btn-primary:hover::after, .btn-highlight:hover::after {
    left: 100%;
}