/* ==========================================================================
   Poki English Edition - Modern LTR Design System
   ========================================================================== */

:root {
    --poki-bg-dark: #002d72;
    --poki-bg-deep: #001a44;
    --poki-bg-card: #0c3884;
    --poki-card-hover: #1449a6;
    --poki-text: #ffffff;
    --poki-text-dim: #b8c7e0;
    --poki-teal: #00f5d4;
    --poki-yellow: #ffe600;
    --poki-pink: #ff006e;
    --poki-purple: #7b2cbf;
    --poki-border: rgba(255, 255, 255, 0.12);
    --poki-shadow: 0 8px 24px rgba(0, 15, 50, 0.35);
    --poki-radius-lg: 20px;
    --poki-radius-md: 14px;
    --poki-radius-sm: 8px;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    direction: ltr;
}

body {
    font-family: var(--font-body);
    background-color: var(--poki-bg-dark);
    background-image: radial-gradient(circle at 50% 0%, #0044ab 0%, #002d72 65%, #001f4d 100%);
    background-attachment: fixed;
    color: var(--poki-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, .poki-logo, .cat-name, .card-title, .search-btn, .btn-action {
    font-family: var(--font-heading);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* Header */
.poki-header {
    background-color: rgba(0, 31, 77, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--poki-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.poki-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.poki-logo:hover {
    transform: scale(1.05);
}

.logo-poki {
    font-size: 2.3rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    color: #ffffff;
    text-transform: lowercase;
    background: linear-gradient(135deg, #ffffff 40%, var(--poki-teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-badge {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: var(--poki-teal);
    background: rgba(0, 245, 212, 0.15);
    padding: 2px 7px;
    border-radius: var(--poki-radius-sm);
    border: 1px solid rgba(0, 245, 212, 0.3);
}

/* Search Container */
.search-container {
    flex: 1;
    max-width: 580px;
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    padding: 4px 8px 4px 18px;
    transition: all 0.25s ease;
}

.search-form:focus-within {
    background: #ffffff;
    border-color: var(--poki-teal);
    box-shadow: 0 0 0 4px rgba(0, 245, 212, 0.35);
}

.search-form:focus-within .search-icon,
.search-form:focus-within .search-input {
    color: #111827;
}

.search-icon {
    display: flex;
    align-items: center;
    color: var(--poki-text-dim);
    margin-right: 10px;
    transition: color 0.2s;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
    font-family: var(--font-body);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
}

.search-form:focus-within .search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    background: var(--poki-teal);
    color: #002d72;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 8px 20px;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: #ffffff;
    transform: scale(1.04);
}

/* Dropdown */
.live-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    color: #1f2937;
    border-radius: var(--poki-radius-md);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    z-index: 1100;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.search-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
    text-decoration: none;
    color: #1f2937;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: #eff6ff;
}

.search-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--poki-radius-sm);
    object-fit: cover;
    background: #e5e7eb;
}

.search-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.search-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.search-cat {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.fav-count {
    background: var(--poki-yellow);
    color: #002d72;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 1px 7px;
    border-radius: 20px;
}

/* Category Pills */
.categories-bar {
    background: rgba(0, 23, 59, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 24px;
}

.categories-scroll {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    padding-bottom: 2px;
}

.categories-scroll::-webkit-scrollbar {
    height: 4px;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--poki-text-dim);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cat-pill:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.cat-pill.active {
    background: var(--poki-teal);
    color: #002d72;
    border-color: var(--poki-teal);
    box-shadow: 0 2px 10px rgba(0, 245, 212, 0.3);
}

/* Main */
.poki-main {
    flex: 1;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
}

/* Poki Modular Grid */
.poki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    grid-auto-flow: dense;
    gap: 16px;
}

.poki-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.poki-card {
    position: relative;
    border-radius: var(--poki-radius-lg);
    background: var(--poki-bg-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--poki-shadow);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    aspect-ratio: 1 / 1;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.poki-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 36px rgba(0, 10, 40, 0.55);
    border-color: var(--poki-teal);
    z-index: 10;
}

.poki-card.card-large {
    grid-column: span 2;
    grid-row: span 2;
}

.poki-card.card-medium {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 2 / 1;
}

.card-thumb-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.poki-card:hover .card-thumb {
    transform: scale(1.08);
}

.tile-badge-sparkle {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--poki-yellow);
    color: #002d72;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
    animation: pulseSparkle 2s infinite ease-in-out;
}

@keyframes pulseSparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.card-rating-pill {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 50px;
    z-index: 2;
}

.card-play-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 31, 77, 0.85) 0%, rgba(0, 31, 77, 0.2) 60%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 3;
}

.poki-card:hover .card-play-overlay {
    opacity: 1;
}

.card-play-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--poki-teal);
    color: #002d72;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(0, 245, 212, 0.5);
    transform: scale(0.8);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.poki-card:hover .card-play-btn {
    transform: scale(1);
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: linear-gradient(to top, rgba(0, 20, 50, 0.95) 0%, rgba(0, 20, 50, 0.7) 70%, transparent 100%);
    display: flex;
    flex-direction: column;
    z-index: 4;
}

