/* ============================================================
 * gg66.homes - Core stylesheet (basefiles)
 * All custom classes use the `pg41-` prefix.
 * Mobile-first. Color palette (from prompt):
 *   amber #FFB347 | ink #0D1117 | paper #F5F5F5
 *   mint #00FF7F | rose #FF69B4 | magenta #E91E63
 * Comments in English only.
 * ============================================================ */

/* ---------- Reset & tokens ---------- */
:root {
    --pg41-ink: #0D1117;
    --pg41-ink2: #161b22;
    --pg41-ink3: #1f2630;
    --pg41-paper: #F5F5F5;
    --pg41-amber: #FFB347;
    --pg41-mint: #00FF7F;
    --pg41-rose: #FF69B4;
    --pg41-magenta: #E91E63;
    --pg41-line: rgba(255, 255, 255, .08);
    --pg41-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: "Be Vietnam Pro", "Segoe UI", Roboto, system-ui, sans-serif;
    background: radial-gradient(circle at top, #1b2330 0%, var(--pg41-ink) 60%);
    color: var(--pg41-paper);
    line-height: 1.55;
    font-size: 15px;
    min-height: 100vh;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--pg41-amber); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.pg41-wrap { width: 100%; max-width: 430px; margin: 0 auto; position: relative; }
@media (min-width: 768px) { .pg41-wrap { max-width: 1100px; } }

/* ---------- Top bar ---------- */
.pg41-header {
    position: sticky; top: 0; z-index: 1000;
    background: linear-gradient(180deg, rgba(13,17,23,.96), rgba(13,17,23,.86));
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--pg41-line);
    transition: padding .25s ease;
}
.pg41-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 10px 14px;
}
.pg41-header.pg41-shrink .pg41-header-inner { padding: 6px 14px; }
.pg41-logo {
    display: flex; align-items: center; gap: 8px;
    font-weight: 800; font-size: 20px; color: var(--pg41-amber);
    letter-spacing: .5px;
}
.pg41-logo i { color: var(--pg41-magenta); font-size: 22px; }
.pg41-logo span b { color: var(--pg41-paper); }

.pg41-actions { display: flex; align-items: center; gap: 8px; }
.pg41-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px; border-radius: 999px;
    font-weight: 700; font-size: 13px;
    transition: transform .15s ease, box-shadow .2s ease, opacity .2s;
    white-space: nowrap;
}
.pg41-btn:active { transform: scale(.96); }
.pg41-btn-login {
    color: var(--pg41-paper);
    border: 1px solid var(--pg41-line);
    background: var(--pg41-ink2);
}
.pg41-btn-login:hover { border-color: var(--pg41-amber); }
.pg41-btn-register {
    background: linear-gradient(135deg, var(--pg41-amber), var(--pg41-magenta));
    color: #1a1207; box-shadow: 0 6px 16px rgba(233,30,99,.32);
}
.pg41-btn-register:hover { opacity: .94; }

.pg41-menu-btn {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--pg41-ink2); border: 1px solid var(--pg41-line);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--pg41-paper); font-size: 18px;
}

/* ---------- Desktop nav ---------- */
.pg41-desktop-nav {
    display: none;
    gap: 22px; padding: 0 14px 10px;
    flex-wrap: wrap;
}
.pg41-desktop-nav a { color: #c7ccd6; font-size: 13px; font-weight: 600; }
.pg41-desktop-nav a:hover { color: var(--pg41-amber); }
@media (min-width: 768px) { .pg41-desktop-nav { display: flex; } }

/* ---------- Mobile menu (slide-in) ---------- */
.pg41-mobile-menu {
    position: fixed; top: 0; right: -86%;
    width: 84%; max-width: 340px; height: 100vh; z-index: 9999;
    background: linear-gradient(180deg, #141a24, #0d1117);
    padding: 80px 18px 24px;
    transform: translateX(0); transition: right .28s ease;
    overflow-y: auto;
    border-left: 1px solid var(--pg41-line);
}
.pg41-mobile-menu.pg41-open { right: 0; }
.pg41-mobile-menu a {
    display: block; padding: 13px 10px;
    color: var(--pg41-paper); font-weight: 600;
    border-bottom: 1px solid var(--pg41-line);
}
.pg41-mobile-menu a:hover { color: var(--pg41-amber); }
.pg41-menu-close {
    position: absolute; top: 14px; right: 14px;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--pg41-ink2); color: var(--pg41-paper);
    font-size: 20px;
}
.pg41-menu-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.55);
    z-index: 9998; opacity: 0; visibility: hidden;
    transition: opacity .25s ease;
}
.pg41-menu-backdrop.pg41-show { opacity: 1; visibility: visible; }
body.pg41-no-scroll { overflow: hidden; }

