/* ============================================================
 * okfun app - visual-okfun-app-bc87.css
 * Mobile-first gaming website stylesheet.
 * All custom classes/variables use the "g870-" prefix.
 * Palette: #FFA500 | #F08080 | #F8F9FA | #0A0A0A | #CD853F
 * ============================================================ */

:root {
    --g870-brand-orange: #FFA500;
    --g870-brand-coral: #F08080;
    --g870-brand-paper: #F8F9FA;
    --g870-brand-ink: #0A0A0A;
    --g870-brand-sand: #CD853F;
    --g870-bg: #0A0A0A;
    --g870-bg-soft: #161616;
    --g870-bg-card: #1f1b16;
    --g870-bg-elev: #26211a;
    --g870-line: rgba(255, 165, 0, 0.18);
    --g870-line-strong: rgba(255, 165, 0, 0.42);
    --g870-text: #F8F9FA;
    --g870-text-dim: #c9bfae;
    --g870-text-mute: #8c8170;
    --g870-accent: #FFA500;
    --g870-accent-2: #F08080;
    --g870-accent-3: #CD853F;
    --g870-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    --g870-radius: 3px;
    --g870-radius-sm: 10px;
    --g870-header-h: 58px;
    --g870-bnav-h: 62px;
    --g870-max: 430px;
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    background: radial-gradient(120% 80% at 50% -10%, #20180f 0%, #0A0A0A 60%);
    color: var(--g870-text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
}

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

a { color: var(--g870-accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

.g870-wrap {
    width: 100%;
    max-width: var(--g870-max);
    margin: 0 auto;
    padding: 0 14px;
}

.g870-main {
    padding-top: 8px;
    padding-bottom: calc(var(--g870-bnav-h) + 28px);
}

/* ============================================================
 * Header - brand + dual actions + menu trigger
 * ============================================================ */
.g870-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(180deg, rgba(15, 12, 8, 0.98), rgba(10, 10, 10, 0.92));
    border-bottom: 1px solid var(--g870-line);
    backdrop-filter: blur(8px);
}
.g870-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    height: var(--g870-header-h);
    padding: 0 12px;
    max-width: var(--g870-max);
    margin: 0 auto;
}
.g870-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.g870-brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
    border: 1px solid var(--g870-line-strong);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.4) inset, var(--g870-shadow);
    background: #1a140d;
}
.g870-brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}
.g870-brand-name strong {
    font-size: 15px;
    color: var(--g870-text);
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.g870-brand-name span {
    font-size: 10px;
    color: var(--g870-accent);
    text-transform: uppercase;
    letter-spacing: 1.4px;
}
.g870-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.g870-btn {
    border: none;
    cursor: pointer;
    font-weight: 700;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 12.5px;
    min-height: 36px;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}
.g870-btn:active { transform: scale(0.96); }
.g870-btn-secondary {
    background: transparent;
    color: var(--g870-text);
    border: 1px solid var(--g870-line-strong);
}
.g870-btn-primary {
    background: linear-gradient(135deg, var(--g870-accent) 0%, var(--g870-accent-2) 100%);
    color: #1a0d00;
    box-shadow: 0 6px 16px rgba(255, 165, 0, 0.35);
}
.g870-menu-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 165, 0, 0.10);
    border: 1px solid var(--g870-line);
    color: var(--g870-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.g870-menu-btn svg { width: 22px; height: 22px; }

/* ============================================================
 * Mobile slide-down menu
 * ============================================================ */
.g870-mobile-menu {
    position: fixed;
    top: var(--g870-header-h);
    left: 0;
    right: 0;
    background: #0e0c08;
    border-bottom: 1px solid var(--g870-line);
    max-height: 0;
    overflow: hidden;
    z-index: 55;
    transition: max-height 0.3s ease;
}
.g870-mobile-menu.g870-open { max-height: 80vh; overflow-y: auto; }
.g870-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px 12px 22px;
    max-width: var(--g870-max);
    margin: 0 auto;
}
.g870-menu-grid a {
    display: block;
    color: var(--g870-text);
    padding: 12px 12px;
    border-radius: var(--g870-radius-sm);
    background: var(--g870-bg-card);
    border: 1px solid var(--g870-line);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.g870-menu-grid a:hover { text-decoration: none; border-color: var(--g870-accent); }
.g870-menu-title {
    grid-column: 1 / -1;
    font-size: 11px;
    color: var(--g870-text-mute);
    text-transform: uppercase;
    letter-spacing: 1.6px;
    margin: 6px 2px 2px;
}
.g870-menu-cta {
    grid-column: 1 / -1;
    margin-top: 6px;
}
body.g870-menu-locked { overflow: hidden; }

/* ============================================================
 * Hero carousel
 * ============================================================ */
.g870-hero {
    position: relative;
    margin: 12px 0 4px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--g870-line);
    box-shadow: var(--g870-shadow);
}
.g870-hero-track { position: relative; height: 188px; }
.g870-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    cursor: pointer;
}
.g870-hero-slide.g870-active { opacity: 1; }
.g870-hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.g870-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10,10,10,0.86) 0%, rgba(10,10,10,0.25) 55%, rgba(10,10,10,0.05) 100%);
}
.g870-hero-copy {
    position: absolute;
    left: 14px;
    right: 90px;
    bottom: 16px;
    color: #fff;
}
.g870-hero-copy span {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--g870-accent);
    background: rgba(0,0,0,0.5);
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}
.g870-hero-copy strong {
    display: block;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
.g870-hero-copy em {
    display: block;
    font-style: normal;
    font-size: 12px;
    color: #ffe9c4;
    margin-top: 4px;
}
.g870-hero-dots {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 5px;
}
.g870-hero-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    border: none;
    padding: 0;
    cursor: pointer;
}
.g870-hero-dot.g870-active-dot {
    background: var(--g870-accent);
    box-shadow: 0 0 0 2px rgba(255,165,0,0.35);
}

