/* ============================================================
 * 644.homes - view-910173.css
 * Mobile-first styles for the 644 gaming portal.
 * All custom classes / variables use the `pg91-` prefix.
 * Palette: #1A1A1A | #2F2F2F | #4A4A4A | #9370DB | #D8BFD8
 * Canvas: 320-430px phones. Wider screens keep the phone canvas
 * centered; no desktop-width layout is provided.
 * ============================================================ */

:root {
    --pg91-bg-deep: #1A1A1A;
    --pg91-bg-mid: #2F2F2F;
    --pg91-bg-soft: #3A3A3A;
    --pg91-border: #4A4A4A;
    --pg91-accent: #9370DB;
    --pg91-accent-soft: #B58FE0;
    --pg91-thistle: #D8BFD8;
    --pg91-text: #F4ECF7;
    --pg91-text-mute: #B6A7C4;
    --pg91-warn: #E6C988;
    --pg91-radius-sm: 8px;
    --pg91-radius: 14px;
    --pg91-radius-lg: 20px;
    --pg91-gap: 10px;
    --pg91-bar-h: 62px;
    --pg91-header-h: 56px;
    --pg91-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    background: var(--pg91-bg-deep);
    color: var(--pg91-text);
    font-family: "Hind Siliguri", "Noto Sans Bengali", "Segoe UI", Roboto, system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    /* Reserve space for the fixed bottom nav */
    padding-bottom: calc(var(--pg91-bar-h) + 16px);
}

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

a {
    color: var(--pg91-thistle);
    text-decoration: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--pg91-accent);
    outline-offset: 2px;
}

/* Phone canvas wrapper - keeps layout centered on wider screens */
.pg91-canvas {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
}

/* ============================================================
 * Header - minimal title + action band
 * ============================================================ */
.pg91-header {
    position: sticky;
    top: 0;
    z-index: 60;
    height: var(--pg91-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: linear-gradient(180deg, #1F1A24 0%, #1A1A1A 100%);
    border-bottom: 1px solid var(--pg91-border);
}

.pg91-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pg91-thistle);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pg91-brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: radial-gradient(circle at 35% 30%, var(--pg91-accent-soft), var(--pg91-accent) 60%, #5B3E96 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.5);
}

.pg91-brand-name {
    font-size: 16px;
    line-height: 1;
}

.pg91-brand-sub {
    display: block;
    font-size: 10px;
    color: var(--pg91-text-mute);
    font-weight: 500;
    letter-spacing: 0.6px;
}

.pg91-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pg91-btn {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    border: none;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.18s ease;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pg91-btn-login {
    background: transparent;
    color: var(--pg91-thistle);
    border: 1px solid var(--pg91-border);
    padding: 8px 14px;
}

.pg91-btn-register {
    background: linear-gradient(135deg, var(--pg91-accent) 0%, #7351B0 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(147, 112, 219, 0.45);
    padding: 9px 16px;
}

.pg91-btn:active {
    transform: scale(0.94);
}

.pg91-icon-btn {
    width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 10px;
    background: rgba(216, 191, 216, 0.06);
    border: 1px solid var(--pg91-border);
    color: var(--pg91-thistle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.18s ease;
}

.pg91-icon-btn:active {
    transform: scale(0.9);
    background: rgba(147, 112, 219, 0.25);
}

.pg91-icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================================
 * Layered (drop-down) menu
 * ============================================================ */
.pg91-nav-menu {
    position: fixed;
    top: var(--pg91-header-h);
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    width: 100%;
    max-width: 430px;
    background: #211C26;
    border-bottom: 1px solid var(--pg91-border);
    box-shadow: var(--pg91-shadow);
    padding: 12px 14px 18px;
    z-index: 55;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.28s ease;
}

.pg91-nav-menu.pg91-nav-open {
    max-height: 80vh;
    overflow-y: auto;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pg91-nav-group {
    margin-bottom: 6px;
}

.pg91-nav-layer {
    border-top: 1px solid rgba(216, 191, 216, 0.08);
}

.pg91-nav-layer:first-child {
    border-top: none;
}

.pg91-nav-layer-head {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--pg91-thistle);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 12px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
}

.pg91-nav-layer-head .pg91-caret {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
    color: var(--pg91-accent-soft);
}

.pg91-nav-layer.pg91-layer-open .pg91-caret {
    transform: rotate(90deg);
}

.pg91-nav-layer-list {
    list-style: none;
    margin: 0;
    padding: 0 0 6px 8px;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
}

.pg91-nav-layer.pg91-layer-open .pg91-nav-layer-list {
    display: grid;
}

.pg91-nav-layer-list a {
    display: block;
    padding: 8px 6px;
    color: var(--pg91-text-mute);
    font-size: 12.5px;
    border-left: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.pg91-nav-layer-list a:hover,
.pg91-nav-layer-list a:active {
    color: var(--pg91-thistle);
    border-left-color: var(--pg91-accent);
}

.pg91-nav-promo {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.pg91-nav-promo .pg91-btn {
    flex: 1;
}

/* ============================================================
 * Hero carousel
 * ============================================================ */
.pg91-hero {
    position: relative;
    margin: 12px 0 0;
    padding: 0 12px;
}

.pg91-hero-viewport {
    overflow: hidden;
    border-radius: var(--pg91-radius-lg);
    border: 1px solid var(--pg91-border);
    box-shadow: var(--pg91-shadow);
}

.pg91-hero-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.pg91-hero-slide {
    flex: 0 0 100%;
    position: relative;
}

.pg91-hero-slide a {
    display: block;
    position: relative;
}

.pg91-hero-slide img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.pg91-hero-cap {
    position: absolute;
    left: 12px;
    bottom: 12px;
    right: 12px;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0) 0%, rgba(26, 26, 26, 0.78) 100%);
    padding: 28px 10px 8px;
    border-radius: 0 0 var(--pg91-radius-lg) var(--pg91-radius-lg);
    pointer-events: none;
}

.pg91-hero-cap span {
    display: block;
    color: var(--pg91-thistle);
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.pg91-hero-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 10px 0 4px;
}

.pg91-hero-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(216, 191, 216, 0.28);
    transition: background 0.2s ease, transform 0.2s ease;
}

.pg91-hero-dot.pg91-dot-active {
    background: var(--pg91-accent);
    transform: scale(1.35);
}

/* ============================================================
 * Section primitives
 * ============================================================ */
.pg91-section {
    padding: 18px 12px 6px;
}

.pg91-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.pg91-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pg91-thistle);
    margin: 0;
    position: relative;
    padding-left: 12px;
}

.pg91-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--pg91-accent-soft), var(--pg91-accent));
}

