:root {
    --primary-color: #00f2ea; /* Cyan Neon */
    --secondary-color: #ff0055; /* Magenta Neon */
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #cbd5e1;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --gradient-main: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-neon: 0 0 10px rgba(0, 242, 234, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Reduce initial rendering cost for off-screen sections */
.games-section,
.related-games,
.cta-section,
.faq-section,
.games-grid {
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* Rich-text list marker alignment (fix bullet indentation/marker protrusion) */
.container-game-description-text ul,
.container-game-description-text ol,
.description-box ul,
.description-box ol,
.game-description ul,
.game-description ol,
.game-desc ul,
.game-desc ol,
#game-description ul,
#game-description ol,
#overview ul,
#overview ol {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.container-game-description-text ul li,
.description-box ul li,
.game-description ul li,
.game-desc ul li,
#game-description ul li,
#overview ul li {
    list-style-type: disc !important;
    list-style-position: inside !important;
    padding-left: 0 !important;
}

.container-game-description-text ol li,
.description-box ol li,
.game-description ol li,
.game-desc ol li,
#game-description ol li,
#overview ol li {
    list-style-type: decimal !important;
    list-style-position: inside !important;
    padding-left: 0 !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb — detail */
.breadcrumb-nav {
    margin: 12px 0 16px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.breadcrumb-list > li {
    list-style: none;
}

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

.breadcrumb-item a {
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

.breadcrumb-item a:hover {
    background: rgba(0, 242, 234, 0.1);
}

.breadcrumb-item span[aria-current="page"] {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    padding: 4px 8px;
}

.breadcrumb-separator {
    font-size: 13px;
    color: var(--text-muted);
    user-select: none;
}

.game-star--detail {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(0, 242, 234, 0.08);
    border: 1px solid rgba(0, 242, 234, 0.25);
}

.game-star--detail .detail-rating-visual {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #fbbf24;
    font-size: 1rem;
    line-height: 1;
}

.game-star--detail .detail-rating-visual .star-icon {
    margin-right: 0;
}

/* Header */
.main-header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    gap: 16px;
}

.logo {
    flex: 0 1 280px;
    min-width: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.logo-img {
    max-height: 42px;
    width: auto;
    max-width: 160px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 1.5vw, 1.6rem);
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.15;
    display: block;
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.logo-link.no-logo-image .logo-text {
    max-width: none;
}

.logo-text .highlight {
    color: var(--primary-color);
    text-shadow: var(--shadow-neon);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.main-nav ul {
    display: flex;
    gap: clamp(14px, 2vw, 30px);
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
}

.main-nav ul li {
    flex: 0 0 auto;
}

.main-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
}

.main-nav a,
.main-nav .dropdown-trigger {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    position: relative;
    white-space: nowrap;
}

.main-nav .dropdown-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    line-height: 1.2;
}

.nav-more-menu {
    right: 0;
    left: auto;
}

.main-nav a:hover,
.main-nav a.active,
.main-nav .dropdown-trigger:hover,
.dropdown:hover > .dropdown-trigger {
    color: var(--primary-color);
}

.main-nav a::after,
.main-nav .dropdown-trigger::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    box-shadow: var(--shadow-neon);
}

.main-nav a:hover::after,
.main-nav .dropdown-trigger:hover::after,
.dropdown:hover > .dropdown-trigger::after {
    width: 100%;
}

.nav-item--primary.is-overflow-hidden {
    display: none;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dropdown.active .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    color: var(--text-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-content a:hover {
    background: rgba(0, 242, 234, 0.1);
    color: var(--primary-color);
}

.nav-more-menu a.active {
    color: var(--primary-color);
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 5px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 0 0 auto;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 5px;
    outline: none;
    font-family: var(--font-body);
}

.search-bar button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

.search-bar button:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    position: relative;
    height: 500px;
    background: var(--gradient-main);
    overflow: hidden;
    margin-bottom: 40px;
}

.carousel-container {
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; /* JS will toggle this */
    align-items: center;
    justify-content: center;
}

.carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Overlay */
}

.carousel-item.active {
    display: flex;
    animation: fadeIn 1s ease;
}

.carousel-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-content h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-light);
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.play-btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--secondary-color);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.6);
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: #ff3377;
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.8);
}

