/* =============================================
   PlayJoy - 明亮现代风格 | 顶部导航 + 卡片网格
   - 顶部固定导航条
   - 全宽Hero横幅区
   - 分类胶囊横向滚动
   - 瀑布流卡片网格
   - 明亮配色 + 暖色渐变
   ============================================= */

/* ============= CSS Variables ============= */
:root {
    --bg-primary: #f8f9fc;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fefefe;
    --bg-nav: rgba(255, 255, 255, 0.92);
    --bg-footer: #1a1a2e;
    --accent-1: #ff6b6b;
    --accent-2: #ffa726;
    --accent-3: #7c4dff;
    --accent-gradient: linear-gradient(135deg, #ff6b6b, #ffa726);
    --accent-gradient-2: linear-gradient(135deg, #7c4dff, #ff6b6b);
    --accent-gradient-3: linear-gradient(135deg, #ffa726, #ff6b6b);
    --accent-warm: linear-gradient(135deg, #f97316, #ef4444);
    --text-primary: #1a1a2e;
    --text-secondary: #6c6c8a;
    --text-muted: #9e9eb8;
    --border-color: #e8e8f0;
    --border-glow: rgba(255, 107, 107, 0.3);
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 4px 20px rgba(255, 107, 107, 0.15);
    --nav-h: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ============= TOP NAVIGATION BAR ============= */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 24px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-brand .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.nav-brand .logo-text {
    font-size: 22px;
    font-weight: 800;
    background: var(--accent-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* Search in nav */
.nav-search {
    flex: 1;
    max-width: 420px;
    position: relative;
}

.nav-search input {
    width: 100%;
    padding: 10px 44px 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 100px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    outline: none;
    transition: all 0.25s;
    font-family: inherit;
}

.nav-search input::placeholder {
    color: var(--text-muted);
}

.nav-search input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.08);
    background: #fff;
}

.nav-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-search button:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.3);
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Mobile menu is hidden by default on desktop */
.nav-mobile-menu {
    display: none;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-1);
    background: rgba(255, 107, 107, 0.08);
}

.nav-links .nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 6px;
}

/* Hamburger */
.hamburger-btn {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.hamburger-btn:hover {
    border-color: var(--accent-1);
    background: rgba(255, 107, 107, 0.04);
}

/* Mobile overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.nav-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ============= MAIN CONTENT ============= */
.main-content {
    padding-top: var(--nav-h);
    min-height: 100vh;
}

/* ============= HERO SECTION ============= */
.hero-section {
    background: linear-gradient(160deg, #fff5f5 0%, #fff0e6 30%, #f0e6ff 70%, #e6f0ff 100%);
    padding: 56px 40px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255, 107, 107, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 50%, rgba(124, 77, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero-icon {
    font-size: 56px;
    margin-bottom: 16px;
    animation: floatHero 4s ease-in-out infinite;
    display: inline-block;
    position: relative;
    z-index: 1;
}

@keyframes floatHero {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-3deg); }
    75% { transform: translateY(-8px) rotate(3deg); }
}

.hero-section h1 {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -1.5px;
    background: var(--accent-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.hero-section p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 24px;
    position: relative;
    z-index: 1;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-gradient);
    color: #fff;
    padding: 14px 36px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.2px;
    transition: all 0.25s;
    box-shadow: 0 6px 24px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 1;
    text-decoration: none;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(255, 107, 107, 0.4);
}

/* Hero feature cards */
.hero-features {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 36px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.hero-feature-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    cursor: pointer;
}

.hero-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--accent-1);
}

.hero-feature-card .feat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.hero-feature-card .feat-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.hero-feature-card .feat-text span {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============= CATEGORY PILLS ============= */
.category-pills-section {
    padding: 24px 40px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.category-pills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: 100px;
    border: 2px solid var(--border-color);
    background: #fff;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s;
    flex-shrink: 0;
    text-decoration: none;
}

.category-pill:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(255, 107, 107, 0.04);
    transform: translateY(-1px);
}

.category-pill.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.25);
}

