/* Modern layout — Gamezop-inspired cards, ad-native game tiles */

:root {
    --bg-page: #eef1f6;
    --bg-card: #ffffff;
    --border-subtle: #dadce0;
    --border-light: #e8eaed;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-muted: #80868b;
    --link-blue: #1a73e8;
    --link-blue-hover: #1557b0;
    --ad-green: #188038;
    --accent: #5b21b6;
    --accent-soft: #ede9fe;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.12), 0 1px 3px rgba(60, 64, 67, 0.08);
    --shadow-card: 0 1px 3px rgba(60, 64, 67, 0.1), 0 4px 12px rgba(60, 64, 67, 0.06);
    --max-content: 1100px;
    --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
    --font-display: "Outfit", var(--font-body);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-page);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

img,
video {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

a {
    color: var(--link-blue);
}

/* ----- Shell (replaces narrow 400px column) ----- */
main {
    width: 100%;
    min-height: 100vh;
    position: relative;
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(91, 33, 182, 0.08), transparent 50%),
        var(--bg-page);
    overflow-x: hidden;
}

.bg-top,
.bg-bottom {
    display: none;
}

.site-shell {
    width: 100%;
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 0 16px 48px;
}

.site-header {
    padding: 20px 0 8px;
    text-align: center;
}

.site-header__logo {
    max-height: 56px;
    width: auto;
    object-fit: contain;
}

.site-header__tagline {
    margin: 12px auto 0;
    max-width: 36rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.link-back {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--link-blue);
    text-decoration: none;
}

.link-back:hover {
    text-decoration: underline;
}

.hero {
    text-align: center;
    padding: 8px 0 20px;
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.hero__subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ----- Ad slots (header / sidebar / footer) ----- */
.ad-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 16px 0;
    min-height: 0;
}

.ad-slot--header {
    margin-top: 8px;
}

.ad-slot--footer {
    margin-bottom: 8px;
}

/* Reserve space + center units so AdSense/GAM can render (better viewability / fill) */
.ad-slot--ads-friendly,
aside.ad-slot--ads-friendly {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    margin: 12px auto;
    min-height: 90px;
    overflow: visible;
    text-align: center;
}

.ad-slot--ads-friendly ins.adsbygoogle,
.ad-slot--ads-friendly iframe {
    max-width: 100% !important;
}

.ad-slot--list-content-top,
.ad-slot--game-content-top {
    min-height: 100px;
}

.ad-slot--list-resp-above,
.ad-slot--list-resp-below,
.ad-slot--game-resp-above,
.ad-slot--game-resp-below {
    min-height: 100px;
    width: 100%;
}

.games-section .ad-slot--list-resp-above,
.games-section .ad-slot--list-resp-below {
    margin-bottom: 8px;
}

.games-section .ad-slot--list-resp-below {
    margin-top: 12px;
}

/* ----- Game grid — ad-native cards ----- */
.games-section {
    margin-top: 8px;
}

.games-section__heading {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 14px;
    text-align: center;
}

.game-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 480px) {
    .game-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (min-width: 768px) {
    .game-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .game-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }
}

/* Google-ad-style game tile */
.gz-game-card {
    margin: 0;
}

.gz-game-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.gz-game-card__link:hover {
    box-shadow: var(--shadow-card);
    border-color: #bdc1c6;
    transform: translateY(-2px);
}

.gz-game-card__link:focus-visible {
    outline: 2px solid var(--link-blue);
    outline-offset: 2px;
}

.gz-game-card__label {
    display: block;
    padding: 6px 10px 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
}

.gz-game-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f1f3f4;
    overflow: hidden;
}

.gz-game-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gz-game-card__body {
    padding: 10px 10px 12px;
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gz-game-card__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--link-blue);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gz-game-card__link:hover .gz-game-card__title {
    color: var(--link-blue-hover);
    text-decoration: underline;
}

.gz-game-card__line {
    font-size: 12px;
    color: var(--ad-green);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gz-game-card__cta {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: auto;
    padding-top: 4px;
}

/* Legacy game-card (if any) */
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0;
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.play-button {
    background: var(--link-blue);
    color: #fff;
    border: none;
    padding: 10px 14px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
}

.play-button:hover {
    background: var(--link-blue-hover);
}

/* ----- Discover-style topic unit (categories on index) ----- */
.categories-strip {
    margin: 20px 0 16px;
    width: 100%;
}

.categories-strip--single {
    max-width: 100%;
}

/* Heading-only discover card (e.g. category page games title) */
.gz-discover-topic--page-heading .gz-discover-topic__head {
    border-bottom: none;
    padding-bottom: 18px;
}

.games-section > .categories-strip:first-child {
    margin-top: 0;
}

.gz-discover-topic {
    width: 100%;
    margin: 0 auto;
}

.gz-discover-topic__shell {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12), 0 2px 8px rgba(60, 64, 67, 0.08);
    overflow: hidden;
    text-align: left;
}

.gz-discover-topic__head {
    padding: 18px 18px 14px;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #eceff1;
}

.gz-discover-topic__eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #70757a;
    margin-bottom: 8px;
}

.gz-discover-topic__title {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 3.8vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #202124;
    margin: 0 0 8px;
    line-height: 1.35;
}

.gz-discover-topic__sub {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #5f6368;
}

.gz-discover-topic__list {
    display: flex;
    flex-direction: column;
    padding: 8px 10px 12px;
    gap: 8px;
}

.gz-discover-topic__row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    background: #fafbfc;
    border: 1px solid #eceff1;
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.gz-discover-topic__row:hover {
    background: #fff;
    border-color: #dadce0;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.1);
}

