:root {
    --bg: #f5f7fb;
    --bg-strong: #101828;
    --surface: #ffffff;
    --surface-muted: #eef2f7;
    --text: #111827;
    --muted: #64748b;
    --line: #dbe3ee;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --accent: #f97316;
    --accent-soft: #fff1e8;
    --gold: #f5b301;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

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

.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;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    color: #fff;
    background: var(--primary);
    border-radius: var(--radius);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(20px, 5vw, 72px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(219, 227, 238, 0.9);
    backdrop-filter: blur(18px);
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.brand strong,
.footer-brand {
    color: var(--bg-strong);
}

.brand span span {
    color: var(--primary);
}

.site-nav,
.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.site-nav a:hover,
.site-footer a:hover {
    color: var(--primary);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    min-height: calc(100vh - 73px);
    padding: clamp(44px, 8vw, 96px) clamp(20px, 5vw, 72px) 56px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(16, 24, 40, 0.96), rgba(17, 94, 89, 0.9)),
        url("https://images.unsplash.com/photo-1550745165-9bc0b252726f?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 840px;
    margin: 0;
    font-size: clamp(3rem, 7vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.hero-lede {
    max-width: 680px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.75;
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    max-width: 680px;
    margin-top: 34px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
}

.hero-search input {
    width: 100%;
    min-width: 0;
    color: #fff;
    background: transparent;
    border: 0;
    outline: 0;
    padding: 14px 12px;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.hero-cta,
.primary-button,
.secondary-button,
.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: var(--radius);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.hero-cta:hover,
.primary-button:hover,
.secondary-button:hover,
.play-button:hover {
    transform: translateY(-2px);
    background: #ea580c;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.24);
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 680px;
    margin-top: 22px;
}

.quick-stats div {
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
}

.quick-stats strong {
    display: block;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.quick-stats span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.88rem;
}

.spotlight {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.section-heading.compact {
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 0;
    color: var(--bg-strong);
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.12;
}

.hero .section-heading h2 {
    color: #fff;
}

.spotlight-card,
.game-card,
.info-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.spotlight-card {
    color: var(--text);
}

.spotlight-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--surface-muted);
}

.spotlight-body {
    padding: 22px;
}

.spotlight-body h3 {
    margin: 0 0 10px;
    font-size: 1.7rem;
}

.spotlight-body p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.6;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

.rating {
    color: #9a6700;
    font-weight: 800;
}

.category-section,
.content-section {
    padding: clamp(48px, 7vw, 84px) clamp(20px, 5vw, 72px);
}

.category-section {
    background: #fff;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 12px;
}

.category-tile {
    display: flex;
    min-height: 86px;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    text-align: left;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.category-tile:hover,
.category-tile.is-active {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 12px 26px rgba(15, 118, 110, 0.14);
}

.category-tile strong {
    font-size: 1rem;
}

.category-tile span {
    color: var(--muted);
    font-size: 0.82rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.games-section {
    background: #fff;
}

.games-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.sort-control select {
    min-height: 42px;
    padding: 0 34px 0 12px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.result-summary {
    margin: -8px 0 22px;
    color: var(--muted);
    font-weight: 600;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.game-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    color: var(--text);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.game-media {
    position: relative;
    overflow: hidden;
    background: var(--surface-muted);
}

.game-media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.22s ease;
}

.game-card:hover .game-media img {
    transform: scale(1.04);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    color: var(--bg-strong);
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius);
    font-size: 0.72rem;
    font-weight: 800;
}

.media-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.game-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.game-body h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    line-height: 1.28;
}

.game-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.tag {
    padding: 4px 7px;
    color: var(--primary-dark);
    background: #e6fffb;
    border-radius: var(--radius);
    font-size: 0.72rem;
    font-weight: 700;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.card-footer span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.load-more-row {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.secondary-button {
    color: var(--primary-dark);
    background: #e6fffb;
}

.secondary-button:hover {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.loading-state,
.empty-state {
    grid-column: 1 / -1;
    padding: 34px;
    color: var(--muted);
    text-align: center;
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.skeleton {
    display: block;
    background: linear-gradient(90deg, #e8eef6, #f7f9fc, #e8eef6);
    background-size: 200% 100%;
    animation: shimmer 1.3s infinite linear;
}

.skeleton.media {
    width: 100%;
    aspect-ratio: 16 / 10;
}

.skeleton.line {
    height: 14px;
    width: 64%;
    margin: 16px 22px 22px;
    border-radius: var(--radius);
}

.skeleton.line.wide {
    width: 82%;
    margin-bottom: 0;
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.game-page {
    min-height: 100vh;
    background: #f8fafc;
}

.detail-hero {
    padding: 42px clamp(20px, 5vw, 72px);
    color: #fff;
    background: linear-gradient(135deg, #101828, #164e63);
}

.detail-hero a {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.detail-hero a:hover {
    color: #fff;
}

.detail-hero h1 {
    max-width: 880px;
    margin: 18px 0 12px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.02;
}

.detail-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.detail-actions a {
    color: #08111f;
}

.detail-actions .secondary-button {
    background: rgba(255, 255, 255, 0.88);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.9rem;
    font-weight: 700;
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.54);
}

.source-note {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.detail-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding: 28px clamp(20px, 5vw, 72px) 70px;
}

.game-iframe-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #05070d;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.aspect-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}

.aspect-video iframe,
.aspect-video .loading-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.loading-overlay {
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(5, 7, 13, 0.88);
    z-index: 2;
}

.loading-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.detail-sidebar,
.detail-description {
    padding: 22px;
}

.detail-sidebar h2,
.detail-description h2 {
    margin: 0 0 16px;
    font-size: 1.25rem;
}

.detail-description h2:not(:first-child) {
    margin-top: 24px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
}

.detail-description {
    margin-top: 24px;
}

.detail-description p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.content-list {
    display: grid;
    gap: 10px;
    margin: 0 0 6px;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.75;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.faq-item summary {
    color: var(--bg-strong);
    font-weight: 800;
    cursor: pointer;
}

.faq-item p {
    margin-top: 10px;
}

.page-hero {
    padding: clamp(52px, 8vw, 92px) clamp(20px, 5vw, 72px);
    color: #fff;
    background: linear-gradient(135deg, #101828, #155e75);
}

.page-hero h1 {
    max-width: 840px;
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 4.9rem);
    line-height: 1.02;
}

.page-hero p {
    max-width: 760px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.05rem;
    line-height: 1.75;
}

.page-shell {
    display: grid;
    gap: 22px;
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(42px, 7vw, 78px) 20px;
}

.page-card {
    padding: clamp(22px, 4vw, 34px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.page-card h2,
.page-card h3 {
    margin: 0 0 14px;
    color: var(--bg-strong);
}

.page-card p,
.page-card li {
    color: var(--muted);
    line-height: 1.78;
}

.page-card p:last-child,
.page-card ul:last-child,
.page-card ol:last-child {
    margin-bottom: 0;
}

.simple-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.contact-list,
.policy-list {
    display: grid;
    gap: 12px;
    padding-left: 0;
    list-style: none;
}

.contact-list a {
    color: var(--primary-dark);
    font-weight: 800;
}

.contact-form {
    display: grid;
    gap: 14px;
}

.contact-form label {
    display: grid;
    gap: 6px;
    color: var(--bg-strong);
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 13px 14px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: 0;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 34px clamp(20px, 5vw, 72px);
    background: #fff;
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin: 8px 0 0;
    color: var(--muted);
}

@media (max-width: 1120px) {
    .hero,
    .detail-shell {
        grid-template-columns: 1fr;
    }

    .category-grid,
    .featured-grid,
    .game-grid,
    .simple-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .site-header {
        position: static;
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        width: 100%;
        gap: 12px;
    }

    .hero {
        min-height: 0;
    }

    .hero-search,
    .quick-stats,
    .games-toolbar {
        grid-template-columns: 1fr;
    }

    .hero-search {
        display: grid;
    }

    .quick-stats,
    .games-toolbar {
        display: grid;
    }

    .category-grid,
    .featured-grid,
    .game-grid,
    .simple-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .hero h1 {
        font-size: 2.55rem;
    }

    .site-nav,
    .site-footer nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-grid,
    .featured-grid,
    .game-grid,
    .quick-stats,
    .simple-grid {
        grid-template-columns: 1fr;
    }

    .hero-search {
        padding: 6px;
    }

    .hero-cta {
        width: 100%;
    }

    .detail-shell {
        padding-bottom: 46px;
    }
}
