/**
 * PlayHux 2026 - Modern HTML5 Gaming Platform
 * Clean, High-Performance, Mobile-First Stylesheet
 */

:root {
    --bg-darkest: #07080d;
    --bg-primary: #0a0c14;
    --bg-secondary: #101422;
    --bg-card: #151a2e;
    --bg-card-hover: #1c233d;
    --bg-glass: rgba(16, 20, 34, 0.75);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(99, 102, 241, 0.35);
    --border-glow: 0 0 20px rgba(99, 102, 241, 0.3);

    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    --accent-purple: #a855f7;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
    --accent-gradient-fire: linear-gradient(135deg, #f43f5e 0%, #f59e0b 100%);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background-color: var(--bg-darkest);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background: radial-gradient(circle at 50% 0%, #151a30 0%, var(--bg-darkest) 70%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #252e4d;
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

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

img, svg {
    display: block;
    max-width: 100%;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

/* Site Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 12, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo .logo-img {
    height: 42px;
    width: auto;
    transition: var(--transition);
}

.brand-logo:hover .logo-img {
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

/* Header Search */
.search-box-wrapper {
    position: relative;
    flex: 1;
    max-width: 520px;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    transition: var(--transition);
}

.search-form:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: var(--bg-card);
}

.search-icon {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-right: 12px;
}

.search-input {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.92rem;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-shortcut {
    display: inline-block;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    pointer-events: none;
}

/* Live Search Results Popup */
.search-live-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card), 0 20px 40px rgba(0,0,0,0.8);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 150;
    padding: 8px;
}

.search-live-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

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

.search-live-thumb {
    width: 48px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
}

.search-live-info {
    flex: 1;
}

.search-live-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.search-live-category {
    font-size: 0.78rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-action-icon {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-action-icon:hover {
    background: var(--bg-card-hover);
    color: var(--accent-rose);
    border-color: var(--accent-rose);
}

.action-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-rose);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

.btn-action-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-action-pill:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Mobile Hamburger Button */
.mobile-toggle-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.hamburger-bar {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-toggle-btn.active .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-toggle-btn.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}
.mobile-toggle-btn.active .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Category Scrolling Navigation Bar */
.category-nav-bar {
    background: rgba(16, 20, 34, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.category-scroll-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.category-scroll-container::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
}

.cat-pill:hover,
.cat-pill.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

/* Mobile Off-Canvas Drawer */
.mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 310px;
    max-width: 85vw;
    background: #0d101c;
    border-left: 1px solid var(--border-subtle);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    z-index: 210;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.drawer-close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.mobile-search-form {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    margin-bottom: 24px;
}

.mobile-search-input {
    flex: 1;
    font-size: 0.9rem;
    color: #fff;
    padding: 6px 0;
}

.mobile-search-submit {
    color: var(--accent-primary);
    padding: 6px;
    cursor: pointer;
}

.drawer-section {
    margin-bottom: 24px;
}

.drawer-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.drawer-menu-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.92rem;
    transition: var(--transition);
}

.drawer-item i {
    width: 20px;
    font-size: 1rem;
    color: var(--accent-primary);
}

.drawer-item:hover,
.drawer-item.active {
    background: var(--bg-card);
    color: #fff;
}

.drawer-count {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Main Content Layout */
.site-main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

/* Ad Placement Containers (0 Cumulative Layout Shift) */
.ad-wrapper {
    margin: 20px auto;
    text-align: center;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: var(--text-muted);
    margin-bottom: 6px;
    user-select: none;
}

.ad-container {
    background: rgba(16, 20, 34, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.ad-leaderboard {
    min-height: 90px;
    max-width: 728px;
}

.ad-sidebar {
    min-height: 250px;
    max-width: 300px;
}

.ad-billboard {
    min-height: 90px;
    max-width: 970px;
}

.ad-placeholder {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.ad-ph-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.ad-ph-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* In-Feed Ad Card */
.ad-feed-card {
    background: linear-gradient(145deg, rgba(21, 26, 46, 0.8), rgba(16, 20, 34, 0.8));
    border: 1px dashed rgba(99, 102, 241, 0.3) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 280px;
}

.ad-feed-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ad-placeholder-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.ad-ph-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}

/* Hero Featured Section */
.hero-featured-banner {
    position: relative;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #181d33 0%, #0d1120 100%);
    border: 1px solid var(--border-subtle);
    padding: 40px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 36px;
    align-items: center;
    overflow: hidden;
    margin-bottom: 36px;
    box-shadow: var(--shadow-card);
}

.hero-featured-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(244, 63, 94, 0.18);
    border: 1px solid rgba(244, 63, 94, 0.4);
    border-radius: var(--radius-full);
    color: var(--accent-rose);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 34px;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.5);
    transition: var(--transition);
}

.btn-primary-hero:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px -5px rgba(99, 102, 241, 0.7);
}

.hero-stats-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hero-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.hero-stat-item i {
    color: var(--accent-amber);
}

.hero-visual {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-thumb-link {
    display: block;
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.hero-thumb-link:hover {
    transform: scale(1.03) rotate(0.5deg);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

/* Section Headers */
.section-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 22px;
}

.section-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--accent-primary);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.section-link-more {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.section-link-more:hover {
    color: var(--accent-cyan);
    transform: translateX(4px);
}

/* Game Cards Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.game-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.8), var(--shadow-glow);
}

.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-secondary);
}

.card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .card-thumb {
    transform: scale(1.06);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
    background: rgba(10, 12, 20, 0.85);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(4px);
    color: #fff;
    z-index: 2;
}

.card-badge.trending {
    background: var(--accent-gradient-fire);
    border-color: transparent;
}
.card-badge.hot {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-color: transparent;
}
.card-badge.popular {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    border-color: transparent;
}

.btn-card-fav {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(10, 12, 20, 0.85);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(4px);
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: var(--transition);
}

.btn-card-fav:hover,
.btn-card-fav.active {
    background: var(--accent-rose);
    border-color: transparent;
    color: #fff;
    transform: scale(1.1);
}

.card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-category-pill {
    color: var(--accent-cyan);
    font-weight: 600;
}

.card-rating-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-amber);
    font-weight: 700;
}

/* Single Game Page Layout (game.php) */
.game-layout-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}

.game-stage-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Breadcrumbs */
.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.breadcrumb-trail a:hover {
    color: var(--accent-primary);
}

.breadcrumb-sep {
    font-size: 0.7rem;
    opacity: 0.5;
}

.breadcrumb-curr {
    color: var(--text-primary);
    font-weight: 600;
}

/* Game Player Frame */
.game-player-card {
    background: #000;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    position: relative;
    transition: var(--transition);
}

.game-iframe-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #070912;
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Theater Mode Styles */
body.theater-mode-active .site-header,
body.theater-mode-active .site-footer,
body.theater-mode-active .game-sidebar,
body.theater-mode-active .ad-header-slot,
body.theater-mode-active .editorial-section {
    display: none !important;
}

body.theater-mode-active .site-main-content {
    max-width: 100% !important;
    padding: 0 !important;
}

body.theater-mode-active .game-layout-container {
    grid-template-columns: 1fr !important;
}

body.theater-mode-active .game-player-card {
    border-radius: 0;
    border: none;
    height: 90vh;
}

body.theater-mode-active .game-iframe-wrapper {
    height: calc(90vh - 60px);
    aspect-ratio: unset;
}

/* Game Player Control Toolbar */
.game-toolbar {
    background: var(--bg-card);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-subtle);
}

.game-tool-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tool-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
}

.tool-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: var(--accent-cyan);
    font-size: 0.75rem;
    font-weight: 700;
}