.gz-discover-topic__row:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

.gz-discover-topic__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #eef1f6, #e8eaed);
    border-radius: 14px;
    overflow: hidden;
}

.gz-discover-topic__icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.gz-discover-topic__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.gz-discover-topic__name {
    font-size: 15px;
    font-weight: 600;
    color: #1a73e8;
    line-height: 1.25;
}

.gz-discover-topic__row:hover .gz-discover-topic__name {
    text-decoration: underline;
}

.gz-discover-topic__line {
    font-size: 12px;
    color: #188038;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gz-discover-topic__chev {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    opacity: 0.45;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235f6368'%3E%3Cpath d='M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.gz-discover-topic__row:hover .gz-discover-topic__chev {
    opacity: 0.75;
}

/* ----- Category page hero ----- */
.category-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    margin: 0 auto 16px;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.category-hero .cat_img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.category-hero .play_btn_txt1 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.resp_play_btn .play_btn {
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    background: var(--bg-card);
}

.play_btn_txt {
    color: var(--text-secondary);
}

/* ----- Game detail (play landing) ----- */
.game-play-hero {
    text-align: center;
    padding: 12px 0 24px;
}

.game-play-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--text-primary);
}

.game-play-card {
    max-width: 400px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 20px;
}

.game-detail-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    margin: 0 auto 16px;
    display: block;
}

.start-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    margin: 8px auto 0;
    padding: 14px 24px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--link-blue) 0%, #4338ca 100%);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.start-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
    color: #fff;
}

.start-button:active {
    transform: scale(0.98);
}

.more-games-section {
    margin: 28px 0 16px;
}

.more-games {
    margin-top: 20px;
    text-align: center;
}

.more-games a {
    text-decoration: none;
}

.more-games button,
.more-games .btn-secondary {
    background: var(--bg-card);
    color: var(--link-blue);
    border: 1px solid var(--border-subtle);
    padding: 12px 24px;
    width: 100%;
    max-width: 320px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s, border-color 0.2s;
}

.more-games button:hover {
    background: #f8f9fa;
    border-color: #bdc1c6;
}

.click_btn {
    background: linear-gradient(135deg, var(--link-blue) 0%, #4338ca 100%);
    margin-top: 12px;
    padding: 12px 24px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
    color: #fff;
    border-radius: 999px;
    border: none;
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.25);
    font-family: inherit;
    width: 100%;
    max-width: 400px;
    transition: transform 0.15s ease;
}

.click_btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.click_btn_option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 120px;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.click_btn_option:hover {
    border-color: var(--link-blue);
    color: var(--link-blue);
}

/* ----- About & prose ----- */
.about_section {
    margin-top: 28px;
    width: 100%;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.about_section h1,
.about_section h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.about_section p {
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    text-wrap: wrap;
}

.about_section--finance {
    border-color: #e3e8ef;
    background: linear-gradient(180deg, #fafcfe 0%, #ffffff 55%);
}

.about_section--finance .finance-copy {
    text-align: left;
    color: #3c4043;
    font-size: 0.95rem;
    line-height: 1.75;
}

.page-prose {
    max-width: 42rem;
    margin: 0 auto;
    padding: 8px 0 32px;
}

.page-prose h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--text-primary);
}

.page-prose .prose-block {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.logo_content {
    font-weight: 600;
    color: var(--text-primary);
}

.logo_content .title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.15rem, 3vw, 1.4rem);
    line-height: 1.35;
    padding-top: 8px;
}

/* ----- Footer ----- */
.resp_footer {
    border-top: 1px solid var(--border-light);
    margin-top: 32px;
    padding-top: 20px;
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 8px 0 24px;
    max-width: var(--max-content);
    margin: 0 auto;
}

.privacytext,
.anchor_text {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.anchor_text:hover {
    color: var(--link-blue);
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.social-link {
    color: var(--link-blue);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
}

.social-link:hover {
    background: #f1f3f4;
}

/* ----- Layout compat: old main_div / pokii ----- */
.main_div {
    max-width: var(--max-content);
    width: 100%;
    margin: 0 auto;
    text-wrap: wrap;
    border-left: none;
    border-right: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
}

.pokii_game_section {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.game_section {
    margin: 0;
    width: 100%;
}

.game-detail-section {
    margin: 0;
    padding: 0;
}

.resp_about_section,
.resp_play_btn,
.resp_footer {
    display: flex;
    justify-content: center;
    width: 100%;
}

.sidebar-ad {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

/* ----- Auto-scroll (sticky play/pause) ----- */
.gz-auto-scroll-btn {
    position: fixed;
    z-index: 9990;
    left: auto;
    top: auto;
    /* Neeche + dahine corner (viewport), phone notch safe-area */
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    width: 52px;
    height: 52px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1a73e8, #1557b0);
    color: #fff;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.45), 0 2px 4px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gz-auto-scroll-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.gz-auto-scroll-btn:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.45);
    outline-offset: 3px;
}

.gz-auto-scroll-btn:active {
    transform: scale(0.98);
}

.gz-auto-scroll-btn__play {
    display: none;
    margin-left: 2px;
}

.gz-auto-scroll-btn.is-paused .gz-auto-scroll-btn__pause {
    display: none;
}

.gz-auto-scroll-btn.is-paused .gz-auto-scroll-btn__play {
    display: block;
}

.gz-auto-scroll-btn[hidden] {
    display: none !important;
}

/* Auto-scroll control: mobile only (desktop backup) */
@media (min-width: 768px) {
    .gz-auto-scroll-btn {
        display: none !important;
    }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