/* ---------- Hero carousel ---------- */
.pg41-hero {
    position: relative; margin: 14px;
    border-radius: 18px; overflow: hidden;
    box-shadow: var(--pg41-shadow);
    aspect-ratio: 16/9;
    background: var(--pg41-ink2);
}
.pg41-hero-slide {
    position: absolute; inset: 0;
    opacity: 0; transition: opacity .8s ease;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 18px;
}
.pg41-hero-slide.pg41-active { opacity: 1; }
.pg41-hero-slide::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.78));
}
.pg41-hero-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 0;
}
.pg41-hero-content { position: relative; z-index: 1; }
.pg41-hero-tag {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    background: rgba(255,179,71,.2); color: var(--pg41-amber);
    font-size: 11px; font-weight: 700; margin-bottom: 8px;
}
.pg41-hero-title {
    font-size: 22px; font-weight: 800; line-height: 1.2;
    color: #fff; margin-bottom: 6px;
}
.pg41-hero-sub { font-size: 13px; color: #d6dbe5; margin-bottom: 12px; }
.pg41-hero-cta { display: inline-flex; gap: 8px; }
.pg41-hero-dots {
    position: absolute; bottom: 10px; right: 14px; z-index: 2;
    display: flex; gap: 6px;
}
.pg41-hero-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,.35); transition: all .25s ease;
}
.pg41-hero-dot.pg41-active {
    background: var(--pg41-amber); width: 22px; border-radius: 5px;
}

/* ---------- Section scaffold ---------- */
.pg41-section { padding: 22px 14px; }
.pg41-section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.pg41-section-title {
    font-size: 19px; font-weight: 800; color: #fff;
    display: flex; align-items: center; gap: 8px;
}
.pg41-section-title i { color: var(--pg41-amber); }
.pg41-section-link { font-size: 12px; font-weight: 700; color: var(--pg41-amber); }

/* ---------- Marquee promo strip ---------- */
.pg41-strip {
    margin: 0 14px 14px; padding: 9px 14px;
    background: linear-gradient(90deg, rgba(233,30,99,.18), rgba(255,179,71,.18));
    border: 1px solid var(--pg41-line); border-radius: 12px;
    font-size: 12px; font-weight: 600; color: #ffe0b3;
    display: flex; align-items: center; gap: 8px;
    overflow: hidden;
}
.pg41-strip i { color: var(--pg41-rose); }

/* ---------- Category tabs ---------- */
.pg41-cat-tabs {
    display: flex; gap: 8px; overflow-x: auto;
    padding: 4px 14px 14px; scrollbar-width: none;
}
.pg41-cat-tabs::-webkit-scrollbar { display: none; }
.pg41-cat-tab {
    flex: 0 0 auto; padding: 8px 14px; border-radius: 999px;
    background: var(--pg41-ink2); border: 1px solid var(--pg41-line);
    color: #c7ccd6; font-size: 12px; font-weight: 700;
    white-space: nowrap;
}
.pg41-cat-tab.pg41-active {
    background: linear-gradient(135deg, var(--pg41-amber), var(--pg41-magenta));
    color: #1a1207; border-color: transparent;
}

/* ---------- Game grid ---------- */
.pg41-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (min-width: 540px) { .pg41-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 992px) { .pg41-grid { grid-template-columns: repeat(6, 1fr); } }

.pg41-card {
    background: var(--pg41-ink2); border: 1px solid var(--pg41-line);
    border-radius: 14px; overflow: hidden;
    transition: transform .18s ease, box-shadow .2s ease;
    position: relative;
}
.pg41-card:hover, .pg41-card:active {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0,0,0,.4);
    border-color: var(--pg41-amber);
}
.pg41-card-img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    background: #05070b;
}
.pg41-card-body { padding: 7px 8px 9px; }
.pg41-card-name {
    font-size: 11.5px; font-weight: 700; color: #e9edf3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pg41-card-play {
    position: absolute; top: 6px; right: 6px;
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(0,0,0,.55);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--pg41-mint); font-size: 12px;
    opacity: 0; transition: opacity .2s ease;
}
.pg41-card:hover .pg41-card-play { opacity: 1; }
.pg41-cat-pane { display: none; }
.pg41-cat-pane.pg41-active { display: block; }

