/* ============================================================
   EscapeGamesHub.com - Unified Stylesheet
   Dark Gaming Theme with Neon Accents
   ============================================================ */

/* ===== Design Tokens ===== */
:root {
    /* Colors */
    --color-bg: #0a0e1a;
    --color-bg-secondary: #111827;
    --color-bg-card: #1a1f35;
    --color-bg-card-hover: #222845;
    --color-bg-input: #1e2540;
    --color-accent: #00d4ff;
    --color-accent-secondary: #7c3aed;
    --color-accent-gradient: linear-gradient(135deg, #7c3aed, #00d4ff);
    --color-accent-glow: rgba(0, 212, 255, 0.25);
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-text-heading: #ffffff;
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-border: #2d3548;
    --color-header-bg: linear-gradient(135deg, #0f1629 0%, #1a1145 50%, #0f1629 100%);
    --color-footer-bg: linear-gradient(180deg, #111827, #0a0e1a);

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Orbitron', 'Inter', sans-serif;

    /* Spacing */
    --container-max: 1400px;
    --sidebar-width: 300px;
    --gap: 16px;
    --header-height: 70px;

    /* Borders & Shadows */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px var(--color-accent-glow);
    --shadow-header: 0 2px 20px rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #33dfff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-heading);
    line-height: 1.2;
    letter-spacing: 0.5px;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

/* ===== Layout ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

main.container {
    padding-top: 16px;
    padding-bottom: 16px;
}

.layout-with-sidebar {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--color-accent);
}

/* ===== Header ===== */
.site-header {
    background: var(--color-header-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-header);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gap);
    display: flex;
    align-items: center;
    height: var(--header-height);
    gap: 20px;
}

.logo {
    flex-shrink: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.logo:hover {
    color: var(--accent-purple);
}

.main-nav {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links > li > a,
.nav-dropdown-toggle {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.nav-links > li > a:hover,
.nav-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-accent);
}

/* Dropdown menus */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 220px;
    padding: 8px 0;
    box-shadow: var(--shadow-card);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.nav-dropdown.active .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: var(--color-text);
    font-size: 0.88rem;
    transition: background var(--transition-fast);
}

.nav-dropdown-menu a:hover {
    background: rgba(0, 212, 255, 0.08);
    color: var(--color-accent);
}

.nav-dropdown-menu a i {
    width: 20px;
    text-align: center;
    color: var(--color-accent);
    font-size: 0.85rem;
}

/* Header search */
.header-search {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin-left: auto;
    flex-shrink: 1;
    min-width: 0;
}

.header-search input {
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 7px 12px;
    color: var(--color-text);
    width: 180px;
    min-width: 100px;
    font-size: 0.88rem;
    transition: border-color var(--transition-fast);
}

.header-search input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.header-search button {
    background: var(--color-accent-gradient);
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 7px 14px;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Header auth */
.header-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text);
    font-size: 0.88rem;
}

.user-info img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
}

.user-info a {
    color: var(--color-text);
}

.user-info a:hover {
    color: var(--color-accent);
}

/* Hamburger menu */
.mobile-menu-toggle {
    display: none;
    padding: 8px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    left: 0;
    transition: transform var(--transition-normal);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-accent-gradient);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: var(--shadow-glow);
    color: #fff;
}

.btn-secondary {
    background: var(--color-bg-card);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-outline {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-outline:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--color-accent);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
}

.btn-play {
    background: var(--color-success);
    color: #fff;
    font-size: 1.1rem;
    padding: 14px 32px;
    border-radius: var(--radius-md);
}

.btn-play:hover {
    background: #0ea572;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    color: #fff;
}

.btn-auth {
    background: var(--color-accent-gradient);
    color: #fff;
    padding: 8px 18px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-auth:hover {
    opacity: 0.9;
    color: #fff;
}

.btn-logout {
    background: transparent;
    color: var(--color-text-muted);
    padding: 6px 12px;
    font-size: 0.82rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.btn-logout:hover {
    color: var(--color-danger);
    border-color: var(--color-danger);
}

/* ===== Hero / Featured Game ===== */
.hero {
    background: linear-gradient(135deg, #0f1629 0%, #1a1145 40%, #0d2137 100%);
    border-bottom: 1px solid var(--color-border);
    padding: 40px 0;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero__inner {
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero__content {
    flex: 1;
    min-width: 0;
}

.hero__badge {
    display: inline-block;
    background: var(--color-accent-gradient);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-text-heading);
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.hero__meta i {
    color: var(--color-accent);
    margin-right: 4px;
}

.hero__desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 500px;
}

.hero__play-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-accent-gradient);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hero__play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4), 0 0 60px rgba(124, 58, 237, 0.2);
    color: #fff;
}

.hero__image {
    flex-shrink: 0;
    width: 380px;
}

.hero__image img {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
    box-shadow: var(--shadow-card), 0 0 40px rgba(0, 212, 255, 0.1);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hero__image img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-glow), 0 8px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--color-accent);
}

