/* ============================================================
   ph365 app - shared layout (basefiles)
   Prefix: vf41-
   Mobile-first canvas 320-430px. Dark base + warm accents.
   ============================================================ */

:root {
    --vf41-bg: #34495E;
    --vf41-bg-2: #2c3e50;
    --vf41-bg-3: #3b5168;
    --vf41-paper: #E9ECEF;
    --vf41-cream: #FFDFBA;
    --vf41-cream-2: #FFFFBA;
    --vf41-accent: #FF9800;
    --vf41-accent-2: #ffb74d;
    --vf41-ink: #1f2d3d;
    --vf41-muted: #9fb0c1;
    --vf41-line: rgba(255, 223, 186, 0.18);
    --vf41-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
    --vf41-radius: 14px;
    --vf41-max: 430px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--vf41-bg);
    color: var(--vf41-paper);
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 50% -10%, #3b5168 0%, var(--vf41-bg) 55%, var(--vf41-bg-2) 100%);
    /* Reserve space for fixed bottom nav */
    padding-bottom: 72px;
}

a { color: var(--vf41-cream-2); text-decoration: none; }
a:hover { color: #fff; }
img { display: block; max-width: 100%; }

/* Center the mobile canvas on wider screens */
.vf41-shell {
    max-width: var(--vf41-max);
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--vf41-bg) 0%, var(--vf41-bg-2) 100%);
    box-shadow: var(--vf41-shadow);
    position: relative;
}

/* ---------------- Top header (brand + actions two-row) ---------------- */
.vf41-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(180deg, #2c3e50 0%, #3b5168 100%);
    border-bottom: 1px solid var(--vf41-line);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.vf41-topbar-inner {
    max-width: var(--vf41-max);
    margin: 0 auto;
    padding: 8px 12px 6px;
}

.vf41-brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

.vf41-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--vf41-cream);
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex: 0 0 auto;
}

.vf41-brand-meta { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.vf41-brand-name {
    font-weight: 800;
    font-size: 17px;
    color: #fff;
    letter-spacing: 0.2px;
}
.vf41-brand-tag {
    font-size: 11px;
    color: var(--vf41-cream-2);
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.vf41-brand-spacer { flex: 1 1 auto; }

.vf41-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--vf41-line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--vf41-cream);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
}
.vf41-menu-btn:hover { background: rgba(255, 152, 0, 0.18); }
.vf41-menu-btn svg { width: 20px; height: 20px; }

/* Action row (Register / Login) */
.vf41-action-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.vf41-btn {
    flex: 1 1 0;
    min-height: 42px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.12s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.vf41-btn:active { transform: translateY(1px); }

.vf41-btn-login {
    background: transparent;
    color: var(--vf41-cream-2);
    border: 1px solid var(--vf41-line);
}
.vf41-btn-login:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.vf41-btn-register {
    background: linear-gradient(135deg, var(--vf41-accent) 0%, #ff7600 100%);
    color: #1f2d3d;
    box-shadow: 0 6px 14px rgba(255, 152, 0, 0.35);
}
.vf41-btn-register:hover { filter: brightness(1.06); }

.vf41-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--vf41-paper);
    border: 1px solid var(--vf41-line);
}
.vf41-btn-ghost:hover { background: rgba(255, 152, 0, 0.18); color: #fff; }

/* ---------------- Side drawer ---------------- */
.vf41-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 80;
}
.vf41-scrim-on { opacity: 1; pointer-events: auto; }

.vf41-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(82vw, 320px);
    background: var(--vf41-bg-2);
    border-left: 1px solid var(--vf41-line);
    transform: translateX(105%);
    transition: transform 0.26s ease;
    z-index: 90;
    overflow-y: auto;
    padding: 16px 14px 32px;
    box-shadow: -10px 0 28px rgba(0, 0, 0, 0.4);
}
.vf41-drawer-open { transform: translateX(0); }

.vf41-drawer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.vf41-drawer-head .vf41-logo { width: 34px; height: 34px; }
.vf41-drawer-title { font-weight: 800; color: #fff; font-size: 16px; }

.vf41-drawer-close {
    margin-left: auto;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--vf41-line);
    background: transparent;
    color: var(--vf41-cream);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.vf41-drawer-group { margin: 14px 0 6px; }
.vf41-drawer-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--vf41-muted);
    padding: 0 6px;
    margin-bottom: 6px;
}
.vf41-drawer-link {
    display: block;
    padding: 11px 12px;
    border-radius: 10px;
    color: var(--vf41-paper);
    font-size: 14px;
    margin-bottom: 4px;
    border: 1px solid transparent;
}
.vf41-drawer-link:hover {
    background: rgba(255, 152, 0, 0.14);
    border-color: var(--vf41-line);
    color: #fff;
}