.card-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.card-cat {
    font-size: 0.72rem;
    color: var(--poki-text-dim);
}

/* Section Blocks */
.section-block {
    margin-top: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--poki-text-dim);
    margin-top: 4px;
}

.section-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--poki-teal);
}

.section-link:hover {
    text-decoration: underline;
}

/* Load More */
.load-more-wrap {
    margin-top: 36px;
    text-align: center;
}

.btn-load-more {
    background: linear-gradient(135deg, var(--poki-teal) 0%, #00b4d8 100%);
    color: #002d72;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 14px 38px;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(0, 245, 212, 0.35);
    transition: all 0.25s ease;
}

.btn-load-more:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 28px rgba(0, 245, 212, 0.5);
    background: #ffffff;
}

/* Banner */
.all-games-banner {
    margin-top: 50px;
    background: linear-gradient(135deg, #1b3a82 0%, #0c2152 100%);
    border: 2px dashed rgba(0, 245, 212, 0.4);
    border-radius: var(--poki-radius-lg);
    padding: 32px;
    text-align: center;
}

.banner-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--poki-yellow);
    margin-bottom: 10px;
}

.banner-text {
    font-size: 1.05rem;
    color: var(--poki-text-dim);
    max-width: 700px;
    margin: 0 auto 20px;
}

.btn-banner-all {
    display: inline-block;
    background: var(--poki-teal);
    color: #002d72;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 12px 32px;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.btn-banner-all:hover {
    background: #ffffff;
    transform: scale(1.04);
}

/* Player View */
.game-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--poki-text-dim);
    margin-bottom: 18px;
}

.game-breadcrumbs a:hover {
    color: var(--poki-teal);
}

.game-breadcrumbs .current {
    color: #ffffff;
    font-weight: 700;
}

.player-wrapper {
    background: #000000;
    border-radius: var(--poki-radius-lg);
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
    border: 1px solid var(--poki-border);
    transition: all 0.3s ease;
}

.player-wrapper.theater-mode {
    max-width: 100vw;
    width: 100%;
    margin-bottom: 30px;
}

.player-aspect-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 480px;
    background: #000814;
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.player-loader {
    position: absolute;
    inset: 0;
    background: #00122e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--poki-teal);
    font-weight: 700;
    font-size: 1.1rem;
    z-index: 5;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(0, 245, 212, 0.2);
    border-top-color: var(--poki-teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.player-toolbar {
    background: #001f4d;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.toolbar-left {
    display: flex;
    align-items: center;
}

.game-meta-brief {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brief-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--poki-radius-sm);
    object-fit: cover;
}

.brief-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
}

.brief-cat {
    font-size: 0.82rem;
    color: var(--poki-teal);
    font-weight: 700;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: var(--poki-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.2s ease;
}

.btn-tool:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-fav-toggle.is-favorited {
    background: var(--poki-yellow);
    color: #002d72;
    border-color: var(--poki-yellow);
}

.rating-actions {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--poki-radius-sm);
    padding: 2px;
}

.rating-actions .btn-vote {
    border: none;
    background: none;
    border-radius: 4px;
}

.rating-actions .btn-vote:hover {
    background: rgba(255, 255, 255, 0.15);
}

.share-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: #ffffff;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    z-index: 2000;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Info Card */
.game-info-card {
    margin-top: 32px;
    background: var(--poki-bg-card);
    border-radius: var(--poki-radius-lg);
    padding: 28px;
    border: 1px solid var(--poki-border);
}

.info-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #ffffff;
}

.info-subtitle {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 22px 0 10px;
    color: var(--poki-teal);
}

.info-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #e2e8f0;
}

.game-specs-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    background: rgba(0, 20, 50, 0.4);
    padding: 20px;
    border-radius: var(--poki-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spec-label {
    font-size: 0.82rem;
    color: var(--poki-text-dim);
}

.spec-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}

.spec-value.highlight {
    color: var(--poki-teal);
}

/* FAQ */
.game-faq {
    margin-top: 30px;
}

.faq-item {
    background: rgba(0, 20, 50, 0.3);
    border-radius: var(--poki-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    padding: 14px 18px;
    font-weight: 700;
    font-size: 1.02rem;
    color: #ffffff;
    cursor: pointer;
    list-style: none;
    position: relative;
    user-select: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: "▼";
    font-size: 0.75rem;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s;
    color: var(--poki-teal);
}

.faq-item[open] .faq-question::after {
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    padding: 0 18px 16px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--poki-text-dim);
}