.game-tool-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-tool {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-tool:hover {
    background: var(--bg-card-hover);
    color: #fff;
    border-color: var(--border-accent);
}

.btn-tool.btn-fav-tool.active {
    background: var(--accent-rose);
    border-color: transparent;
    color: #fff;
}

/* Editorial Content Block */
.editorial-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-top: 24px;
}

.editorial-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.editorial-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.editorial-prose {
    font-size: 0.98rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.editorial-prose p {
    margin-bottom: 16px;
}

/* Controls Guide Table */
.controls-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 28px;
}

.controls-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls-card-title i {
    color: var(--accent-cyan);
}

.controls-table {
    width: 100%;
    border-collapse: collapse;
}

.controls-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.controls-table tr:last-child {
    border-bottom: none;
}

.controls-table th,
.controls-table td {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.9rem;
}

.controls-table th {
    color: var(--text-muted);
    font-weight: 700;
    width: 25%;
}

.controls-table td {
    color: var(--text-primary);
}

/* Features List */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.feature-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-box i {
    color: var(--accent-emerald);
    margin-top: 4px;
}

.feature-box span {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* FAQ Accordion */
.faq-accordion-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.faq-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-question-btn {
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.faq-question-btn i {
    transition: transform 0.25s ease;
    color: var(--accent-primary);
}

.faq-card.open .faq-question-btn i {
    transform: rotate(180deg);
}

.faq-answer-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
}

.faq-card.open .faq-answer-panel {
    max-height: 250px;
    padding: 0 20px 20px;
}

/* Sidebar Styling */
.game-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-games-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-game-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-game-row:hover {
    background: var(--bg-secondary);
}

.sidebar-thumb {
    width: 60px;
    height: 45px;
    border-radius: 6px;
    object-fit: cover;
}

.sidebar-info {
    flex: 1;
    overflow: hidden;
}

.sidebar-game-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-game-cat {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Legal & Static Content Pages (privacy.php, terms.php, etc.) */
.static-page-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 44px;
    max-width: 960px;
    margin: 0 auto;
}

.static-page-title {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
}

.static-page-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.static-content-body h2 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    margin: 32px 0 14px;
}

