
:root {
    --bg: #f8fafc;
    --bg2: #ffffff;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-hover: #f1f5f9;
    --border: #e2e8f0;
    --text: #1e293b;
    --muted: #64748b;
    --accent: #f97316;
    --accent2: #ec4899;
    --accent3: #8b5cf6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent
}

html {
    scroll-behavior: smooth
}

body {
    font-family: -apple-system, blinkmacsystemfont, 'segoe ui', roboto, oxygen, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* ── animated background ── */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 15% 25%, rgba(249, 115, 22, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 75%, rgba(236, 72, 153, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
    animation: bgshift 22s ease-in-out infinite alternate;
}

@keyframes bgshift {
    0% {
        transform: scale(1) translate(0, 0)
    }
    100% {
        transform: scale(1.08) translate(-15px, -8px)
    }
}

.grid-lines {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* ── header ── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.brand-icon {
    font-size: 26px;
    -webkit-text-fill-color: initial
}

.search-wrap {
    position: relative;
    flex: 1;
    max-width: 380px;
}

.search-wrap input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: all .3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.search-wrap input:focus {
    border-color: rgba(249, 115, 22, 0.4);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
    background: #fff;
}

.search-wrap input::placeholder {
    color: #94a3b8
}

.search-wrap button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translatey(-50%);
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s;
}

.search-wrap button:hover {
    transform: translatey(-50%) scale(1.08)
}

/* ── hero ── */
.hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px 24px;
}

.hero h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text);
}

.hero p {
    color: var(--muted);
    font-size: 16px;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6
}

/* ── categories ── */
.categories {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 20px;
}

.cat-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all .3s;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cat-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    opacity: 0;
    transition: opacity .3s;
    z-index: -1;
}

.cat-btn:hover, .cat-btn.active {
    color: #fff;
    border-color: transparent;
    transform: translatey(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.2);
}

.cat-btn:hover::before, .cat-btn.active::before {
    opacity: 1
}

/* ── games area ── */
.games-area {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 50px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-head h2 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px
}

.section-head h2 span {
    font-size: 22px
}

.count-badge {
    background: #fff;
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 14px
}

/* ── game card ── */
.game-card {
    display: flex;
    flex-direction: row;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    animation: cardenter .5s cubic-bezier(.22, 1, .36, 1) forwards;
    transition: all .35s;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.game-card:hover {
    background: var(--surface-hover);
    border-color: rgba(249, 115, 22, 0.2);
    transform: translatex(4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(249, 115, 22, 0.08);
}

.game-card:hover .game-thumb img {
    transform: scale(1.06)
}

.game-thumb {
    width: 220px;
    min-height: 140px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}

.game-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 60%, rgba(255, 255, 255, 0.7));
    pointer-events: none;
}

.game-body {
    flex: 1;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.game-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.game-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.game-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 10px;
    border-radius: 5px;
    background: #f1f5f9;
}

.tag.action {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08)
}

.tag.girl {
    color: #db2777;
    background: rgba(219, 39, 119, 0.08)
}

.tag.boy {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08)
}

.tag

.3
d {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.08)
}

.players-live {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--muted);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: livepulse 2.2s infinite;
}

@keyframes livepulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1)
    }
    50% {
        opacity: .5;
        transform: scale(.75)
    }
}

.stars {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 13px
}

.star {
    color: #f59e0b
}

.star.empty {
    color: #e2e8f0
}

.rating-num {
    margin-left: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600
}

@keyframes cardenter {
    from {
        opacity: 0;
        transform: translatey(20px)
    }
    to {
        opacity: 1;
        transform: translatey(0)
    }
}

/* ── empty state ── */
.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: var(--muted);
    animation: fadein .5s ease;
}

.empty-state .big {
    font-size: 56px;
    margin-bottom: 14px;
    opacity: .3
}

