@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --purple: #6957e8;
    --dark: #20212b;
    --muted: #858795;
    --border: #ededf2;
    --soft: #f6f6fa;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    color: var(--dark);
    background: #fff;
    font-family: Manrope, Arial, sans-serif;
    font-size: 14px;
}

a {
    text-decoration: none;
}

/* HEADER */

.topbar {
    height: 74px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 0 32px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -1px;
    white-space: nowrap;
}

.logo-icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 22px;
    border-radius: 11px;
    background: linear-gradient(135deg,#8875ff,#5945d8);
}

.logo-dot {
    color: var(--purple);
}

.search {
    height: 43px;
    max-width: 500px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #f5f5f8;
}

.search:focus-within {
    border-color: #c9c1ff;
    background: #fff;
}

.search-icon {
    color: #999;
    font-size: 25px;
}

.search input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-left: auto;
}

.top-nav a {
    color: #656674;
    font-weight: 700;
}

.top-nav a:hover {
    color: var(--purple);
}

.mobile-menu {
    display: none;
    border: 0;
    background: none;
    font-size: 24px;
}

/* PAGE */

.layout {
    display: grid;
    grid-template-columns: 220px minmax(0,1fr);
    max-width: 1600px;
    margin: auto;
}

.sidebar {
    height: calc(100vh - 74px);
    position: sticky;
    top: 74px;
    overflow-y: auto;
    padding: 30px 17px;
    border-right: 1px solid var(--border);
}

.side-heading {
    margin: 0 12px 13px;
    color: #a1a2ac;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.category-heading {
    margin-top: 32px;
}

.side-link {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 12px;
    margin: 3px 0;
    border-radius: 10px;
    color: #686a77;
    font-weight: 700;
}

.side-link:hover,
.side-link.active {
    color: var(--purple);
    background: #f0eeff;
}

.sidebar-info {
    margin: 40px 7px 0;
    padding: 15px;
    border-radius: 12px;
    background: #f5f3ff;
    color: #77758c;
    font-size: 11px;
    line-height: 1.7;
}

.sidebar-info strong {
    color: var(--purple);
    font-size: 12px;
}

.sidebar-info p {
    margin-bottom: 0;
}

.main-content {
    min-width: 0;
    padding: 30px 35px 0;
}

/* HERO */

.hero {
    min-height: 285px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 38px 43px;
    margin-bottom: 42px;
    border-radius: 22px;
    background: linear-gradient(110deg,#f0edff,#f7f4ff 55%,#e8f4ff);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 470px;
}

.hero-label,
.section-label {
    color: var(--purple);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.hero h1 {
    margin: 14px 0;
    font-size: 42px;
    line-height: 1.13;
    letter-spacing: -2px;
}

.hero h1 span {
    color: var(--purple);
}

.hero p {
    max-width: 390px;
    color: #77788a;
    line-height: 1.7;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 13px 19px;
    margin-top: 10px;
    border-radius: 10px;
    color: #fff;
    background: var(--purple);
    font-weight: 800;
    box-shadow: 0 8px 18px #6957e833;
    transition: .2s;
}

.hero-button:hover {
    background: #5845d5;
    transform: translateY(-2px);
}

.hero-art {
    width: 43%;
    height: 100%;
    position: absolute;
    right: 3%;
    top: 0;
    display: grid;
    place-items: center;
}

.hero-circle {
    position: absolute;
    width: 260px;
    height: 260px;
    border: 1px solid #d7d0ff;
    border-radius: 50%;
}

.circle-two {
    width: 195px;
    height: 195px;
    border-style: dashed;
}

.hero-gamepad {
    z-index: 2;
    font-size: 100px;
    transform: rotate(-12deg);
    filter: drop-shadow(0 15px 12px #5a4b9b35);
}

.hero-star {
    position: absolute;
    top: 15%;
    left: 18%;
    padding: 12px;
    border-radius: 17px;
    color: white;
    background: #ffd36b;
    font-size: 30px;
    transform: rotate(-15deg);
}

.hero-diamond {
    position: absolute;
    right: 15%;
    bottom: 18%;
    color: #8875ff;
    font-size: 42px;
}

/* SECTIONS */

.section {
    margin-bottom: 45px;
}

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 19px;
}

.section-label {
    color: #a0a0ad;
    font-size: 9px;
}

.section-title h2 {
    margin: 5px 0 0;
    font-size: 23px;
    letter-spacing: -.8px;
}

.all-link {
    color: #686a77;
    font-size: 12px;
    font-weight: 700;
}

.all-link:hover {
    color: var(--purple);
}

/* GAME CARDS */

.games-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 21px 16px;
}

.game-card {
    min-width: 0;
    cursor: pointer;
}

.game-cover {
    aspect-ratio: 1.42;
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 13px;
    transition: .2s;
}

.game-card:hover .game-cover {
    transform: translateY(-4px);
    box-shadow: 0 12px 22px #20212b1c;
}

.game-emoji {
    font-size: clamp(40px,5vw,66px);
    filter: drop-shadow(0 8px 6px #0002);
}

.game-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 8px;
    border-radius: 6px;
    color: #555;
    background: #ffffffdf;
    font-size: 9px;
    font-weight: 800;
}

.game-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 2px 0;
}

