/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #181832;
    color: #d4d4e8;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: #c9a44a; text-decoration: none; transition: color .2s; }
a:hover { color: #e8c95a; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
main { flex: 1; }

/* Scroll offset for sticky header */
[id] { scroll-margin-top: 80px; }

/* ===== Header ===== */
.site-header {
    background: #0f0f24;
    border-bottom: 1px solid rgba(255,255,255,.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo a { display: flex; align-items: center; }
.logo-img { height: 32px; width: auto; }

/* Nav */
.main-nav > ul { display: flex; gap: 2px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 22px 13px;
    color: #a0a0be;
    font-size: 13px;
    font-weight: 500;
    transition: color .2s;
    white-space: nowrap;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li:hover > a { color: #fff; }

/* Dropdown arrow */
.main-nav > ul > li.has-submenu > a::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform .2s;
    margin-top: 1px;
}
.main-nav > ul > li.has-submenu:hover > a::after {
    transform: rotate(180deg);
}

/* Dropdown (vertical) */
.main-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: #1a1a38;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .2s, transform .2s, visibility .2s;
    box-shadow: 0 16px 40px rgba(0,0,0,.5);
    display: flex;
    flex-direction: column;
}
.main-nav > ul > li:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-nav .submenu li a {
    display: block;
    padding: 10px 18px;
    color: #8e8ea8;
    font-size: 13px;
    transition: background .2s, color .2s;
}
.main-nav .submenu li a:hover {
    background: rgba(255,255,255,.05);
    color: #fff;
}

/* Header buttons */
.header-actions { display: flex; gap: 10px; align-items: center; }
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .2s, transform .15s, box-shadow .2s;
    text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,.18);
    color: #d4d4e8;
}
.btn-outline:hover { background: rgba(255,255,255,.06); color: #fff; }
.btn-primary {
    background: #fe284a;
    color: #fff;
}
.btn-primary:hover {
    background: #e5203f;
    box-shadow: 0 4px 18px rgba(254,40,74,.3);
}
.btn-gold {
    background: linear-gradient(135deg, #c9a44a, #e8c95a);
    color: #0f0f24;
}
.btn-gold:hover {
    background: linear-gradient(135deg, #e8c95a, #c9a44a);
    box-shadow: 0 4px 18px rgba(201,164,74,.3);
}
.cta-buttons { text-align: center; margin: 0.5rem 0; }

/* ===== Hero (main page) ===== */
.hero {
    background: linear-gradient(180deg, #1c1040 0%, #181832 100%);
    padding: 80px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    top: -40%;
    left: 20%;
    width: 60%;
    height: 140%;
    background: radial-gradient(ellipse at center, rgba(120,60,200,.12) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    position: relative;
}
.hero .hero-sub {
    font-size: 17px;
    color: #9898b4;
    max-width: 640px;
    margin: 0 auto 32px;
    position: relative;
}
.hero-buttons { display: flex; gap: 14px; justify-content: center; position: relative; }

/* ===== Hero (inner pages) ===== */
.hero-inner {
    background: linear-gradient(180deg, #1c1040 0%, #181832 100%);
    padding: 36px 0 32px;
}
.hero-inner h1 {
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    margin-top: 8px;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #8e8ea8;
    flex-wrap: wrap;
}
.breadcrumbs a { color: #c9a44a; }
.breadcrumbs span.sep { color: #4a4a64; }

/* ===== Games Grid ===== */
.games-section { padding: 50px 0; }
.games-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 28px;
}
.games-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.game-card {
    background: #1e1e3d;
    border-radius: 14px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.game-card .game-img {
    aspect-ratio: 3/2;
    background: linear-gradient(135deg, #252548, #1e1e3d);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a4a64;
    font-size: 13px;
    overflow: hidden;
    position: relative;
}
.game-card .game-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.game-card .game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,10,30,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s;
}
.game-card:hover .game-overlay { opacity: 1; }
.game-card .game-overlay .btn-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fe284a;
    color: #fff;
    transition: transform .2s, box-shadow .2s;
}
.game-card .game-overlay .btn-play:hover {
    transform: scale(1.1);
    box-shadow: 0 0 24px rgba(254,40,74,.45);
}
.game-card .game-overlay .btn-play svg {
    width: 22px;
    height: 22px;
    fill: #fff;
    margin-left: 2px;
}
.game-card .game-title {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #d4d4e8;
    text-align: center;
}

/* ===== TOC ===== */
.toc-section { padding: 40px 0 20px; }
.toc {
    background: #1e1e3d;
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 12px;
    padding: 24px 32px;
}
.toc-title {
    font-size: 17px;
    font-weight: 700;
    color: #c9a44a;
    margin-bottom: 14px;
}
.toc ol {
    list-style: decimal;
    padding-left: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 32px;
}
.toc ol li a {
    color: #8e8ea8;
    font-size: 14px;
    transition: color .2s;
}
.toc ol li a:hover { color: #e8c95a; }

/* ===== Content Block ===== */
.content-section { padding: 40px 0; }
.content-block h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 32px 0 14px;
}
.content-block h2:first-child { margin-top: 0; }
.content-block h3 {
    font-size: 19px;
    font-weight: 600;
    color: #d4d4e8;
    margin: 24px 0 10px;
}
.content-block p {
    color: #9898b4;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.75;
}
.content-block ul, .content-block ol {
    padding-left: 24px;
    margin-bottom: 16px;
}
.content-block ul { list-style: disc; }
.content-block ol { list-style: decimal; }
.content-block li {
    color: #9898b4;
    margin-bottom: 6px;
    font-size: 15px;
}
.content-block img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 16px 0;
}

/* ===== Table wrap (mobile horizontal scroll) ===== */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.06);
}
.table-wrap table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
    font-size: 14px;
}
.table-wrap th,
.table-wrap td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.06);
    color: #9898b4;
}
.table-wrap th {
    background: rgba(255,255,255,.04);
    color: #d4d4e8;
    font-weight: 600;
}

/* ===== 404 page ===== */
.content-404 {
    text-align: center;
    padding: 40px 0;
}
.content-404 .error-code {
    font-size: 64px;
    color: #fe284a;
    font-weight: 800;
    margin-bottom: 16px;
}
.content-404 .error-actions {
    margin-top: 24px;
}

/* ===== Reviews ===== */
.reviews-section { padding: 50px 0; }
.reviews-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 28px;
}
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.review-card {
    background: #1e1e3d;
    border-radius: 14px;
    padding: 24px 22px;
}
.review-card .review-stars {
    color: #e8c95a;
    font-size: 15px;
    margin-bottom: 12px;
    letter-spacing: 2px;
}
.review-card .review-text {
    color: #9898b4;
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 14px;
}
.review-card .review-author {
    font-size: 13px;
    font-weight: 600;
    color: #c9a44a;
}

/* ===== FAQ ===== */
.faq-section { padding: 50px 0; }
.faq-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 28px;
}
.faq-list details {
    background: #1e1e3d;
    border: 1px solid rgba(255,255,255,.04);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: border-color .2s;
}
.faq-list details[open] { border-color: rgba(255,255,255,.1); }
.faq-list summary {
    padding: 16px 22px;
    font-size: 15px;
    font-weight: 600;
    color: #d4d4e8;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
    content: "+";
    font-size: 18px;
    color: #fe284a;
    transition: transform .2s;
    flex-shrink: 0;
    margin-left: 16px;
}
.faq-list details[open] summary::after {
    content: "\2212";
}
.faq-list details .faq-answer {
    padding: 0 22px 18px;
    color: #9898b4;
    font-size: 14px;
    line-height: 1.75;
}
.faq-list [itemscope][itemprop="mainEntity"] { position: relative; }
.faq-list .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;
}