.play-btn:focus-visible,
.newsletter-form button:focus-visible,
.games-hscroll-btn:focus-visible,
.mobile-menu-toggle:focus-visible,
#search-btn:focus-visible,
.back-to-top-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn, .filter-tag {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active, .filter-tag:hover, .filter-tag.active {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: var(--shadow-neon);
}

/* Games Grid */
.games-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-light);
}

.section-header h2 i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.view-all {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.view-all:hover {
    color: var(--primary-color);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.game-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 242, 234, 0.2);
    border-color: rgba(0, 242, 234, 0.3);
}

.game-thumb {
    position: relative;
    padding-bottom: 66%; /* Aspect ratio */
    overflow: hidden;
}

.game-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 242, 234, 0.8);
}

.game-info {
    padding: 15px;
}

.game-info h3,
.game-info .game-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-light);
}

.brief-comment-game {
    margin: 6px 0 0;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* Keep card height stable */
    overflow: hidden;
    word-break: break-word;
}

.rating,
.game-star,
.star-rating {
    font-size: 0.85rem;
    color: #ffd700; /* Gold */
}

.game-star {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 1.1em;
}

.game-star .star-icon,
.game-star .star-full,
.game-star .star-empty,
.game-star .fa,
.game-star .fas,
.game-star .far {
    color: inherit;
}

.star-rating .star-icon {
    color: inherit;
}

.game-star .star-placeholder {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 215, 0, 0.55);
    letter-spacing: 1px;
    white-space: nowrap;
    animation: starPlaceholderPulse 1.1s ease-in-out infinite;
}

.game-star.is-ready .star-placeholder {
    display: none;
}

@keyframes starPlaceholderPulse {
    0% { opacity: 0.45; }
    50% { opacity: 0.95; }
    100% { opacity: 0.45; }
}

/* Games Layout Variants */
.games-grid--list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.games-grid--list .game-card > a {
    display: flex;
    align-items: stretch;
    gap: 18px;
    width: 100%;
}

.games-grid--list .game-thumb {
    flex: 0 0 180px;
    height: 115px;
    padding-bottom: 0; /* override default aspect-ratio padding */
}

.games-grid--list .game-info {
    padding: 10px 0;
    flex: 1;
    min-width: 0;
}

.games-grid--list .game-info h3,
.games-grid--list .game-info .game-title {
    white-space: nowrap;
}

.games-grid--list .brief-comment-game {
    -webkit-line-clamp: 2; /* keep consistent height */
}

.games-grid--list .game-card:hover {
    transform: translateY(-2px);
}

/* Compact grid: smaller tiles, slightly denser spacing */
.games-grid--compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.games-grid--compact .game-info {
    padding: 12px;
}

.games-grid--compact .game-info h3,
.games-grid--compact .game-info .game-title {
    font-size: 1.05rem;
}

.games-grid--compact .brief-comment-game {
    -webkit-line-clamp: 1; /* less vertical text for compact feel */
}

.games-grid--compact .play-overlay i {
    font-size: 2.5rem;
}

/* Horizontal scroll layout */
.games-grid--hscroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    gap: 18px;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.games-grid--hscroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.games-grid--hscroll .game-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
}

.games-grid--hscroll .game-card > a {
    display: block;
    width: 100%;
    height: 100%;
}

.games-grid--hscroll .game-thumb {
    padding-bottom: 62%;
}

.games-grid--hscroll .game-info {
    padding: 12px 12px 14px;
}

.games-grid--hscroll .game-info h3,
.games-grid--hscroll .game-info .game-title {
    font-size: 1.05rem;
}

.games-grid--hscroll .brief-comment-game {
    -webkit-line-clamp: 1;
}

.games-grid--hscroll .play-overlay i {
    font-size: 2.4rem;
}

/* Horizontal scroll navigation buttons */
.games-hscroll-wrap {
    position: relative;
}

.games-hscroll-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.games-hscroll-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.35);
    color: var(--text-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.games-hscroll-btn i {
    font-size: 1.2rem;
}

.games-hscroll-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 242, 234, 0.35);
    background: rgba(0, 242, 234, 0.12);
}

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