.vf41-drawer-cta {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ---------------- Hero carousel ---------------- */
.vf41-hero {
    position: relative;
    margin: 12px;
    border-radius: var(--vf41-radius);
    overflow: hidden;
    box-shadow: var(--vf41-shadow);
    background: #1f2d3d;
}
.vf41-hero-track { position: relative; height: 188px; }
.vf41-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.45s ease;
    cursor: pointer;
}
.vf41-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vf41-hero-active { opacity: 1; }

.vf41-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 14px 16px;
    background: linear-gradient(0deg, rgba(15, 23, 34, 0.86) 0%, rgba(15, 23, 34, 0) 100%);
    color: #fff;
}
.vf41-hero-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}
.vf41-hero-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--vf41-cream-2);
}
.vf41-hero-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--vf41-accent) 0%, #ff7600 100%);
    color: #1f2d3d;
    font-weight: 800;
    font-size: 12px;
}

.vf41-hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.vf41-hero-arrow svg { width: 18px; height: 18px; }
.vf41-hero-prev { left: 8px; }
.vf41-hero-next { right: 8px; }

.vf41-hero-dots {
    position: absolute;
    bottom: 8px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 6;
}
.vf41-hero-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}
.vf41-dot-on { background: var(--vf41-accent); }

/* ---------------- Section heading ---------------- */
.vf41-section {
    padding: 18px 12px 6px;
}
.vf41-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.vf41-section-bar {
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--vf41-accent) 0%, var(--vf41-cream) 100%);
}
.vf41-section-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}
.vf41-section-sub {
    font-size: 12px;
    color: var(--vf41-muted);
    margin-top: 2px;
}

/* Category quick chips */
.vf41-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 12px 10px;
    scrollbar-width: none;
}
.vf41-chips::-webkit-scrollbar { display: none; }
.vf41-chip {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--vf41-line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--vf41-paper);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.vf41-chip:hover { background: rgba(255, 152, 0, 0.2); color: #fff; }

/* ---------------- Game grid ---------------- */
.vf41-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 0 12px 4px;
}
@media (min-width: 375px) {
    .vf41-game-grid { grid-template-columns: repeat(5, 1fr); gap: 9px; }
}

.vf41-game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--vf41-line);
    border-radius: 12px;
    padding: 6px 4px 8px;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.18s ease, background 0.18s ease;
}
.vf41-game-card:hover {
    transform: translateY(-2px);
    border-color: var(--vf41-accent);
    background: rgba(255, 152, 0, 0.1);
}
.vf41-game-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 9px;
    object-fit: cover;
    background: #1f2d3d;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.vf41-game-name {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.25;
    color: var(--vf41-paper);
    font-weight: 600;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 28px;
}

/* Category tag pill */
.vf41-cat-tag {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--vf41-cream);
    background: rgba(255, 152, 0, 0.18);
    border: 1px solid var(--vf41-line);
    padding: 3px 9px;
    border-radius: 999px;
    margin-left: auto;
}

/* ---------------- Info / highlight cards ---------------- */
.vf41-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 12px;
}
.vf41-info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--vf41-line);
    border-radius: 12px;
    padding: 12px;
}
.vf41-info-card h3 {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--vf41-cream-2);
}
.vf41-info-card p {
    margin: 0;
    font-size: 12.5px;
    color: var(--vf41-paper);
    line-height: 1.5;
}

/* Checklist */
.vf41-checklist { list-style: none; margin: 0; padding: 0; }
.vf41-checklist li {
    position: relative;
    padding: 8px 8px 8px 28px;
    font-size: 13px;
    color: var(--vf41-paper);
    border-bottom: 1px dashed var(--vf41-line);
}
.vf41-checklist li:last-child { border-bottom: none; }
.vf41-checklist li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 11px;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--vf41-accent);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.18);
}