.category-pill .pill-icon {
    font-size: 16px;
}

/* ============= CONTENT CONTAINER ============= */
.content-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ============= SECTION HEADER ============= */
.section-header-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-top: 44px;
}

.section-title-new {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-new .icon {
    font-size: 24px;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-1);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 18px;
    border: 2px solid var(--border-color);
    border-radius: 100px;
    transition: all 0.25s;
    text-decoration: none;
}

.view-all-btn:hover {
    background: rgba(255, 107, 107, 0.06);
    border-color: var(--accent-1);
}

/* ============= HORIZONTAL SCROLL ROW ============= */
.scroll-row-wrap {
    position: relative;
    margin-bottom: 12px;
}

.scroll-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 4px 20px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.scroll-row::-webkit-scrollbar { height: 4px; }
.scroll-row::-webkit-scrollbar-track { background: transparent; }
.scroll-row::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
.scroll-row::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Scroll card */
.scroll-card {
    flex: 0 0 auto;
    width: 210px;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: all 0.3s;
}

.scroll-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--accent-1);
}

.scroll-card a {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.scroll-card img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    background: var(--bg-primary);
    transition: transform 0.4s;
}

.scroll-card:hover img {
    transform: scale(1.06);
}

.scroll-card .game-title {
    padding: 12px 14px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid var(--border-color);
    transition: color 0.25s;
}

.scroll-card:hover .game-title {
    color: var(--accent-1);
}

/* Scroll arrows */
.scroll-arrow {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    opacity: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.scroll-row-wrap:hover .scroll-arrow {
    opacity: 1;
}

.scroll-arrow:hover {
    border-color: var(--accent-1);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.15);
}

.scroll-arrow-left { left: -10px; }
.scroll-arrow-right { right: -10px; }

/* ============= GAME CARDS GRID (replaces bento) ============= */
.games-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.game-card-new {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s;
    cursor: pointer;
}

.game-card-new:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--accent-1);
}

.game-card-new a {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.game-card-new img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--bg-primary);
    transition: transform 0.4s;
}

.game-card-new:hover img {
    transform: scale(1.05);
}

.game-card-new .game-title {
    padding: 12px 14px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid var(--border-color);
    transition: color 0.25s;
}

.game-card-new:hover .game-title {
    color: var(--accent-1);
}

/* Category grid (for category.html) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.category-grid .game-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s;
    cursor: pointer;
}

.category-grid .game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--accent-1);
}

.category-grid .game-card a {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.category-grid .game-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--bg-primary);
    transition: transform 0.4s;
}

.category-grid .game-card:hover img {
    transform: scale(1.05);
}

.category-grid .game-card .game-title {
    padding: 12px 14px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid var(--border-color);
    transition: color 0.25s;
}

.category-grid .game-card:hover .game-title {
    color: var(--accent-1);
}

/* ============= LOAD MORE ============= */
.load-more {
    text-align: center;
    margin-top: 44px;
    margin-bottom: 20px;
}

.load-more button {
    background: #fff;
    color: var(--accent-1);
    border: 2px solid var(--border-color);
    padding: 14px 56px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
    box-shadow: var(--shadow-card);
}