/* Category Page */
.category-page {
    padding-top: 20px;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.page-link {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.page-link:hover, .page-link.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: var(--shadow-neon);
}

/* Detail Page */
.related-games {
    margin-top: 60px;
    margin-bottom: 30px;
}

.related-games .game-info > p:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-detail-page .game-container {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    margin-top: 30px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

/* Detail Page - Unavailable state */
.game-unavailable {
    padding: 70px 28px;
    text-align: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 242, 234, 0.12), transparent 45%),
        radial-gradient(circle at 80% 25%, rgba(255, 0, 85, 0.10), transparent 50%),
        rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.game-unavailable__icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(0, 242, 234, 0.35);
    box-shadow: 0 0 18px rgba(0, 242, 234, 0.25);
    font-size: 40px;
}

.game-unavailable__title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: var(--text-light);
    text-transform: uppercase;
}

.game-unavailable__desc {
    color: var(--text-muted);
    max-width: 58ch;
    margin: 0 auto 22px;
    line-height: 1.8;
}

.game-unavailable__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.game-unavailable__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 12px rgba(0, 242, 234, 0.18);
    background: transparent;
}

.game-unavailable__btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: var(--shadow-neon);
    transform: translateY(-2px);
}

.game-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: black;
}

.game-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.game-info-block {
    padding: 30px;
}

.game-meta {
    margin: 15px 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.category-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.share-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.share-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.game-desc {
    color: var(--text-muted);
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-description-details {
    position: relative;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.section-description-details h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
}

.section-description-about {
    border-color: rgba(0, 242, 234, 0.28);
}

.section-description-about::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.45);
}

.section-description-content {
    border-color: rgba(255, 0, 85, 0.24);
}

.section-description-details .container-game-description-text {
    color: var(--text-muted);
}

/* Static Pages */
.static-page {
    padding: 20px 0;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 30px;
    border-left: 5px solid var(--primary-color);
    padding-left: 20px;
}

.tag-h2 {
    margin: -12px 0 24px;
    max-width: 820px;
    padding: 10px 16px;
    border: 1px solid rgba(0, 242, 234, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0.01em;
    text-wrap: balance;
}

/* .content-block, .contact-container {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-card);
} */

/* .content-block h2 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
} */

/* .content-block p, .content-block li {
    margin-bottom: 15px;
    color: var(--text-muted);
} */

/* Contact Form */
/* .contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
} */

.contact-info ul li {
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-info i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: var(--text-light);
    font-family: var(--font-body);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 242, 234, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #00dcd4;
}

/* CTA Section */
.cta-section {
    background: var(--bg-card);
    padding: 60px 0;
    text-align: center;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-section h2 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
    color: var(--primary-color);
}

.newsletter-form {
    max-width: 500px;
    margin: 30px auto 0;
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-light);
    font-family: var(--font-body);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.2);
}

