/*!
 * 888jili.cyou - Mobile-first design stylesheet
 * All custom classes use the pg24- prefix.
 * Palette: #212F3D base, #BDB76B gold, #FF69B4 pink, #FFFACD cream.
 * Comments are in English per project convention.
 */

/* ---------- Reset & root ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --pg24-bg: #212F3D;
    --pg24-bg-2: #18222D;
    --pg24-bg-3: #283A4C;
    --pg24-gold: #BDB76B;
    --pg24-pink: #FF69B4;
    --pg24-cream: #FFFACD;
    --pg24-text: #FFFACD;
    --pg24-muted: #C9D2DA;
    --pg24-line: rgba(189, 183, 107, 0.25);
    --pg24-radius: 14px;
    --pg24-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

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

body {
    font-family: "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
    background: radial-gradient(circle at top, #283A4C 0%, #18222D 70%, #0F1620 100%);
    color: var(--pg24-text);
    line-height: 1.55;
    font-size: 15px;
    overflow-x: hidden;
    min-height: 100vh;
}

a { color: var(--pg24-gold); text-decoration: none; }
a:hover { color: var(--pg24-pink); }
img { max-width: 100%; display: block; }

.pg24-wrap { width: 100%; max-width: 430px; margin: 0 auto; position: relative; }

/* ---------- Header ---------- */
.pg24-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg, #212F3D 0%, #1A2733 100%);
    border-bottom: 1px solid var(--pg24-line);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.pg24-header-inner {
    max-width: 430px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    gap: 10px;
}

.pg24-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--pg24-gold); letter-spacing: 0.5px; }
.pg24-logo .pg24-logo-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #BDB76B, #FF69B4); display: inline-flex; align-items: center; justify-content: center; color: #212F3D; font-weight: 900; font-size: 16px; }
.pg24-logo small { display: block; font-size: 10px; color: var(--pg24-cream); opacity: 0.8; font-weight: 500; letter-spacing: 1px; }

.pg24-head-actions { display: flex; align-items: center; gap: 8px; }

.pg24-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    padding: 9px 16px;
    border-radius: 30px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    text-decoration: none;
    line-height: 1;
}
.pg24-btn:active { transform: scale(0.96); }

.pg24-btn-register {
    background: linear-gradient(135deg, #FF69B4 0%, #BDB76B 100%);
    color: #212F3D;
    box-shadow: 0 4px 14px rgba(255, 105, 180, 0.45);
}
.pg24-btn-register:hover { color: #212F3D; box-shadow: 0 6px 18px rgba(255, 105, 180, 0.6); }

.pg24-btn-login {
    background: transparent;
    color: var(--pg24-gold);
    border: 1.5px solid var(--pg24-gold);
}
.pg24-btn-login:hover { background: rgba(189, 183, 107, 0.12); color: var(--pg24-cream); }

.pg24-menu-btn {
    background: transparent;
    border: none;
    color: var(--pg24-gold);
    font-size: 22px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pg24-menu-btn:hover { background: rgba(189, 183, 107, 0.12); }

/* ---------- Mobile menu ---------- */
#pg24MobileMenu {
    position: fixed;
    top: 0;
    right: -86%;
    width: 80%;
    max-width: 340px;
    height: 100vh;
    background: linear-gradient(160deg, #212F3D 0%, #0F1620 100%);
    z-index: 9999;
    padding: 22px 18px;
    overflow-y: auto;
    transition: right 0.32s ease;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
}
#pg24MobileMenu.pg24-open { right: 0; }
.pg24-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--pg24-line); }
.pg24-menu-head span { font-weight: 800; color: var(--pg24-gold); font-size: 18px; }
.pg24-menu-close { background: transparent; border: none; color: var(--pg24-cream); font-size: 24px; cursor: pointer; }
.pg24-menu-link { display: flex; align-items: center; gap: 12px; padding: 13px 12px; color: var(--pg24-cream); font-weight: 600; border-radius: 10px; border-bottom: 1px solid rgba(189, 183, 107, 0.12); }
.pg24-menu-link:hover { background: rgba(189, 183, 107, 0.1); color: var(--pg24-gold); }
.pg24-menu-link i { width: 22px; text-align: center; color: var(--pg24-pink); }
.pg24-menu-cta { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }

#pg24MenuBackdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#pg24MenuBackdrop.pg24-show { opacity: 1; pointer-events: auto; }

/* ---------- Main ---------- */
main { padding-bottom: 80px; }

.pg24-section { padding: 26px 16px; }
.pg24-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pg24-section-title { font-size: 20px; font-weight: 800; color: var(--pg24-cream); display: flex; align-items: center; gap: 8px; }
.pg24-section-title i { color: var(--pg24-pink); }
.pg24-section-more { font-size: 12px; color: var(--pg24-gold); font-weight: 600; }

/* ---------- Hero carousel ---------- */
.pg24-hero { position: relative; padding: 18px 16px 6px; }
.pg24-hero-track { position: relative; border-radius: 18px; overflow: hidden; box-shadow: var(--pg24-shadow); }
.pg24-hero-slide {
    display: none;
    position: relative;
    background: linear-gradient(135deg, #2A3D52 0%, #1A2733 100%);
    border: 1px solid var(--pg24-line);
}
.pg24-hero-slide.pg24-active { display: block; animation: pg24Fade 0.6s ease; }
@keyframes pg24Fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.pg24-hero-slide-inner { padding: 26px 20px; }
.pg24-hero-badge { display: inline-block; background: rgba(255, 105, 180, 0.18); color: var(--pg24-pink); font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 20px; margin-bottom: 12px; letter-spacing: 1px; }
.pg24-hero-title { font-size: 26px; font-weight: 900; line-height: 1.15; color: var(--pg24-cream); margin-bottom: 10px; }
.pg24-hero-title em { color: var(--pg24-gold); font-style: normal; }
.pg24-hero-desc { font-size: 13px; color: var(--pg24-muted); margin-bottom: 18px; }
.pg24-hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.pg24-hero-dots { display: flex; justify-content: center; gap: 7px; margin-top: 12px; }
.pg24-hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(189, 183, 107, 0.4); cursor: pointer; transition: all 0.25s ease; }
.pg24-hero-dot.pg24-active { width: 22px; border-radius: 6px; background: var(--pg24-gold); }

/* ---------- Quick stat strip ---------- */
.pg24-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 16px; margin-top: 8px; }
.pg24-stat { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--pg24-line); border-radius: 12px; padding: 12px 6px; text-align: center; }
.pg24-stat-num { display: block; font-size: 18px; font-weight: 900; color: var(--pg24-gold); }
.pg24-stat-label { display: block; font-size: 10px; color: var(--pg24-muted); margin-top: 3px; }