/* ============================================================
 * Section shells & headings
 * ============================================================ */
.g870-section {
    margin: 18px 0 6px;
}
.g870-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    padding: 0 2px;
}
.g870-section-head h2 {
    margin: 0;
    font-size: 16px;
    color: var(--g870-text);
    font-weight: 800;
    letter-spacing: 0.3px;
}
.g870-section-head h2 span { color: var(--g870-accent); }
.g870-section-head a {
    font-size: 11px;
    color: var(--g870-accent-2);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.g870-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.g870-chips::-webkit-scrollbar { display: none; }
.g870-chip {
    flex: 0 0 auto;
    background: var(--g870-bg-card);
    color: var(--g870-text);
    border: 1px solid var(--g870-line);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    text-decoration: none;
    white-space: nowrap;
}
.g870-chip:hover { text-decoration: none; border-color: var(--g870-accent); }
.g870-chip span { color: var(--g870-accent); margin-left: 4px; font-weight: 800; }

/* ============================================================
 * Game grid - 4 columns at 320px, 4-5 at 375+
 * ============================================================ */
.g870-games {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
@media (min-width: 360px) {
    .g870-games { gap: 9px; }
}
@media (min-width: 392px) {
    .g870-games { grid-template-columns: repeat(5, 1fr); }
}
.g870-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--g870-bg-card);
    border: 1px solid var(--g870-line);
    border-radius: var(--g870-radius-sm);
    overflow: hidden;
    padding: 4px;
    cursor: pointer;
    text-decoration: none;
    color: var(--g870-text);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.g870-game:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: var(--g870-accent);
    background: var(--g870-bg-elev);
}
.g870-game-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: #0a0a0a;
}
.g870-game-name {
    margin-top: 5px;
    font-size: 10.5px;
    line-height: 1.2;
    text-align: center;
    color: var(--g870-text-dim);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 26px;
}

/* ============================================================
 * Editorial / SEO content blocks
 * ============================================================ */
.g870-card {
    background: var(--g870-bg-card);
    border: 1px solid var(--g870-line);
    border-radius: var(--g870-radius);
    padding: 14px;
    margin: 10px 0;
}
.g870-card h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--g870-accent);
    font-weight: 800;
    letter-spacing: 0.3px;
}
.g870-card p {
    margin: 0 0 8px;
    color: var(--g870-text-dim);
    font-size: 13px;
    line-height: 1.6;
}
.g870-card p:last-child { margin-bottom: 0; }
.g870-card a { color: var(--g870-accent-2); }
.g870-card ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: var(--g870-text-dim);
    font-size: 13px;
}
.g870-card li { margin-bottom: 5px; }
.g870-card li strong { color: var(--g870-text); }

.g870-pillars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 10px 0;
}
.g870-pillar {
    background: var(--g870-bg-card);
    border: 1px solid var(--g870-line);
    border-radius: var(--g870-radius-sm);
    padding: 12px;
    text-align: center;
}
.g870-pillar-ico {
    font-size: 22px;
    margin-bottom: 4px;
}
.g870-pillar strong {
    display: block;
    color: var(--g870-accent);
    font-size: 12.5px;
    font-weight: 800;
    margin-bottom: 3px;
}
.g870-pillar span {
    font-size: 11px;
    color: var(--g870-text-dim);
    line-height: 1.4;
    display: block;
}

.g870-steps {
    counter-reset: step;
    margin: 10px 0;
    padding: 0;
    list-style: none;
}
.g870-steps li {
    position: relative;
    padding: 10px 12px 10px 44px;
    margin-bottom: 8px;
    background: var(--g870-bg-card);
    border: 1px solid var(--g870-line);
    border-radius: var(--g870-radius-sm);
    color: var(--g870-text-dim);
    font-size: 12.5px;
    counter-increment: step;
}
.g870-steps li::before {
    content: counter(step);
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--g870-accent), var(--g870-accent-2));
    color: #1a0d00;
    border-radius: 50%;
    font-weight: 800;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.g870-steps li strong { color: var(--g870-text); display: block; margin-bottom: 2px; font-size: 13px; }