@media (max-width: 768px) {
    .hero { padding: 24px 0; }

    .hero__inner {
        flex-direction: column-reverse;
        gap: 20px;
        text-align: center;
    }

    .hero__image { width: 260px; }
    .hero__title { font-size: 1.4rem; }
    .hero__desc { margin-left: auto; margin-right: auto; }
    .hero__meta { justify-content: center; }
}

@media (max-width: 480px) {
    .hero__image { width: 200px; }
    .hero__title { font-size: 1.2rem; }
    .hero__play-btn { padding: 12px 24px; font-size: 0.85rem; }
}

/* ===== Game Cards ===== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.game-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    display: block;
    color: var(--color-text);
}

.game-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-accent);
    color: var(--color-text);
}

.game-card__thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.game-card__body {
    padding: 8px 10px;
}

.game-card__title {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text-heading);
    margin-bottom: 4px;
}

.game-card__dev {
    display: block;
    font-size: 0.75rem;
    color: var(--color-accent);
    margin-bottom: 4px;
}

.game-card__votes {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.game-card__votes .vote-up i { color: var(--color-success); }
.game-card__votes .vote-down i { color: var(--color-danger); }

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 16px;
}

/* ===== Game Detail Page ===== */
.breadcrumb {
    padding: 15px 0;
    font-size: 0.85rem;
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb li:not(:last-child)::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.breadcrumb a {
    color: var(--color-text-muted);
}

.breadcrumb a:hover {
    color: var(--color-accent);
}

.breadcrumb li[aria-current="page"] {
    color: var(--color-text);
}

.game-detail {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
}

.game-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.game-detail__title {
    font-size: 1.8rem;
    background: var(--color-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-detail__meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.game-detail__meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-detail__meta i {
    color: var(--color-accent);
}

.game-detail__image {
    width: 100%;
    max-width: 350px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
}

.game-detail__description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 24px;
}

.game-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

/* Voting */
.voting {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-input);
    transition: all var(--transition-fast);
    cursor: pointer;
    color: var(--color-text);
}

.vote-btn:hover {
    border-color: var(--color-accent);
}

.vote-btn.vote-up:hover,
.vote-btn.vote-up.active {
    color: var(--color-success);
    border-color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
}

.vote-btn.vote-down:hover,
.vote-btn.vote-down.active {
    color: var(--color-danger);
    border-color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

.vote-count {
    font-weight: 700;
}

/* Game embed */
.game-embed {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.game-embed embed,
.game-embed iframe {
    max-width: 100%;
    border-radius: var(--radius-md);
}

/* Posted by */
.posted-by {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.posted-by img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
}

.posted-by a {
    color: var(--color-accent);
}

/* Admin edit forms */
.edit-form {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 12px;
    display: none;
}

.edit-form.active {
    display: block;
}

.edit-form input,
.edit-form textarea {
    width: 100%;
    padding: 8px 12px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    margin-bottom: 10px;
}

.edit-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* ===== Comments ===== */
.comments-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
}

.comments-section h2 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.comment {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.comment:last-child {
    border-bottom: none;
}

.comment__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-weight: 700;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.comment__body {
    flex: 1;
    min-width: 0;
}

.comment__author {
    font-weight: 600;
    color: var(--color-accent);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.comment__date {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-left: 10px;
    font-weight: 400;
}

.comment__text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text);
}

/* Comment form */
.comment-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.comment-form h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    resize: vertical;
    min-height: 100px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.login-prompt {
    text-align: center;
    padding: 20px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.login-prompt a {
    color: var(--color-accent);
    font-weight: 600;
}

/* ===== User / Profile ===== */
.profile-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, #0f1629 0%, #1a1145 40%, #0d2137 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.profile-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.profile-header__avatar {
    position: relative;
    z-index: 1;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--color-accent);
    object-fit: cover;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3), 0 0 40px rgba(0, 212, 255, 0.1);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.profile-header__avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.5), 0 0 50px rgba(0, 212, 255, 0.15);
}

.profile-header__info {
    position: relative;
    z-index: 1;
}