.static-content-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 20px 0 10px;
}

.static-content-body p {
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.8;
    margin-bottom: 18px;
}

.static-content-body ul {
    margin: 12px 0 20px 24px;
    color: var(--text-secondary);
}

.static-content-body li {
    margin-bottom: 8px;
}

/* Contact Form Styling */
.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: var(--bg-card);
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

.btn-submit-contact {
    padding: 14px 32px;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 800;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    transition: var(--transition);
}

.btn-submit-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.6);
}

/* Footer Styling */
.site-footer {
    background: #06070a;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand-logo {
    display: inline-block;
    margin-bottom: 16px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 400px;
}

.footer-trust-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.trust-badge i {
    color: var(--accent-emerald);
}

.footer-col-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--accent-primary);
    transform: translateX(4px);
}

.footer-disclaimer {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.footer-disclaimer a {
    color: var(--accent-cyan);
    text-decoration: underline;
}

.footer-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.back-to-top button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.back-to-top button:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: transparent;
}

/* Floating Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 300;
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.toast-notification.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-icon {
    color: var(--accent-emerald);
    font-size: 1.2rem;
}

.toast-message {
    font-weight: 700;
    font-size: 0.92rem;
    color: #fff;
}

/* Cookie Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(16, 20, 34, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), var(--shadow-glow);
    padding: 18px 24px;
    z-index: 250;
    display: none;
}

.cookie-consent-banner.show {
    display: block;
    animation: slideUp 0.4s ease forwards;
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-consent-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-text {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 280px;
}

.cookie-icon {
    font-size: 1.8rem;
    color: var(--accent-amber);
    flex-shrink: 0;
}

.cookie-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookie-policy-link {
    color: var(--accent-cyan);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-cookie-accept {
    padding: 9px 20px;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-cookie-decline {
    padding: 9px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-full);
    cursor: pointer;
}

/* Responsive Media Queries */
@media (max-width: 1080px) {
    .hero-featured-banner {
        grid-template-columns: 1fr;
        padding: 30px;
    }
    .hero-visual {
        order: -1;
    }
    .game-layout-container {
        grid-template-columns: 1fr;
    }
    .game-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-toggle-btn {
        display: flex;
    }
    .search-box-wrapper,
    .btn-action-pill {
        display: none;
    }
    .hero-title {
        font-size: 2rem;
    }
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .game-sidebar {
        grid-template-columns: 1fr;
    }
    .contact-form-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .static-page-card {
        padding: 24px;
    }
    .game-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .game-tool-buttons {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .card-body {
        padding: 10px;
    }
    .card-title {
        font-size: 0.92rem;
    }
    .hero-title {
        font-size: 1.6rem;
    }
}