.pg91-section-more {
    font-size: 12px;
    color: var(--pg91-accent-soft);
    font-weight: 600;
}

/* ============================================================
 * Game grid - 4 columns at 320px, 4-5 columns at 375-430px
 * ============================================================ */
.pg91-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (min-width: 375px) {
    .pg91-game-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 9px;
    }
}

.pg91-game-card {
    background: var(--pg91-bg-mid);
    border: 1px solid var(--pg91-border);
    border-radius: var(--pg91-radius-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.14s ease, border-color 0.18s ease;
}

.pg91-game-card:active {
    transform: scale(0.95);
    border-color: var(--pg91-accent);
}

.pg91-game-card a {
    display: block;
    width: 100%;
}

.pg91-game-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #222;
}

.pg91-game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pg91-game-name {
    padding: 5px 4px 6px;
    font-size: 10.5px;
    line-height: 1.25;
    color: var(--pg91-text);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 26px;
}

.pg91-game-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(147, 112, 219, 0.85);
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* ============================================================
 * Compact horizontal strip modules
 * ============================================================ */
.pg91-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 12px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.pg91-strip::-webkit-scrollbar {
    display: none;
}

.pg91-strip-card {
    flex: 0 0 64%;
    scroll-snap-align: start;
    background: linear-gradient(135deg, #2A2333 0%, #1F1A24 100%);
    border: 1px solid var(--pg91-border);
    border-radius: var(--pg91-radius);
    padding: 12px;
    position: relative;
    overflow: hidden;
}

.pg91-strip-card h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: var(--pg91-thistle);
}

.pg91-strip-card p {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--pg91-text-mute);
    line-height: 1.5;
}

.pg91-strip-card .pg91-btn {
    padding: 7px 14px;
    font-size: 12px;
}

/* ============================================================
 * Info / article blocks (homepage lower content)
 * ============================================================ */
.pg91-panel {
    background: var(--pg91-bg-mid);
    border: 1px solid var(--pg91-border);
    border-radius: var(--pg91-radius);
    padding: 14px;
    margin: 0 12px 12px;
}

.pg91-panel h2 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--pg91-thistle);
}

.pg91-panel h3 {
    margin: 14px 0 4px;
    font-size: 14px;
    color: var(--pg91-accent-soft);
}

.pg91-panel p {
    margin: 0 0 8px;
    color: var(--pg91-text);
    font-size: 13.5px;
}

.pg91-panel ul {
    margin: 6px 0 10px;
    padding-left: 18px;
    color: var(--pg91-text);
    font-size: 13px;
}

.pg91-panel ul li {
    margin-bottom: 4px;
}

.pg91-panel a {
    color: var(--pg91-accent-soft);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Two-column highlights tile row */
.pg91-tile-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 4px 12px 4px;
}

.pg91-tile {
    background: var(--pg91-bg-mid);
    border: 1px solid var(--pg91-border);
    border-radius: var(--pg91-radius);
    padding: 12px;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.18s ease, transform 0.14s ease;
}

.pg91-tile:active {
    transform: scale(0.97);
    border-color: var(--pg91-accent);
}

.pg91-tile h4 {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--pg91-thistle);
}

.pg91-tile p {
    margin: 0 0 8px;
    font-size: 11.5px;
    color: var(--pg91-text-mute);
    line-height: 1.4;
}

.pg91-tile .pg91-tile-link {
    font-size: 11px;
    color: var(--pg91-accent-soft);
    font-weight: 600;
}

/* Numbered achievement list */
.pg91-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 4px 12px;
}