/* ---------- Feature / promo block ---------- */
.pg41-feature {
    display: grid; gap: 10px;
    grid-template-columns: 1fr;
    padding: 0 14px;
}
@media (min-width: 768px) { .pg41-feature { grid-template-columns: repeat(3, 1fr); } }
.pg41-feature-card {
    background: linear-gradient(160deg, var(--pg41-ink2), var(--pg41-ink3));
    border: 1px solid var(--pg41-line); border-radius: 16px;
    padding: 18px; text-align: center;
}
.pg41-feature-card i {
    font-size: 30px; margin-bottom: 10px;
    background: linear-gradient(135deg, var(--pg41-amber), var(--pg41-magenta));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pg41-feature-card h3 { font-size: 16px; color: #fff; margin-bottom: 6px; }
.pg41-feature-card p { font-size: 12.5px; color: #b3bac6; }

/* ---------- SEO long-text ---------- */
.pg41-prose {
    padding: 22px 14px; line-height: 1.75;
    color: #c7ccd6; font-size: 14px;
}
.pg41-prose h2 {
    font-size: 20px; color: #fff; margin: 18px 0 10px;
    padding-left: 10px; border-left: 4px solid var(--pg41-amber);
}
.pg41-prose h3 { font-size: 16px; color: var(--pg41-amber); margin: 14px 0 8px; }
.pg41-prose p { margin-bottom: 10px; }
.pg41-prose ul { margin: 8px 0 12px 18px; }
.pg41-prose li { margin-bottom: 6px; }
.pg41-prose a { color: var(--pg41-mint); border-bottom: 1px dashed currentColor; }

/* ---------- FAQ ---------- */
.pg41-faq { padding: 22px 14px; }
.pg41-faq-item {
    background: var(--pg41-ink2); border: 1px solid var(--pg41-line);
    border-radius: 12px; margin-bottom: 10px; overflow: hidden;
}
.pg41-faq-q {
    width: 100%; text-align: left; padding: 14px 16px;
    font-weight: 700; font-size: 14px; color: #fff;
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px;
}
.pg41-faq-q .pg41-faq-icon { color: var(--pg41-amber); transition: transform .2s ease; }
.pg41-faq-item.pg41-open .pg41-faq-icon { transform: rotate(45deg); }
.pg41-faq-a {
    max-height: 0; overflow: hidden;
    transition: max-height .25s ease, padding .2s ease;
    padding: 0 16px; color: #b3bac6; font-size: 13px;
}
.pg41-faq-item.pg41-open .pg41-faq-a {
    max-height: 360px; padding: 0 16px 14px;
}

/* ---------- CTA banner ---------- */
.pg41-cta {
    margin: 22px 14px; padding: 24px 18px; text-align: center;
    border-radius: 18px; position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--pg41-magenta), var(--pg41-amber));
    color: #1a0a05;
}
.pg41-cta h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.pg41-cta p { font-size: 13px; margin-bottom: 14px; font-weight: 600; }
.pg41-cta .pg41-btn {
    background: #1a0a05; color: var(--pg41-amber);
    padding: 12px 26px; font-size: 14px;
}

/* ---------- Footer ---------- */
.pg41-footer {
    background: var(--pg41-ink2);
    border-top: 1px solid var(--pg41-line);
    padding: 26px 14px 90px;
    color: #97a0ad; font-size: 12.5px;
}
.pg41-footer-grid {
    display: grid; gap: 18px;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) { .pg41-footer-grid { grid-template-columns: repeat(4, 1fr); } }
.pg41-footer h4 {
    color: #fff; font-size: 14px; font-weight: 700;
    margin-bottom: 10px;
}
.pg41-footer a { color: #97a0ad; display: block; padding: 4px 0; }
.pg41-footer a:hover { color: var(--pg41-amber); }
.pg41-footer-bottom {
    margin-top: 18px; padding-top: 14px;
    border-top: 1px solid var(--pg41-line);
    text-align: center; font-size: 11.5px; color: #6a727e;
}

/* ---------- Back to top ---------- */
.pg41-to-top {
    position: fixed; right: 16px; bottom: 88px; z-index: 1100;
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--pg41-amber), var(--pg41-magenta));
    color: #1a0a05; font-size: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity .25s ease, transform .2s ease;
    box-shadow: var(--pg41-shadow);
}
.pg41-to-top.pg41-show { opacity: 1; visibility: visible; }
.pg41-to-top:active { transform: scale(.92); }