.load-more button:hover {
    border-color: var(--accent-1);
    background: rgba(255, 107, 107, 0.04);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.load-more button:disabled {
    background: var(--bg-primary);
    color: var(--text-muted);
    border-color: var(--border-color);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ============= FOOTER ============= */
.site-footer {
    background: var(--bg-footer);
    color: rgba(255, 255, 255, 0.7);
    padding: 36px 40px;
    margin-top: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.site-footer .footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.site-footer .footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.site-footer .footer-links a:hover {
    color: #fff;
}

.site-footer span {
    font-size: 12px;
    opacity: 0.6;
}

/* ============= BACK TO TOP ============= */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    z-index: 900;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.back-to-top.show { display: flex; }

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* ============= LOADING ============= */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 100001;
    transition: opacity 0.35s;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    animation: bounce 0.6s infinite alternate;
}

.loading-dot:nth-child(2) { animation-delay: 0.15s; background: #ffa726; box-shadow: 0 0 10px rgba(255, 167, 38, 0.5); }
.loading-dot:nth-child(3) { animation-delay: 0.3s; background: #7c4dff; box-shadow: 0 0 10px rgba(124, 77, 255, 0.5); }

@keyframes bounce {
    from { transform: translateY(0); opacity: 0.4; }
    to { transform: translateY(-12px); opacity: 1; }
}

/* ============= CATEGORY PAGE STYLES ============= */
.category-hero {
    text-align: center;
    padding: 44px 40px;
    background: linear-gradient(160deg, #fff5f5 0%, #f0e6ff 100%);
    border-bottom: 1px solid var(--border-color);
}

.category-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    background: var(--accent-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ============= DETAIL PAGE ============= */
.app-container {
    padding: 0;
}

.game {
    max-width: 100%;
    margin: 0;
    padding: 32px 40px 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.game-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: none;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: border-color 0.3s;
}

.game-preview:hover {
    border-color: var(--accent-1);
}

.game-preview-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    text-align: center;
    z-index: 2;
}

.game-preview-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.game-preview-icon img {
    width: 110px;
    height: 110px;
    border-radius: 22px;
    object-fit: cover;
    border: 3px solid var(--border-color);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s;
}

.game-preview:hover .game-preview-icon img {
    border-color: var(--accent-1);
}

.game-preview-title {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    max-width: 90%;
    line-height: 1.2;
}

.play-game-btn {
    border: none;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 48px;
    border-radius: 100px;
    cursor: pointer;
    letter-spacing: -0.2px;
    box-shadow: 0 6px 24px rgba(255, 107, 107, 0.3);
    transition: all 0.25s;
    font-family: inherit;
}

.play-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(255, 107, 107, 0.4);
}

.play-game-btn:active { transform: scale(0.96); }

.game-iframe-wrap {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.game-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.game-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.game-close-btn:hover {
    background: #fff;
    transform: scale(1.08);
}

.game-detail-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-actions-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
    letter-spacing: -0.2px;
}

.action-btn:hover {
    border-color: var(--accent-1);
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.1);
}

.action-btn .icon { font-size: 17px; }

.game-intro {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-card);
}

.game-intro h2 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.game-intro p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.install-btn { display: none; }

.similar-games-section {
    max-width: none;
    padding: 0 40px;
    margin-top: 44px;
}

.game > .similar-games-section {
    grid-column: 1 / -1;
    margin-top: 44px;
    max-width: none;
    padding: 0;
}

.similar-games-section .section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.similar-games-section .section-title .icon {
    font-size: 24px;
}

.similar-games-scroll-wrap { position: relative; }

.similar-games-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 20px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.similar-games-scroll::-webkit-scrollbar { height: 4px; }
.similar-games-scroll::-webkit-scrollbar-track { background: transparent; }
.similar-games-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
.similar-games-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.similar-game-card {
    flex: 0 0 auto;
    width: 160px;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: all 0.3s;
}

.similar-game-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--accent-1);
}

.similar-game-card a {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.similar-game-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--bg-primary);
    transition: transform 0.3s;
}

.similar-game-card:hover img {
    transform: scale(1.04);
}

.similar-game-card .game-title {
    padding: 10px 12px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid var(--border-color);
}

/* Fullscreen game */
.app-module {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 99999;
}

.app-module iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

.app-module .game-close-btn {
    position: fixed;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* No results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 16px;
    grid-column: 1 / -1;
}

.no-results-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 1400px) {
    .games-grid,
    .category-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1200px) {
    .games-grid,
    .category-grid { grid-template-columns: repeat(3, 1fr); }

    .game {
        grid-template-columns: 1fr !important;
        padding: 24px 28px 48px !important;
    }
}