.newsletter-form button {
    padding: 15px 30px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.newsletter-form button:hover {
    background: #ff3377;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.4);
}

/* Footer */
.main-footer {
    background: #0b1120;
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #e2e8f0;
}

.footer-column a:hover {
    color: var(--text-light);
    padding-left: 5px; /* Slight movement on hover */
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .main-header .container {
        height: 60px;
    }

    .logo {
        flex: 1 1 auto;
        max-width: calc(100% - 48px);
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .search-bar {
        display: none; /* Hide search on mobile for simplicity, or move to menu */
    }

    .mobile-menu-toggle {
        display: block;
        margin-right: 0;
    }

    .main-nav {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        padding: 20px;
        display: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        backdrop-filter: blur(10px);
    }
    
    .main-nav.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .nav-item--primary.is-overflow-hidden {
        display: list-item;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background: transparent;
        padding-left: 0;
        display: none; /* JS needed to toggle */
        border: none;
        text-align: center;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }

    /* Keep 'Categories' link centered when dropdown expands on mobile */
    .main-nav .dropdown {
        width: 100%;
    }
    .main-nav .dropdown > .dropdown-trigger {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        text-align: center;
        color: inherit;
    }

    /* Hero adjustments */
    .hero {
        height: 300px;
        margin-bottom: 30px;
    }

    .carousel-content {
        width: 90%;
        padding: 15px;
        backdrop-filter: none;
    }
    
    .carousel-content h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .play-btn {
        padding: 10px 30px;
        font-size: 0.9rem;
    }

    /* Filters adjustments */
    .filters {
        gap: 10px;
        margin-bottom: 30px;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px; /* For scrollbar if needed */
        flex-wrap: nowrap; /* Horizontal scroll */
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        padding: 8px 20px;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Grid adjustments */
    .games-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 15px;
    }

    /* List/Masonry layout adjustments */
    .games-grid--list {
        gap: 14px;
    }

    .games-grid--list .game-card > a {
        gap: 14px;
    }

    .games-grid--list .game-thumb {
        flex-basis: 140px;
        height: 95px;
    }

    .games-grid--hscroll {
        gap: 14px;
    }

    .games-hscroll-nav {
        margin-bottom: 10px;
    }

    .games-hscroll-btn {
        width: 38px;
        height: 38px;
    }

    .games-grid--hscroll .game-card {
        flex-basis: 200px;
    }

    .games-grid--hscroll .game-thumb {
        padding-bottom: 58%;
    }

    .section-header {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .section-header-actions {
        margin-left: auto;
        flex-shrink: 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        min-width: 0;
    }

    .section-header h2 i {
        margin-right: 8px;
        flex-shrink: 0;
    }

    .view-all {
        align-self: flex-end;
    }

    /* Contact & Footer */
    /* .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
    } */
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-column h3 {
        margin-bottom: 15px;
    }
    
    /* Game Detail adjustments */
    .game-player {
        padding-bottom: 120%; /* Taller for mobile play */
    }

    .game-info-block {
        padding: 20px;
    }

    .game-unavailable {
        padding: 48px 16px;
    }

    .game-unavailable__title {
        font-size: 1.6rem;
    }
    
    .game-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .game-info h3 {
        font-size: 1rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }

    .tag-h2 {
        margin: -8px 0 18px;
        font-size: 0.9rem;
        line-height: 1.55;
        padding: 8px 12px;
    }

    /* Section header description on mobile */
    .section-header-desc {
        margin-top: -10px;
        margin-bottom: 10px;
    }
    .module-description {
        font-size: 0.9rem;
    }

    /* CTA mobile */
    .newsletter-form {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }

    .newsletter-form input {
        width: 100%;
    }

    .newsletter-form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tag-h2 {
        margin: -6px 0 16px;
        font-size: 0.82rem;
        line-height: 1.5;
        padding: 7px 10px;
        border-radius: 10px;
    }
}

/* Lower paint/compositing pressure on mobile and reduced-motion users */
@media (prefers-reduced-motion: reduce), (max-width: 768px) {
    * {
        animation: none !important;
    }

    .game-card,
    .play-btn,
    .games-hscroll-btn,
    .main-nav a,
    .dropdown-trigger,
    .game-thumb img,
    .play-overlay {
        transition: none !important;
    }

    .game-card:hover,
    .play-btn:hover,
    .games-hscroll-btn:hover,
    .game-card:hover .game-thumb img {
        transform: none !important;
    }
}

/* Unified single-line truncation for game titles in lists */
.game-title,
.title-game,
.title-similar-game,
.card-title,
.sidebar-game-title,
.recommended-name,
.new-game-title {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-info,
.container-game-info,
.sidebar-game-info,
.card-content,
.recommended-info,
.game-meta {
  min-width: 0;
}

/* Legacy star_html compatibility (5-star rating output) */
.game-star .star-icon {
  display: inline-block;
  font-style: normal;
  line-height: 1;
  margin-right: 1px;
}

.game-star .star-icon::before,
.game-star .star-full::before,
.game-star .fa-star::before {
  content: "★";
}

.game-star .star-empty::before,
.game-star .fa-star-o::before,
.game-star .far.fa-star::before,
.game-star .fa-regular.fa-star::before {
  content: "☆";
}

/* Section header description */
.section-header-desc {
    margin-top: -15px;
    margin-bottom: 15px;
}

.module-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.module-link-more {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.3s ease;
}

.module-link-more:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}