/* ===== Footer ===== */
.site-footer {
    background: #0c0c20;
    border-top: 1px solid rgba(255,255,255,.04);
    padding: 48px 0 28px;
    margin-top: auto;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}
.footer-about .footer-logo { margin-bottom: 14px; }
.footer-logo-img { height: 28px; width: auto; }
.footer-about p {
    color: #5e5e7a;
    font-size: 13px;
    line-height: 1.65;
}
.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: #d4d4e8;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a {
    color: #5e5e7a;
    font-size: 13px;
    transition: color .2s;
}
.footer-col ul li a:hover { color: #c9a44a; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.04);
    padding-top: 18px;
    text-align: center;
    color: #3e3e58;
    font-size: 12px;
}

/* ===== Mobile Nav ===== */
.mobile-toggle { display: none; }

.mobile-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0f0f24;
    z-index: 999;
    overflow-y: auto;
    padding: 16px 0 32px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav > ul { padding: 0 20px; }
.mobile-nav > ul > li { border-bottom: 1px solid rgba(255,255,255,.05); }
.mobile-nav > ul > li > a {
    display: block;
    padding: 14px 0;
    color: #d4d4e8;
    font-size: 15px;
    font-weight: 500;
}
.mobile-nav > ul > li > a:hover { color: #fe284a; }

/* Parent row with arrow */
.mobile-nav .mob-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mobile-nav .mob-parent > a {
    flex: 1;
    padding: 14px 0;
    color: #d4d4e8;
    font-size: 15px;
    font-weight: 500;
}
.mobile-nav .mob-parent > a:hover { color: #fe284a; }
.mobile-nav .mob-arrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px 4px 14px 16px;
    display: flex;
    align-items: center;
}
.mobile-nav .mob-arrow::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #8e8ea8;
    transition: transform .2s;
}
.mobile-nav .mob-has-sub.is-open .mob-arrow::after {
    transform: rotate(180deg);
}

/* Submenu hidden by default */
.mobile-nav .mob-has-sub .submenu {
    display: none;
    padding: 0 0 10px 16px;
}
.mobile-nav .mob-has-sub.is-open .submenu {
    display: block;
}
.mobile-nav .submenu li a {
    display: block;
    padding: 8px 0;
    color: #8e8ea8;
    font-size: 14px;
}
.mobile-nav .submenu li a:hover { color: #fff; }

.mobile-nav-actions {
    display: flex;
    gap: 12px;
    padding: 20px 20px 0;
}
.mobile-nav-actions .btn {
    flex: 1;
    text-align: center;
    padding: 14px 0;
    font-size: 15px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .games-grid { grid-template-columns: repeat(3, 1fr); }
    .reviews-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .header-inner { height: 56px; }
    .main-nav { display: none; }
    .header-actions { display: none; }
    .mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
        order: 3;
    }
    .mobile-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #d4d4e8;
        border-radius: 2px;
        transition: transform .2s, opacity .2s;
    }
    .mobile-toggle.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .mobile-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }
    .mobile-toggle.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    .hero h1 { font-size: 28px; }
    .hero .hero-sub { font-size: 15px; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .games-grid { grid-template-columns: repeat(2, 1fr); }
    .reviews-grid { grid-template-columns: 1fr; }
    .toc ol { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .hero { padding: 50px 0 40px; }
}

@media (max-width: 480px) {
    .header-actions .btn { padding: 8px 14px; font-size: 12px; }
}