.game-name {
    overflow: hidden;
    color: var(--dark);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-category {
    color: #999aa5;
    font-size: 10px;
    white-space: nowrap;
}

/* FILTERS */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 21px;
}

.filter {
    padding: 8px 14px;
    border: 1px solid #e9e9ef;
    border-radius: 30px;
    color: #777987;
    background: #fff;
    font: 700 11px Manrope,Arial,sans-serif;
    cursor: pointer;
}

.filter:hover,
.filter.active {
    color: var(--purple);
    border-color: #efedff;
    background: #efedff;
}

.empty-message {
    padding: 35px;
    color: var(--muted);
    text-align: center;
}

/* FOOTER */

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 24px 0;
    margin-top: 55px;
    border-top: 1px solid var(--border);
    color: #a0a1aa;
    font-size: 11px;
}

.footer-logo {
    font-size: 16px;
}

.footer-logo .logo-icon {
    width: 27px;
    height: 27px;
    border-radius: 8px;
    font-size: 17px;
}

/* TABLET */

@media(max-width:1100px) {
    .layout {
        grid-template-columns: 190px minmax(0,1fr);
    }

    .main-content {
        padding: 25px 25px 0;
    }

    .games-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

    .topbar {
        padding: 0 24px;
        gap: 25px;
    }
}

/* MOBILE */