/* ---------- Mobile bottom nav ---------- */
.pg41-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
    height: 64px;
    background: linear-gradient(180deg, rgba(20,26,36,.98), rgba(13,17,23,.99));
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--pg41-line);
    display: flex; justify-content: space-around; align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom);
}
.pg41-bottom-nav button, .pg41-bottom-nav a {
    flex: 1; min-width: 60px; min-height: 60px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; color: #8b939f; font-size: 10.5px; font-weight: 700;
    transition: color .2s ease, transform .2s ease;
    text-decoration: none;
}
.pg41-bottom-nav button i, .pg41-bottom-nav a i { font-size: 22px; }
.pg41-bottom-nav button:active, .pg41-bottom-nav a:active { transform: translateY(-2px); }
.pg41-bottom-nav .pg41-bn-current { color: var(--pg41-amber); }
.pg41-bottom-nav .pg41-bn-promo {
    color: #fff;
    background: linear-gradient(180deg, transparent, rgba(233,30,99,.15));
}
.pg41-bottom-nav .pg41-bn-promo i { color: var(--pg41-mint); }
@media (min-width: 769px) { .pg41-bottom-nav { display: none; } }
@media (max-width: 768px) {
    main { padding-bottom: 84px; }
    .pg41-footer { padding-bottom: 90px; }
}

/* ---------- Utility ---------- */
.pg41-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;
}
.pg41-hide-mobile { display: none; }
@media (min-width: 768px) { .pg41-hide-mobile { display: block; } .pg41-hide-desktop { display: none; } }

/* ============================================================
 * PART1 supplements: homepage H1 + help-page blocks.
 * Same design tokens, all classes keep the `pg41-` prefix.
 * ============================================================ */

/* Homepage H1 - text matches the page title for SEO */
.pg41-h1 {
    margin: 14px 14px 0; padding: 13px 16px;
    font-size: 19px; line-height: 1.35; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, rgba(255,179,71,.14), rgba(233,30,99,.14));
    border: 1px solid var(--pg41-line); border-left: 4px solid var(--pg41-amber);
    border-radius: 14px;
}

/* Hero slides are clickable promo areas */
.pg41-hero-slide { cursor: pointer; }

/* Help-page hero banner */
.pg41-page-hero {
    margin: 14px; padding: 22px 18px; border-radius: 18px;
    background:
        radial-gradient(circle at 85% 12%, rgba(233,30,99,.32), transparent 55%),
        linear-gradient(135deg, var(--pg41-ink2), var(--pg41-ink3));
    border: 1px solid var(--pg41-line);
    box-shadow: var(--pg41-shadow);
}
.pg41-page-hero h1 { font-size: 21px; line-height: 1.3; color: #fff; margin-bottom: 8px; }
.pg41-page-hero p { font-size: 13px; color: #c7ccd6; margin-bottom: 12px; }
.pg41-page-hero .pg41-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pg41-page-hero .pg41-hero-cta a { font-size: 12.5px; color: var(--pg41-mint); }

/* Numbered step list */
.pg41-steps { display: grid; gap: 10px; padding: 0 14px; }
.pg41-step {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--pg41-ink2); border: 1px solid var(--pg41-line);
    border-radius: 14px; padding: 14px;
}
.pg41-step-num {
    flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; color: #1a1207;
    background: linear-gradient(135deg, var(--pg41-amber), var(--pg41-magenta));
}
.pg41-step h3 { font-size: 14.5px; color: #fff; margin-bottom: 4px; }
.pg41-step p { font-size: 12.5px; color: #b3bac6; }

/* Tip callout boxes */
.pg41-tip {
    margin: 14px; padding: 14px 16px; border-radius: 14px;
    background: rgba(0,255,127,.07); border: 1px solid rgba(0,255,127,.28);
    color: #d8ffe9; font-size: 12.5px;
}
.pg41-tip strong { color: var(--pg41-mint); }
.pg41-tip-warn {
    background: rgba(255,105,180,.08); border-color: rgba(255,105,180,.32);
    color: #ffd9ea;
}
.pg41-tip-warn strong { color: var(--pg41-rose); }

/* Compact stat tiles */
.pg41-stat-row {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 10px; padding: 0 14px;
}
@media (min-width: 540px) { .pg41-stat-row { grid-template-columns: repeat(4, 1fr); } }
.pg41-stat {
    background: var(--pg41-ink2); border: 1px solid var(--pg41-line);
    border-radius: 14px; padding: 14px 10px; text-align: center;
}
.pg41-stat b { display: block; font-size: 19px; color: var(--pg41-amber); }
.pg41-stat span { font-size: 11px; color: #b3bac6; }

/* Compact table */
.pg41-table {
    width: calc(100% - 28px); margin: 0 14px;
    border-collapse: collapse; font-size: 12.5px;
}
.pg41-table th, .pg41-table td {
    padding: 9px 10px; border: 1px solid var(--pg41-line); text-align: left;
}
.pg41-table th { background: var(--pg41-ink3); color: var(--pg41-amber); font-size: 12px; }
.pg41-table td { color: #c7ccd6; background: var(--pg41-ink2); }

/* Footer promo button row */
.pg41-footer-promos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pg41-footer-promos .pg41-btn { font-size: 12px; }