/* Inline link list (related pages) */
.g870-linklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 8px 0 0;
}
.g870-linklist a {
    display: block;
    background: var(--g870-bg-card);
    border: 1px solid var(--g870-line);
    border-radius: var(--g870-radius-sm);
    padding: 10px 12px;
    color: var(--g870-text);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.g870-linklist a:hover { text-decoration: none; border-color: var(--g870-accent); color: var(--g870-accent); }

/* ============================================================
 * Promo banners
 * ============================================================ */
.g870-promo {
    background: linear-gradient(135deg, #2a1a08 0%, #160d05 100%);
    border: 1px solid var(--g870-line-strong);
    border-radius: var(--g870-radius);
    padding: 14px;
    margin: 12px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}
.g870-promo-ico {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--g870-accent), var(--g870-accent-2));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.g870-promo-body { flex: 1; min-width: 0; }
.g870-promo-body strong { display: block; color: var(--g870-text); font-size: 13.5px; font-weight: 800; }
.g870-promo-body span { display: block; color: var(--g870-text-dim); font-size: 11.5px; margin-top: 2px; }
.g870-promo-cta {
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--g870-accent), var(--g870-accent-2));
    color: #1a0d00;
    border: none;
    border-radius: 999px;
    padding: 9px 14px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    min-height: 38px;
}

/* ============================================================
 * Extended footer (homepage only)
 * ============================================================ */
.g870-extfoot {
    margin-top: 18px;
    background: var(--g870-bg-soft);
    border: 1px solid var(--g870-line);
    border-radius: var(--g870-radius);
    padding: 14px;
}
.g870-extfoot h3 {
    margin: 0 0 8px;
    color: var(--g870-accent);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.g870-extfoot p { font-size: 12.5px; color: var(--g870-text-dim); margin: 0 0 10px; }
.g870-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.g870-shortcuts a {
    display: flex;
    flex-direction: column;
    padding: 10px 11px;
    background: var(--g870-bg-card);
    border: 1px solid var(--g870-line);
    border-radius: var(--g870-radius-sm);
    color: var(--g870-text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}
.g870-shortcuts a span { color: var(--g870-text-mute); font-size: 10.5px; font-weight: 500; margin-top: 2px; }
.g870-shortcuts a:hover { text-decoration: none; border-color: var(--g870-accent); }

.g870-disclaimer {
    margin-top: 12px;
    padding: 12px;
    background: rgba(240, 128, 128, 0.06);
    border: 1px dashed rgba(240, 128, 128, 0.35);
    border-radius: var(--g870-radius-sm);
    color: var(--g870-text-mute);
    font-size: 11.5px;
    line-height: 1.55;
}

/* ============================================================
 * Footer
 * ============================================================ */
.g870-footer {
    margin-top: 18px;
    padding: 16px 0 calc(var(--g870-bnav-h) + 18px);
    border-top: 1px solid var(--g870-line);
    color: var(--g870-text-mute);
    font-size: 11.5px;
    text-align: center;
    background: #060504;
}
.g870-footer a { color: var(--g870-text-dim); }
.g870-footer p { margin: 0 0 6px; }

/* ============================================================
 * Bottom navigation - hover-floating resting anchor
 * 5 roles: Home / Promo 1 / Promo 2 / Free Play (functional) / Safety (help)
 * ============================================================ */
.g870-bnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    height: var(--g870-bnav-h);
    background: linear-gradient(180deg, rgba(12,10,7,0.97), rgba(6,5,4,0.99));
    border-top: 1px solid var(--g870-line-strong);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.45);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.g870-bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 100%;
    color: var(--g870-text-mute);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: color 0.18s ease, transform 0.18s ease;
}
.g870-bnav-item:hover { text-decoration: none; }
.g870-bnav-item:active { transform: translateY(-1px); }
.g870-bnav-ico {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.g870-bnav-ico svg { width: 22px; height: 22px; }
.g870-bnav-label { font-size: 9.5px; line-height: 1; }
.g870-bnav-current { color: var(--g870-accent); }
.g870-bnav-current .g870-bnav-ico {
    transform: translateY(-3px);
    filter: drop-shadow(0 4px 6px rgba(255,165,0,0.5));
}
.g870-bnav-promo {
    position: relative;
    color: var(--g870-accent-2);
}
.g870-bnav-promo::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--g870-accent), var(--g870-accent-2));
    box-shadow: 0 4px 12px rgba(255,165,0,0.45);
    z-index: -1;
}
.g870-bnav-promo .g870-bnav-ico {
    transform: translateY(-4px);
    color: #1a0d00;
}
.g870-bnav-promo .g870-bnav-ico svg { width: 20px; height: 20px; }
.g870-bnav-promo .g870-bnav-label { color: var(--g870-accent); }

/* ============================================================
 * Reveal animation
 * ============================================================ */
.g870-reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.g870-reveal.g870-shown { opacity: 1; transform: none; }

/* ============================================================
 * Visually-hidden helper
 * ============================================================ */
.g870-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}