@media(max-width:760px) {
    .topbar {
        height: 64px;
        padding: 0 15px;
        gap: 12px;
    }

    .logo {
        font-size: 17px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
    }

    .top-nav a {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .layout {
        display: block;
    }

    .sidebar {
        display: none;
        position: fixed;
        z-index: 90;
        top: 64px;
        left: 0;
        width: 250px;
        height: calc(100vh - 64px);
        background: #fff;
        box-shadow: 10px 12px 30px #20212b1a;
    }

    .sidebar.open {
        display: block;
    }

    .main-content {
        padding: 18px 15px 0;
    }

    .hero {
        min-height: 260px;
        padding: 28px 23px;
        margin-bottom: 32px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero-content {
        max-width: 75%;
    }

    .hero-art {
        width: 40%;
        right: -5%;
    }

    .hero-gamepad {
        font-size: 75px;
    }

    .hero-circle {
        width: 185px;
        height: 185px;
    }

    .circle-two {
        width: 140px;
        height: 140px;
    }

    .games-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 18px 12px;
    }

    .section {
        margin-bottom: 35px;
    }

    .section-title h2 {
        font-size: 20px;
    }

    .footer {
        flex-wrap: wrap;
    }

    .footer-logo {
        width: 100%;
    }
}

@media(max-width:420px) {
    .hero-content {
        max-width: 100%;
    }

    .hero-art {
        opacity: .17;
        width: 65%;
        right: -20%;
    }

    .hero p {
        max-width: 270px;
        font-size: 12px;
    }

    .game-info {
        display: block;
    }

    .game-category {
        display: block;
        margin-top: 3px;
    }
}

/* =========================================
   GAME COVER ART — CUSTOM PORTAL EDITION
========================================= */

.game-card {
    outline: none;
}

.game-card:focus-visible .game-cover {
    outline: 3px solid var(--purple);
    outline-offset: 4px;
}

.game-cover {
    isolation: isolate;
    background:
        radial-gradient(circle at 20% 20%, #ffffff80, transparent 35%),
        linear-gradient(135deg, var(--cover-a), var(--cover-b));
    box-shadow: inset 0 1px 0 #ffffff55;
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        filter .25s ease;
}

.game-cover::before {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    right: -55px;
    bottom: -105px;
    border: 1px solid #ffffff70;
    border-radius: 50%;
    box-shadow:
        0 0 0 18px #ffffff12,
        0 0 0 38px #ffffff0d;
    z-index: -1;
}

.game-cover::after {
    content: "✦";
    position: absolute;
    top: 18%;
    right: 18%;
    color: #ffffffb8;
    font-size: 23px;
    text-shadow: 0 2px 12px #0002;
    transform: rotate(15deg);
}

.cover-decor {
    position: absolute;
    width: 115px;
    height: 115px;
    left: -35px;
    top: -48px;
    border-radius: 35px;
    background: #ffffff25;
    transform: rotate(35deg);
    z-index: -1;
}

.game-emoji {
    position: relative;
    z-index: 1;
    display: block;
    font-size: clamp(54px, 6vw, 78px);
    line-height: 1;
    filter: drop-shadow(0 12px 9px #18203b35);
    transform: translateY(2px);
    transition: transform .3s ease;
}

.game-card:hover .game-emoji {
    transform: translateY(-5px) scale(1.09) rotate(-4deg);
}

.game-card:hover .game-cover {
    box-shadow:
        0 13px 25px #20212b20,
        inset 0 1px 0 #ffffff70;
    filter: saturate(1.08);
}

.game-tag {
    z-index: 2;
    top: 11px;
    left: 11px;
    padding: 6px 9px;
    color: #514a69;
    background: #ffffffed;
    box-shadow: 0 3px 10px #00000010;
    letter-spacing: .4px;
}

.game-info {
    padding: 11px 2px 0;
}

.game-name {
    font-size: 12px;
    transition: color .2s ease;
}

.game-card:hover .game-name {
    color: var(--purple);
}

.game-category {
    padding: 4px 7px;
    border-radius: 6px;
    background: #f5f5f9;
    font-size: 9px;
}

/* Individual cover compositions */

.game-cover--neon-racer::after {
    content: "⚡";
    font-size: 28px;
    right: 17%;
    top: 16%;
}

.game-cover--magic-puzzle::after {
    content: "✧";
    font-size: 38px;
}

.game-cover--space-adventure::after {
    content: "✦";
    font-size: 34px;
}

.game-cover--football-star::after {
    content: "★";
    font-size: 27px;
}

.game-cover--ninja-action::after {
    content: "✦";
    font-size: 32px;
}

.game-cover--tower-builder::after {
    content: "⬡";
    font-size: 35px;
}

.game-cover--chess-master::after {
    content: "♛";
    font-size: 31px;
}

.game-cover--bubble-pop::after {
    content: "○";
    font-size: 43px;
}

.game-cover--dino-run::after {
    content: "✦";
    font-size: 32px;
}

.game-cover--drift-city::after {
    content: "⚡";
    font-size: 28px;
}

.game-cover--goal-keeper::after {
    content: "★";
    font-size: 30px;
}

.game-cover--robot-arena::after {
    content: "✧";
    font-size: 38px;
}

.game-cover--kingdom::after {
    content: "♜";
    font-size: 34px;
}

.game-cover--fruit-match::after {
    content: "✿";
    font-size: 34px;
}

/* Mobile cover proportions */

@media(max-width:760px) {
    .game-cover {
        border-radius: 12px;
    }

    .game-emoji {
        font-size: clamp(48px, 12vw, 68px);
    }

    .game-info {
        padding-top: 9px;
    }
}

@media(prefers-reduced-motion: reduce) {
    .game-cover,
    .game-emoji,
    .game-name {
        transition: none;
    }
}

/* =========================================
   HERO — GAME PORTAL EDITION
========================================= */

.hero {
    background:
        radial-gradient(ellipse at 85% 15%, #dcd6ff 0%, transparent 38%),
        radial-gradient(ellipse at 75% 100%, #d5eaff 0%, transparent 42%),
        linear-gradient(115deg, #f1eeff, #f8f6ff 55%, #edf5ff);
    box-shadow: inset 0 1px 0 #ffffff;
}

.hero::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: 8%;
    top: -210px;
    border-radius: 50%;
    background: #ffffff45;
}

.hero-content {
    max-width: 500px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid #ffffff;
    border-radius: 30px;
    background: #ffffffa8;
    letter-spacing: 1.1px;
}

.hero h1 {
    font-size: clamp(34px, 3.2vw, 46px);
}

.hero-button {
    padding: 14px 21px;
    border-radius: 12px;
    box-shadow: 0 8px 20px #6957e840;
}

.hero-art {
    z-index: 1;
}

.hero-gamepad {
    font-size: 112px;
    animation: gamepad-float 4s ease-in-out infinite;
    filter: drop-shadow(0 18px 14px #5945d844);
}

.hero-circle {
    border-color: #ffffffa0;
    box-shadow: 0 0 35px #ffffff70;
}

.circle-two {
    border-color: #ffffffb5;
}

.hero-star {
    animation: star-float 5s ease-in-out infinite;
    box-shadow: 0 9px 20px #f0b74c45;
}

.hero-diamond {
    animation: diamond-float 4s ease-in-out infinite;
}

.hero-float {
    position: absolute;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
    padding: 12px 15px;
    border: 1px solid #ffffff;
    border-radius: 14px;
    background: #ffffffed;
    box-shadow: 0 12px 30px #4c4a7830;
    animation: float-card 5s ease-in-out infinite;
}

.hero-float > span {
    width: 37px;
    height: 37px;
    display: grid;
    flex-shrink: 0;
    place-items: center;
    border-radius: 11px;
    background: #f2efff;
    font-size: 21px;
}

.hero-float strong,
.hero-float small {
    display: block;
}

.hero-float strong {
    color: #303044;
    font-size: 11px;
}

.hero-float small {
    margin-top: 3px;
    color: #9999a8;
    font-size: 9px;
}

.hero-float-one {
    top: 18%;
    right: 0;
}

.hero-float-two {
    bottom: 13%;
    left: 0;
    animation-delay: -2.5s;
}

@keyframes gamepad-float {
    0%, 100% { transform: translateY(0) rotate(-12deg); }
    50% { transform: translateY(-12px) rotate(-7deg); }
}

@keyframes star-float {
    0%, 100% { transform: translateY(0) rotate(-15deg); }
    50% { transform: translateY(-9px) rotate(-5deg); }
}

@keyframes diamond-float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-12px) rotate(18deg); }
}

@keyframes float-card {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@media(max-width:760px) {
    .hero {
        overflow: hidden;
    }

    .hero-content {
        max-width: 78%;
    }

    .hero-art {
        width: 48%;
        right: -3%;
    }

    .hero-gamepad {
        font-size: 75px;
    }

    .hero-float {
        min-width: 145px;
        padding: 8px;
        gap: 7px;
    }

    .hero-float > span {
        width: 29px;
        height: 29px;
        font-size: 16px;
    }

    .hero-float strong {
        font-size: 9px;
    }

    .hero-float small {
        font-size: 7px;
    }

    .hero-float-one {
        right: -10px;
        top: 13%;
    }

    .hero-float-two {
        left: -15px;
        bottom: 9%;
    }
}

@media(max-width:420px) {
    .hero-content {
        max-width: 100%;
    }

    .hero-art {
        opacity: .35;
        width: 65%;
        right: -20%;
    }
}

@media(prefers-reduced-motion: reduce) {
    .hero-gamepad,
    .hero-star,
    .hero-diamond,
    .hero-float {
        animation: none;
    }
}
