:root {
    --poki-body-bg: #f0f5fc;
    --poki-card-bg: #ffffff;
    --poki-ink: #002b50;
    --poki-muted: #5d6b84;
    --poki-accent: #009cff;
}

body.poki-shell {
    font-family: "Proxima Nova", "Open Sans", "Gill Sans MT", "Gill Sans", "Noto Sans Arabic", Arial, sans-serif;
    background: var(--poki-body-bg);
    color: var(--poki-ink);
    /* Sticky footer layout: body as column flex container */
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 11px;
    color: var(--poki-muted);
}

.text-muted {
    color: var(--poki-muted);
}

body.poki-shell.search-open {
    overflow: hidden;
}

main.poki-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    /* Take remaining space to push footer to the bottom when content is short */
    flex: 1 0 auto;
}

.poki-hero {
    background: #e6f5ff;
    border-radius: 28px;
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    box-shadow: 0px 23px 45px rgba(0, 79, 136, 0.08);
}

.poki-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 12px;
}

.poki-hero p {
    color: var(--poki-muted);
    line-height: 1.6;
}

.poki-hero .hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.poki-hero .hero-stats div {
    background: var(--poki-card-bg);
    border-radius: 16px;
    padding: 12px 18px;
    min-width: 120px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--poki-muted);
}

.poki-hero .hero-stats div strong {
    display: block;
    font-size: 28px;
    color: var(--poki-ink);
    font-weight: 700;
}

.poki-section {
    background: transparent;
    border-radius: 28px;
}

.play-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
}

.play-stage iframe {
    width: 100%;
    min-height: 420px;
    border: none;
    border-radius: 24px;
    box-shadow: 0px 20px 45px rgba(0, 43, 80, 0.15);
    background: #000;
}

.play-placeholder {
    background: #07152c;
    color: #fff;
    border-radius: 24px;
    padding: 32px;
    text-align: center;
}

.play-meta {
    background: #fff;
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0px 12px 30px rgba(0, 43, 80, 0.12);
}

.play-meta ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.play-meta ul li {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: var(--poki-ink);
}

.play-meta ul li span {
    color: var(--poki-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
}

.share-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-links a {
    text-decoration: none;
    color: var(--poki-accent);
    font-weight: 600;
}

.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
}

.feature-list {
    list-style: disc;
    margin: 0;
    padding-left: 20px;
    color: var(--poki-muted);
}

.video-wrapper iframe {
    width: 100%;
    min-height: 360px;
    border: none;
    border-radius: 24px;
    box-shadow: 0px 20px 45px rgba(0, 0, 0, 0.15);
}

.achievement-card {
    position: relative;
}

.achievement-card.completed {
    border: 2px solid var(--poki-accent);
}

.achievement-card .status {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 12px;
    font-weight: 700;
    color: var(--poki-accent);
}

.leaderboard {
    margin-bottom: 24px;
    background: #fff;
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0px 8px 24px rgba(0, 43, 80, 0.08);
}

.leaderboard h3 {
    margin-top: 0;
}

.leaderboard ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.leaderboard li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f5fc;
}

.leaderboard li:last-child {
    border-bottom: none;
}

.leaderboard .rank {
    font-weight: 700;
}

.review-card {
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0px 8px 20px rgba(0, 43, 80, 0.08);
    margin-bottom: 16px;
}

.review-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-card .stars {
    color: #ffba24;
    letter-spacing: 2px;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-form textarea,
.review-form input,
.review-form select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid #dbe6ff;
    padding: 10px 14px;
}

.review-form button {
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    background: var(--poki-accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.alert {
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 600;
}

.alert.success {
    background: #d5f9e2;
    color: #0a6b3c;
}

.alert.error {
    background: #ffe0e0;
    color: #b00020;
}

.poki-section .section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.poki-section .section-head h2 {
    font-size: 1.75rem;
    margin: 0;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

.game-grid .post {
    background: var(--poki-card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0px 8px 24px rgba(0, 43, 80, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-grid .post:hover {
    transform: translateY(-4px);
    box-shadow: 0px 16px 30px rgba(0, 43, 80, 0.12);
}

.game-grid .game-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--poki-ink);
    text-decoration: none;
    padding: 12px;
}

.game-grid .game-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 18px;
    background: #eef4ff;
}

.game-grid .card-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.game-grid .post-name {
    font-weight: 600;
    font-size: 14px;
    margin: 0;
    min-height: 38px;
}

.game-grid .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: #fff7cc;
    color: #876100;
}

.game-grid .badge.score {
    background: #e8f4ff;
    color: #005ea8;
}

.load-more-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.load-more-group button {
    border: none;
    background: var(--poki-accent);
    color: #fff;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0px 15px 25px rgba(0, 156, 255, 0.25);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.load-more-group button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.poki-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.poki-card-grid article {
    background: var(--poki-card-bg);
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0px 8px 24px rgba(0, 53, 114, 0.08);
}

.poki-card-grid article img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 16px;
    margin-right: 12px;
}

.poki-card-grid article .card-body {
    display: flex;
    align-items: center;
    gap: 16px;
}

.categories-tags-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.categories-tags-list-grid a {
    justify-content: flex-start;
}

.categories-tags-list-grid img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 12px;
    margin-right: 12px;
}

.tag-list-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0px 4px 16px rgba(0, 43, 80, 0.08);
    font-size: 13px;
    font-weight: 600;
    color: var(--poki-ink);
    text-decoration: none;
}

.tag-chip:hover {
    background: var(--poki-accent);
    color: #fff;
}

.tag-chip.active {
    background: var(--poki-accent);
    color: #fff;
}

.search-results .title {
    margin: 12px 0 6px;
    font-weight: 600;
    color: var(--poki-ink);
}

.search-results .empty-state {
    padding: 12px 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0px 4px 16px rgba(0, 43, 80, 0.08);
    color: var(--poki-muted);
    font-size: 14px;
}

.search-results .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-results .games-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.search-results .games-list .post {
    width: 94px;
}

.new-games-pop-up {
    display: none;
}

.new-games-pop-up.active {
    display: flex;
}

.new-games-pop-up-mobile {
    display: none;
}

.new-games-pop-up-mobile.active {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.75);
    padding: 40px 20px;
    overflow-y: auto;
}

.new-games-pop-up-mobile .new-games-btns,
.new-games-pop-up-mobile .home-categories,
.new-games-pop-up-mobile .home-tags {
    background: #fff;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 18px;
}

#search-left {
    display: none;
}

#search-left.active {
    display: block;
}

.poki-footer {
    background: #041226;
    color: #cdd9f0;
    padding: 48px 0;
}

.poki-footer .footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.poki-footer h4 {
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.poki-footer .footer-list {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.poki-footer .newsletter-form {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.poki-footer .newsletter-form input {
    flex: 1;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
}

.poki-footer .newsletter-form button {
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    background: var(--poki-accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.poki-footer a {
    color: inherit;
    text-decoration: none;
}

.poki-footer a:hover {
    color: var(--poki-accent);
}

.poki-footer .footer-bottom {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 13px;
    color: #8aa2c2;
}

@media (max-width: 768px) {
    main.poki-main {
        padding: 24px 16px 72px;
    }

    .poki-hero {
        padding: 24px;
    }

    .play-hero-grid {
        grid-template-columns: 1fr;
    }
}