/* Category & All Games */
.category-banner {
    background: linear-gradient(135deg, #0c3884 0%, #001f4d 100%);
    border-radius: var(--poki-radius-lg);
    padding: 30px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    border: 1px solid var(--poki-border);
}

.banner-icon {
    font-size: 3.5rem;
    background: rgba(255, 255, 255, 0.08);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--poki-radius-md);
}

.cat-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 8px;
}

.cat-description {
    font-size: 1rem;
    color: var(--poki-text-dim);
    line-height: 1.6;
}

/* 20-Page Pagination Bar */
.all-games-header {
    text-align: center;
    margin-bottom: 24px;
}

.all-games-title {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
}

.all-games-page-indicator {
    font-size: 1.05rem;
    color: var(--poki-teal);
    font-weight: 700;
    margin-top: 6px;
}

.poki-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    background: rgba(0, 20, 50, 0.6);
    padding: 10px 16px;
    border-radius: 50px;
    border: 1px solid var(--poki-border);
}

.page-num, .page-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--poki-text-dim);
    transition: all 0.2s ease;
}

.page-num:hover, .page-nav:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.page-num.active {
    background: var(--poki-teal);
    color: #002d72;
    box-shadow: 0 2px 10px rgba(0, 245, 212, 0.4);
}

.directory-list-box {
    margin-top: 48px;
    background: var(--poki-bg-card);
    border-radius: var(--poki-radius-lg);
    padding: 24px;
    border: 1px solid var(--poki-border);
}

.dir-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--poki-yellow);
}

.dir-links-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dir-game-link {
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 12px;
    border-radius: var(--poki-radius-sm);
    font-size: 0.85rem;
    color: var(--poki-text-dim);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dir-game-link:hover {
    color: #ffffff;
    background: var(--poki-card-hover);
    border-color: var(--poki-teal);
}

/* Empty Search */
.empty-search-box {
    text-align: center;
    padding: 60px 20px;
    background: var(--poki-bg-card);
    border-radius: var(--poki-radius-lg);
    border: 1px solid var(--poki-border);
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.empty-sub {
    font-size: 1rem;
    color: var(--poki-text-dim);
    margin-bottom: 24px;
}

.btn-back-home {
    display: inline-block;
    background: var(--poki-teal);
    color: #002d72;
    font-weight: 800;
    padding: 12px 28px;
    border-radius: 50px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    padding: 20px;
}

.modal-card {
    background: #001f4d;
    border: 1px solid var(--poki-teal);
    border-radius: var(--poki-radius-lg);
    width: 100%;
    max-width: 650px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--poki-yellow);
}

.modal-close {
    font-size: 1.8rem;
    color: var(--poki-text-dim);
    line-height: 1;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.fav-item {
    position: relative;
}

.fav-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

/* Footer */
.poki-footer {
    background: #001433;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 60px;
    padding: 48px 24px 30px;
}

.footer-top {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.footer-heading {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 4px;
}

.footer-subheading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--poki-teal);
    margin-bottom: 12px;
}

.footer-text {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--poki-text-dim);
}

.footer-languages {
    max-width: 1440px;
    margin: 0 auto 36px;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.languages-title {
    font-weight: 800;
    font-size: 1rem;
    color: #ffffff;
    display: block;
    margin-bottom: 14px;
}

.languages-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lang-tag {
    background: rgba(255, 255, 255, 0.06);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--poki-text-dim);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.lang-tag.active {
    background: rgba(0, 245, 212, 0.15);
    color: var(--poki-teal);
    border-color: rgba(0, 245, 212, 0.3);
    font-weight: 700;
}

.footer-bottom {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-links-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 0.88rem;
}

.footer-group-title {
    font-weight: 800;
    color: var(--poki-yellow);
}

.footer-link {
    color: var(--poki-text-dim);
}

.footer-link:hover {
    color: var(--poki-teal);
}

.footer-separator {
    color: rgba(255, 255, 255, 0.2);
}

.copyright {
    color: #64748b;
    font-size: 0.82rem;
}

@media (max-width: 1024px) {
    .header-inner {
        flex-wrap: wrap;
    }
    .search-container {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
    .player-aspect-box {
        min-height: 380px;
    }
}

@media (max-width: 640px) {
    .poki-main {
        padding: 14px;
    }
    .poki-grid {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 10px;
    }
    .player-aspect-box {
        min-height: 260px;
    }
    .player-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar-right {
        justify-content: space-between;
        flex-wrap: wrap;
    }
    .logo-poki {
        font-size: 1.8rem;
    }
}

/* Phase 1: external game loading feedback, original layout retained. */
.player-status{padding:12px 16px;background:var(--poki-dark,#061d43);color:#c7d7ee;font-size:14px;line-height:1.6}.player-status .btn-tool{display:inline-flex;margin-left:12px}