/* ---------- Category tabs ---------- */
.pg24-cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px; scrollbar-width: none; }
.pg24-cat-tabs::-webkit-scrollbar { display: none; }
.pg24-cat-tab {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pg24-line);
    color: var(--pg24-cream);
    padding: 9px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.pg24-cat-tab i { margin-right: 5px; }
.pg24-cat-tab.pg24-active {
    background: linear-gradient(135deg, #FF69B4, #BDB76B);
    color: #212F3D;
    border-color: transparent;
}

/* ---------- Game grid & cards ---------- */
.pg24-games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 4px 16px 8px;
}
.pg24-game-card {
    background: linear-gradient(160deg, #2A3D52 0%, #1A2733 100%);
    border: 1px solid var(--pg24-line);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}
.pg24-game-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(255, 105, 180, 0.18); border-color: var(--pg24-pink); }
.pg24-game-thumb { aspect-ratio: 1 / 1; background: #0F1620; position: relative; overflow: hidden; }
.pg24-game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pg24-game-tag { position: absolute; top: 6px; left: 6px; background: rgba(255, 105, 180, 0.85); color: #212F3D; font-size: 9px; font-weight: 800; padding: 3px 7px; border-radius: 6px; letter-spacing: 0.4px; }
.pg24-game-name { padding: 7px 8px; font-size: 11px; font-weight: 700; color: var(--pg24-cream); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg24-game-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 22, 32, 0.7);
    color: var(--pg24-gold);
    font-size: 22px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.pg24-game-card:hover .pg24-game-play { opacity: 1; }

/* ---------- Feature / promo banner ---------- */
.pg24-promo-banner {
    margin: 8px 16px 0;
    padding: 20px 18px;
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(255, 105, 180, 0.18) 0%, rgba(189, 183, 107, 0.18) 100%);
    border: 1px solid var(--pg24-line);
    position: relative;
    overflow: hidden;
}
.pg24-promo-banner h3 { font-size: 19px; color: var(--pg24-gold); margin-bottom: 8px; font-weight: 800; }
.pg24-promo-banner p { font-size: 13px; color: var(--pg24-muted); margin-bottom: 14px; }

/* ---------- SEO content ---------- */
.pg24-prose { padding: 24px 18px; }
.pg24-prose h2 { font-size: 21px; color: var(--pg24-gold); margin-bottom: 12px; font-weight: 800; line-height: 1.25; }
.pg24-prose h3 { font-size: 17px; color: var(--pg24-cream); margin: 18px 0 8px; font-weight: 700; }
.pg24-prose p { font-size: 14px; color: var(--pg24-muted); margin-bottom: 12px; line-height: 1.7; }
.pg24-prose ul { padding-left: 20px; margin-bottom: 14px; }
.pg24-prose li { font-size: 14px; color: var(--pg24-muted); margin-bottom: 6px; line-height: 1.6; }
.pg24-prose .pg24-kw-link { color: var(--pg24-pink); font-weight: 600; cursor: pointer; }
.pg24-prose .pg24-kw-link:hover { text-decoration: underline; }

/* ---------- FAQ ---------- */
.pg24-faq-item { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--pg24-line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.pg24-faq-head { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 700; color: var(--pg24-cream); font-size: 14px; }
.pg24-faq-head i { color: var(--pg24-pink); transition: transform 0.2s ease; }
.pg24-faq-item.pg24-open .pg24-faq-head i { transform: rotate(45deg); }
.pg24-faq-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0 16px; color: var(--pg24-muted); font-size: 13px; }
.pg24-faq-item.pg24-open .pg24-faq-body { max-height: 320px; padding: 0 16px 14px; }

/* ---------- Footer ---------- */
.pg24-footer { background: #0F1620; border-top: 1px solid var(--pg24-line); padding: 28px 18px 20px; }
.pg24-footer-brand { font-size: 20px; font-weight: 900; color: var(--pg24-gold); margin-bottom: 8px; }
.pg24-footer p { font-size: 12px; color: var(--pg24-muted); margin-bottom: 16px; line-height: 1.65; }
.pg24-footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.pg24-footer-col h4 { font-size: 13px; color: var(--pg24-cream); margin-bottom: 10px; font-weight: 700; letter-spacing: 0.5px; }
.pg24-footer-col a { display: block; font-size: 12px; color: var(--pg24-muted); padding: 4px 0; }
.pg24-footer-col a:hover { color: var(--pg24-pink); }
.pg24-footer-bottom { border-top: 1px solid var(--pg24-line); padding-top: 14px; text-align: center; font-size: 11px; color: var(--pg24-muted); }
.pg24-18plus { display: inline-block; border: 1.5px solid var(--pg24-gold); color: var(--pg24-gold); border-radius: 50%; width: 26px; height: 26px; line-height: 23px; text-align: center; font-weight: 900; font-size: 11px; margin-bottom: 10px; }

/* ---------- Mobile bottom nav ---------- */
.pg24-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: linear-gradient(180deg, #1A2733 0%, #0F1620 100%);
    border-top: 1px solid var(--pg24-line);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
}
.pg24-nav-btn {
    flex: 1;
    min-width: 60px;
    min-height: 60px;
    background: transparent;
    border: none;
    color: var(--pg24-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}
.pg24-nav-btn i { font-size: 22px; transition: transform 0.2s ease; }
.pg24-nav-btn .material-icons-outlined,
.pg24-nav-btn .material-icons { font-size: 24px; }
.pg24-nav-btn:hover { color: var(--pg24-gold); }
.pg24-nav-btn:hover i { transform: translateY(-2px); }
.pg24-nav-btn.pg24-nav-active { color: var(--pg24-pink); }
.pg24-nav-btn.pg24-nav-promo { color: var(--pg24-gold); }
.pg24-nav-btn.pg24-nav-promo i {
    background: linear-gradient(135deg, #FF69B4, #BDB76B);
    color: #212F3D;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -18px;
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.5);
    font-size: 20px;
    border: 3px solid #0F1620;
}

/* ---------- Back to top ---------- */
#pg24BackTop {
    position: fixed;
    bottom: 76px;
    right: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF69B4, #BDB76B);
    color: #212F3D;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
#pg24BackTop.pg24-show { opacity: 1; pointer-events: auto; }
#pg24BackTop:hover { transform: translateY(-3px); }

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
    body { background: radial-gradient(circle at top, #283A4C 0%, #18222D 60%, #0F1620 100%); }
    .pg24-wrap { max-width: 960px; }
    .pg24-header-inner { max-width: 960px; }
    .pg24-games-grid { grid-template-columns: repeat(6, 1fr); }
    .pg24-bottom-nav { display: none; }
    main { padding-bottom: 40px; }
    .pg24-hero-title { font-size: 34px; }
    .pg24-stats { max-width: 960px; margin-left: auto; margin-right: auto; }
    .pg24-footer-cols { grid-template-columns: repeat(4, 1fr); }
}