@media (max-width: 960px) {
    .top-nav {
        padding: 0 20px;
        gap: 12px;
    }

    .nav-links a {
        padding: 6px 12px;
        font-size: 12px;
    }

    .nav-search {
        max-width: 220px;
    }

    .hero-section { padding: 40px 20px 32px; }
    .hero-section h1 { font-size: 30px; }

    .content-container { padding: 0 20px; }

    .games-grid,
    .category-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }

    .game {
        padding: 20px 20px 40px !important;
    }

    .similar-games-section { padding: 0 20px !important; }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 0 16px;
        gap: 10px;
    }

    .hamburger-btn { display: flex; }

    .nav-links { display: none; }

    .nav-search { max-width: 200px; }

    /* Mobile menu drawer */
    .nav-mobile-menu {
        display: none;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        z-index: 998;
        flex-direction: column;
        padding: 20px;
        overflow-y: auto;
    }

    .nav-mobile-menu.open { display: flex; }

    .nav-mobile-menu a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
        border-radius: var(--radius-md);
        font-size: 15px;
        font-weight: 600;
        color: var(--text-primary);
        transition: all 0.2s;
    }

    .nav-mobile-menu a:hover,
    .nav-mobile-menu a.active {
        background: rgba(255, 107, 107, 0.08);
        color: var(--accent-1);
    }

    .nav-mobile-menu .mobile-nav-divider {
        height: 1px;
        background: var(--border-color);
        margin: 12px 0;
    }

    .hero-section { padding: 36px 16px 28px; }
    .hero-section h1 { font-size: 26px; }
    .hero-section p { font-size: 14px; }

    .hero-features {
        flex-direction: column;
        align-items: center;
    }

    .hero-feature-card {
        width: 100%;
        max-width: 360px;
    }

    .category-pills-section { padding: 16px; }

    .content-container { padding: 0 16px; }

    .games-grid,
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .section-header-new { padding-top: 32px; }
    .section-title-new { font-size: 18px; }

    .scroll-card { width: 160px; }
    .scroll-arrow { display: none !important; }

    .category-hero { padding: 32px 20px 24px; }
    .category-title { font-size: 24px; }

    .game {
        padding: 16px 16px 36px !important;
        gap: 20px;
    }

    .game-preview-title { font-size: 18px; }

    .site-footer {
        padding: 24px 20px;
        flex-direction: column;
        text-align: center;
    }

    .site-footer .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
    .top-nav {
        height: 56px;
        padding: 0 12px;
        gap: 8px;
    }

    .nav-brand .logo-icon { width: 30px; height: 30px; border-radius: 8px; font-size: 16px; }
    .nav-brand .logo-text { font-size: 16px; }

    .nav-search { max-width: 150px; }
    .nav-search input { font-size: 12px; padding: 8px 36px 8px 12px; }
    .nav-search button { width: 28px; height: 28px; font-size: 13px; }

    .hero-section { padding: 32px 14px 24px; }
    .hero-section h1 { font-size: 22px; }
    .hero-icon { font-size: 40px; }

    .hero-features { gap: 10px; margin-top: 24px; }
    .hero-feature-card { padding: 16px 20px; }

    .scroll-card { width: 140px; }
    .scroll-card .game-title { font-size: 11px; padding: 8px 10px 12px; }

    .games-grid,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .game-card-new .game-title,
    .category-grid .game-card .game-title {
        font-size: 11px;
        padding: 8px 10px 12px;
    }

    .similar-games-scroll {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        overflow-x: visible;
        padding: 0;
    }

    .similar-game-card { width: 100%; }
    .similar-game-card .game-title { font-size: 10px; padding: 6px 8px 10px; }

    .back-to-top { bottom: 16px; right: 16px; width: 38px; height: 38px; }
}