.pg91-stat {
    background: var(--pg91-bg-mid);
    border: 1px solid var(--pg91-border);
    border-radius: var(--pg91-radius-sm);
    padding: 10px 6px;
    text-align: center;
}

.pg91-stat-num {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: var(--pg91-accent-soft);
    line-height: 1.1;
}

.pg91-stat-label {
    display: block;
    font-size: 10.5px;
    color: var(--pg91-text-mute);
    margin-top: 2px;
}

/* ============================================================
 * Extended homepage footer (two-column directory)
 * order: promotions > brand > page directory > disclaimer
 * ============================================================ */
.pg91-ext-footer {
    margin: 16px 12px 6px;
    background: var(--pg91-bg-mid);
    border: 1px solid var(--pg91-border);
    border-radius: var(--pg91-radius);
    overflow: hidden;
}

.pg91-ext-promo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid rgba(216, 191, 216, 0.08);
}

.pg91-ext-promo .pg91-btn {
    width: 100%;
    padding: 10px 8px;
    font-size: 12px;
}

.pg91-ext-promo .pg91-btn-secondary {
    background: transparent;
    color: var(--pg91-thistle);
    border: 1px solid var(--pg91-accent);
}

.pg91-ext-promo .pg91-btn-primary {
    background: linear-gradient(135deg, var(--pg91-accent) 0%, #7351B0 100%);
    color: #fff;
}

.pg91-ext-brand {
    padding: 12px;
    border-bottom: 1px solid rgba(216, 191, 216, 0.08);
}

.pg91-ext-brand p {
    margin: 0;
    font-size: 12px;
    color: var(--pg91-text-mute);
    line-height: 1.55;
}

.pg91-ext-dir {
    padding: 12px;
    border-bottom: 1px solid rgba(216, 191, 216, 0.08);
}

.pg91-ext-dir-title {
    font-size: 12px;
    color: var(--pg91-thistle);
    margin: 0 0 8px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.pg91-ext-dir-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
}

.pg91-ext-dir-grid a {
    font-size: 12px;
    color: var(--pg91-text-mute);
    padding: 4px 0;
    border-bottom: 1px dashed rgba(216, 191, 216, 0.08);
}

.pg91-ext-dir-grid a:hover,
.pg91-ext-dir-grid a:active {
    color: var(--pg91-thistle);
}

.pg91-ext-disclaimer {
    padding: 12px;
    background: rgba(147, 112, 219, 0.05);
}

.pg91-ext-disclaimer p {
    margin: 0;
    font-size: 11px;
    color: var(--pg91-text-mute);
    line-height: 1.55;
}

/* ============================================================
 * Generic footer / copyright
 * ============================================================ */
.pg91-footer {
    padding: 14px 12px 6px;
    text-align: center;
}

.pg91-footer p {
    margin: 0 0 4px;
    font-size: 11px;
    color: var(--pg91-text-mute);
    line-height: 1.5;
}

.pg91-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
    margin-bottom: 8px;
}

.pg91-footer-links a {
    font-size: 11px;
    color: var(--pg91-text-mute);
}

/* ============================================================
 * Mobile bottom navigation (5 roles, outlined icons)
 * ============================================================ */
.pg91-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 430px;
    height: var(--pg91-bar-h);
    background: rgba(26, 26, 26, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--pg91-border);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0 6px;
    z-index: 70;
}

.pg91-bar-item {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--pg91-text-mute);
    font-family: inherit;
    font-size: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    padding: 6px 2px 4px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.16s ease, transform 0.12s ease;
}

.pg91-bar-item:active {
    transform: scale(0.9);
}

.pg91-bar-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Dual-tone corner accent icons: a small filled corner dot */
.pg91-bar-item .pg91-corner {
    fill: var(--pg91-accent);
    stroke: none;
}

.pg91-bar-item .pg91-corner-soft {
    fill: var(--pg91-thistle);
    stroke: none;
    opacity: 0.55;
}

.pg91-bar-item.pg91-bar-active {
    color: var(--pg91-thistle);
}

/* Active marker: underline bar */
.pg91-bar-item.pg91-bar-active::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 2px;
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--pg91-accent-soft), var(--pg91-accent));
}

.pg91-bar-item span {
    letter-spacing: 0.3px;
    line-height: 1;
}

/* Highlight promo roles with a soft accent color */
.pg91-bar-item.pg91-bar-promo {
    color: var(--pg91-accent-soft);
}

/* ============================================================
 * Micro-interaction: quick scale & release
 * ============================================================ */
@keyframes pg91PulseKeyframes {
    0%   { transform: scale(1); }
    35%  { transform: scale(0.9); }
    70%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}

.pg91-pulse {
    animation: pg91PulseKeyframes 0.32s ease-out;
}

/* ============================================================
 * Utility
 * ============================================================ */
.pg91-hidden {
    display: none !important;
}

.pg91-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;
}

@media (prefers-reduced-motion: reduce) {
    .pg91-hero-track,
    .pg91-btn,
    .pg91-game-card,
    .pg91-bar-item,
    .pg91-pulse {
        transition: none !important;
        animation: none !important;
    }
}