/* Testimonial row */
.vf41-quote-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 12px;
}
.vf41-quote {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--vf41-accent);
    border-radius: 10px;
    padding: 12px;
}
.vf41-quote p { margin: 0 0 6px; font-size: 13px; color: var(--vf41-paper); }
.vf41-quote cite { font-style: normal; color: var(--vf41-cream-2); font-size: 12px; font-weight: 700; }

/* SEO prose block */
.vf41-prose {
    padding: 4px 14px 10px;
    color: var(--vf41-paper);
    font-size: 13.5px;
    line-height: 1.65;
}
.vf41-prose h2 {
    color: #fff;
    font-size: 16px;
    margin: 18px 0 6px;
}
.vf41-prose h3 {
    color: var(--vf41-cream-2);
    font-size: 14px;
    margin: 12px 0 4px;
}
.vf41-prose p { margin: 0 0 10px; }
.vf41-prose a { color: var(--vf41-accent-2); text-decoration: underline; }
.vf41-prose ul { margin: 0 0 10px; padding-left: 18px; }
.vf41-prose li { margin-bottom: 4px; }

/* Promo inline link */
.vf41-inline-cta {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--vf41-accent) 0%, #ff7600 100%);
    color: #1f2d3d;
    font-weight: 800;
    font-size: 13px;
    margin: 4px 0 8px;
    cursor: pointer;
}

/* ---------------- Extended footer (home only) ---------------- */
.vf41-ext-footer {
    margin: 18px 12px 6px;
    border-radius: 14px;
    background: linear-gradient(180deg, #2c3e50 0%, #233242 100%);
    border: 1px solid var(--vf41-line);
    padding: 16px 14px;
}
.vf41-ext-foot-title {
    margin: 0 0 4px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}
.vf41-ext-foot-intro {
    margin: 0 0 12px;
    color: var(--vf41-muted);
    font-size: 12.5px;
    line-height: 1.55;
}
.vf41-ext-block { margin-top: 12px; }
.vf41-ext-block h4 {
    margin: 0 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--vf41-cream);
}
.vf41-ext-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.vf41-ext-list a {
    font-size: 12.5px;
    color: var(--vf41-paper);
    padding: 4px 0;
    border-bottom: 1px dashed transparent;
}
.vf41-ext-list a:hover { color: var(--vf41-accent-2); border-bottom-color: var(--vf41-line); }

.vf41-ext-promo-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 6px;
}
.vf41-ext-promo {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--vf41-line);
    background: rgba(255, 152, 0, 0.12);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}
.vf41-ext-promo:hover { background: rgba(255, 152, 0, 0.22); }

.vf41-ext-disclaimer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--vf41-line);
    font-size: 11.5px;
    color: var(--vf41-muted);
    line-height: 1.55;
}

/* ---------------- Footer (shared, simple) ---------------- */
.vf41-footer {
    padding: 16px 14px 22px;
    text-align: center;
    color: var(--vf41-muted);
    font-size: 12px;
    border-top: 1px solid var(--vf41-line);
    margin-top: 16px;
}
.vf41-footer a { color: var(--vf41-cream-2); }

/* ---------------- Bottom navigation (outlined functional bar) ---------------- */
.vf41-bnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    background: linear-gradient(180deg, #2c3e50 0%, #233242 100%);
    border-top: 1px solid var(--vf41-accent);
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.35);
}
.vf41-bnav-inner {
    max-width: var(--vf41-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: stretch;
    padding: 6px 4px;
}
.vf41-bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px;
    min-height: 56px;
    color: var(--vf41-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.18s ease, transform 0.12s ease;
}
.vf41-bnav-item:hover { color: var(--vf41-cream-2); }
.vf41-bnav-item:active { transform: translateY(1px); }
.vf41-bnav-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--vf41-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.18s ease, border-color 0.18s ease;
}
.vf41-bnav-icon svg { width: 16px; height: 16px; }
.vf41-bnav-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.vf41-bnav-active {
    color: #fff;
}
.vf41-bnav-active .vf41-bnav-icon {
    background: var(--vf41-accent);
    border-color: var(--vf41-accent);
    color: #1f2d3d;
    transform: translateY(-1px);
}

/* Utility */
.vf41-container { padding: 0 12px; }
.vf41-mt-8 { margin-top: 8px; }
.vf41-divider {
    height: 1px;
    background: var(--vf41-line);
    margin: 14px 12px;
}
.vf41-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