.profile-header__info h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 10px;
    background: var(--color-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-header__stats {
    display: flex;
    gap: 20px;
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.profile-header__stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-header__stats i {
    color: var(--color-accent);
}

/* User page sections */
.user-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.user-section .section-title {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.user-section .text-muted {
    text-align: center;
    padding: 20px 16px;
    font-style: italic;
}

/* Access request card */
.access-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.access-card .form-input {
    width: 100%;
}

/* Post game form */
.post-game-form h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--color-accent-gradient);
    border-radius: var(--radius-sm);
    color: #fff;
}

.post-game-form .form-group {
    margin-bottom: 10px;
}

.post-game-form .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.post-game-form .form-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.9rem;
}

.post-game-form .form-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.post-game-form select.form-input {
    appearance: auto;
}

.post-game-form textarea.form-input {
    resize: vertical;
    min-height: 60px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(0, 212, 255, 0.1);
    color: var(--color-accent);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.badge--gold {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.badge--purple {
    background: rgba(124, 58, 237, 0.1);
    color: var(--color-accent-secondary);
    border-color: rgba(124, 58, 237, 0.2);
}

/* Avatar selection */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
    padding: 10px;
}

.avatar-grid img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.avatar-grid img:hover,
.avatar-grid img.selected {
    border-color: var(--color-accent);
    transform: scale(1.1);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    background: var(--color-bg-card);
}

.pagination a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(0, 212, 255, 0.08);
}

.pagination .active {
    background: var(--color-accent-gradient);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}

.pagination .disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== Modals ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
    background: none;
    border: none;
}

.modal__close:hover {
    color: var(--color-danger);
}

.modal h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
    background: var(--color-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal .form-group {
    margin-bottom: 16px;
}

.modal .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.modal .form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.95rem;
}

.modal .form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.modal .form-submit {
    width: 100%;
    margin-top: 8px;
}

.modal .form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.modal .form-footer a {
    color: var(--color-accent);
    font-weight: 600;
}

.form-message {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 14px;
    display: none;
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--color-footer-bg);
    border-top: 1px solid var(--color-border);
    margin-top: 30px;
    padding-top: 30px;
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--color-accent);
}

.footer-col p {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col a {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

/* ===== Ad Containers ===== */
.ad-container {
    text-align: center;
    margin: var(--gap) 0;
    min-height: 50px;
}

.ad-leaderboard {
    max-width: 728px;
    margin: 12px auto;
}

.sidebar-ads {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.ad-sticky {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.ad-infeed {
    margin: 16px 0;
}

/* ===== Walkthrough / Video ===== */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16/9;
    margin-bottom: 20px;
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

/* ===== Forms (general) ===== */
.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* ===== Utilities ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .header-search input {
        width: 140px;
    }
}

@media (max-width: 1024px) {
    .sidebar-ads {
        display: none;
    }

    .layout-with-sidebar {
        flex-direction: column;
    }

    .ad-leaderboard {
        max-width: 100%;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: fixed;
        inset: 0;
        top: var(--header-height);
        background: var(--color-bg-secondary);
        flex-direction: column;
        padding: 20px;
        overflow-y: auto;
        z-index: 999;
        border-top: 1px solid var(--color-border);
    }

    .main-nav.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-links > li > a,
    .nav-dropdown-toggle {
        width: 100%;
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(0, 0, 0, 0.2);
        max-height: 300px;
    }

    .header-search {
        width: 100%;
        margin-left: 0;
        order: -1;
        margin-bottom: 10px;
    }

    .header-search input {
        width: 100%;
        flex: 1;
    }

    .header-search input:focus {
        width: 100%;
    }

    .header-auth {
        width: 100%;
        justify-content: center;
        padding: 16px 0;
        border-top: 1px solid var(--color-border);
    }
}

@media (max-width: 768px) {
    :root {
        --gap: 14px;
        --header-height: 60px;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .game-detail {
        padding: 16px;
    }

    .game-detail__title {
        font-size: 1.3rem;
    }

    .game-detail__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .voting {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
    }

    .profile-header__stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .comments-section {
        padding: 16px;
    }

    .modal {
        margin: 16px;
        padding: 24px;
    }

    .pagination a,
    .pagination span {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .game-card__body {
        padding: 8px;
    }

    .game-card__title {
        font-size: 0.82rem;
    }

    .game-card__dev {
        font-size: 0.72rem;
    }

    .game-detail__meta {
        flex-direction: column;
        gap: 8px;
    }

    .btn-play {
        width: 100%;
        justify-content: center;
    }
}