@keyframes fadein {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

/* ── share widget ── */
.share-wrap {
    position: fixed;
    right: 22px;
    bottom: 90px;
    z-index: 998;
}

.share-trigger {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(249, 115, 22, 0.3);
    transition: all .3s cubic-bezier(.68, -.55, .265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-trigger:hover {
    transform: scale(1.1) rotate(-8deg)
}

.share-trigger.active {
    transform: rotate(45deg)
}

.share-menu {
    position: absolute;
    bottom: 60px;
    right: 50%;
    transform: translatex(50%) translatey(16px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: all .35s cubic-bezier(.68, -.55, .265, 1.55);
}

.share-wrap.open .share-menu {
    opacity: 1;
    pointer-events: all;
    transform: translatex(50%) translatey(0);
}

.share-platform {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    transition: transform .25s, box-shadow .25s;
    opacity: 0;
    transform: scale(.5);
}

.share-wrap.open .share-platform {
    opacity: 1;
    transform: scale(1)
}

.share-wrap.open .share-platform:nth-child(1) {
    transition-delay: .04s
}

.share-wrap.open .share-platform:nth-child(2) {
    transition-delay: .08s
}

.share-wrap.open .share-platform:nth-child(3) {
    transition-delay: .12s
}

.share-wrap.open .share-platform:nth-child(4) {
    transition-delay: .16s
}

.share-wrap.open .share-platform:nth-child(5) {
    transition-delay: .20s
}

.share-platform:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3)
}

.plat-google {
    background: #dd4b39
}

.plat-facebook {
    background: #3b5998
}

.plat-linkedin {
    background: #0077b5
}

.plat-stumble {
    background: #eb4924
}

.plat-twitter {
    background: #1da1f2
}

/* ── back to top ── */
.backtop {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translatey(16px);
    pointer-events: none;
    transition: all .3s cubic-bezier(.22, 1, .36, 1);
    z-index: 997;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.backtop.show {
    opacity: 1;
    transform: translatey(0);
    pointer-events: all
}

.backtop:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.25);
    transform: translatey(-3px);
}

/* ── footer ── */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 50px 20px 24px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto
}

.site-desc {
    text-align: center;
    margin: 0 auto 40px;
    font-size: 15px;
    line-height: 1.85;
    color: var(--muted);
    position: relative;
}

.site-desc::before {
    content: '"';
    display: block;
    font-size: 40px;
    line-height: 1;
    color: var(--accent);
    opacity: .15;
    margin-bottom: -6px;
}

.footer-grid {
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-col h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text);
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    padding: 5px 0;
    transition: color .2s, transform .2s;
}

.footer-col a:hover {
    color: var(--accent);
    transform: translatex(3px)
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

.footer-bottom a {
    color: var(--muted);
    text-decoration: none;
    transition: color .2s
}

.footer-bottom a:hover {
    color: var(--accent)
}

/* ════════════════════════════════════════
   mobile responsive (<640px)
   ════════════════════════════════════════ */
@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        gap: 12px;
    }

    .brand {
        font-size: 20px
    }

    .brand-icon {
        font-size: 24px
    }

    .search-wrap {
        max-width: none
    }

    .search-wrap input {
        font-size: 16px;
        padding: 12px 42px 12px 14px
    }

    .hero {
        padding: 28px 16px 18px
    }

    .hero h1 {
        font-size: 26px
    }

    .hero p {
        font-size: 14px
    }

    .categories {
        margin: 16px 0;
        padding: 0;
    }

    .cat-row {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 16px 8px;
        gap: 8px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .cat-row::-webkit-scrollbar {
        display: none
    }

    .cat-btn {
        padding: 8px 16px;
        font-size: 12px
    }

    .games-area {
        padding: 0 16px 40px
    }

    .section-head h2 {
        font-size: 18px
    }

    .section-head h2 span {
        font-size: 20px
    }

    .game-card {
        flex-direction: column
    }

    .game-thumb {
        width: 100%;
        height: 160px;
        min-height: auto;
    }

    .game-thumb::after {
        background: linear-gradient(180deg, transparent 50%, rgba(255, 255, 255, 0.8));
    }

    .game-body {
        padding: 14px 16px
    }

    .game-title {
        font-size: 17px
    }

    .game-desc {
        font-size: 13px;
        -webkit-line-clamp: 3
    }

    .game-meta-row {
        gap: 10px
    }

    .share-wrap {
        right: 14px;
        bottom: 76px
    }

    .share-trigger {
        width: 46px;
        height: 46px;
        font-size: 18px
    }

    .share-menu {
        bottom: 54px
    }

    .share-platform {
        width: 40px;
        height: 40px;
        font-size: 13px
    }

    .backtop {
        right: 14px;
        bottom: 14px;
        width: 42px;
        height: 42px;
        font-size: 16px
    }

    .footer {
        padding: 36px 16px 20px
    }

    .footer-grid {
        grid-template-columns:1fr 1fr;
        gap: 24px
    }

    .site-desc {
        font-size: 14px;
        margin-bottom: 32px
    }
}

@media (max-width: 380px) {
    .hero h1 {
        font-size: 22px
    }

    .game-thumb {
        height: 140px
    }

    .footer-grid {
        grid-template-columns:1fr
    }
}

a { text-decoration: none; }