
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg: #090910;
    --panel: #12121e;
    --panel-light: #1b1a2b;
    --purple: #8b5cf6;
    --purple-light: #b59aff;
    --text: #f7f5ff;
    --muted: #a3a0b8;
    --border: rgba(255,255,255,.09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input {
    font: inherit;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

.background-glow {
    position: fixed;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .14;
    pointer-events: none;
    z-index: -1;
    animation: glowMove 12s ease-in-out infinite alternate;
}

.glow-one {
    top: 100px;
    right: -150px;
    background: #7c3aed;
}

.glow-two {
    bottom: 0;
    left: -180px;
    background: #2563eb;
    animation-delay: -5s;
}

@keyframes glowMove {
    from { transform: translate(0, 0); }
    to { transform: translate(40px, -50px); }
}

/* Navigation */

.navbar {
    width: min(1200px, 92%);
    min-height: 82px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 900;
    direction: ltr;
}

.logo > span:last-child {
    color: var(--purple-light);
    margin-left: -7px;
}

.logo-icon {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    background: linear-gradient(135deg, #a78bfa, #6d28d9);
    border-radius: 11px;
    color: white;
    box-shadow: 0 5px 25px #8b5cf644;
}

.nav-links, .nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a, .nav-login {
    color: var(--muted);
    font-size: 14px;
    transition: color .2s;
}

.nav-links a:hover, .nav-login:hover {
    color: white;
}

.nav-user {
    gap: 12px;
}

.user-chip {
    font-size: 13px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: #ffffff06;
    max-width: 170px;
    overflow-wrap: anywhere;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, #9b6cff, #7139db);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 5px 22px #8b5cf622;
    transition: transform .2s, box-shadow .2s, filter .2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px #8b5cf655;
    filter: brightness(1.12);
}

.btn-small {
    padding: 8px 14px;
    font-size: 12px;
}

.btn-large {
    padding: 14px 23px;
}

.btn-outline {
    background: rgba(255,255,255,.03);
    border-color: var(--border);
    box-shadow: none;
}

.page-content {
    width: min(1200px, 92%);
    min-height: 65vh;
    margin: auto;
}

/* Hero */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 45px;
    padding: 75px 0 85px;
    min-height: 510px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.eyebrow, .section-kicker {
    color: var(--purple-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border: 1px solid #a78bfa33;
    border-radius: 30px;
    background: #8b5cf610;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 12px #a78bfa;
}

.hero h1 {
    font-size: clamp(34px, 4.6vw, 58px);
    line-height: 1.55;
    margin: 22px 0 12px;
    font-weight: 900;
}

.gradient-text {
    display: block;
    color: #b59aff;
    background: linear-gradient(100deg, #c4b5fd, #8b5cf6, #e879f9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    color: var(--muted);
    line-height: 2;
    max-width: 520px;
    font-size: 15px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 27px;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 38px;
}

.hero-stats div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-stats strong {
    font-size: 16px;
    direction: ltr;
}

.hero-stats span {
    font-size: 11px;
    color: var(--muted);
}

.hero-art {
    min-width: 0;
    position: relative;
    display: grid;
    place-items: center;
    min-height: 380px;
    isolation: isolate;
}

.hero-art::before {
    content: "";
    position: absolute;
    width: 270px;
    height: 270px;
    border-radius: 50%;
    background: #8b5cf6;
    filter: blur(100px);
    opacity: .28;
    z-index: -1;
}

.hero-game-card {
    position: relative;
    width: min(100%, 340px);
    padding: 10px;
    border: 1px solid #ffffff20;
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff15, #ffffff04);
    box-shadow: 0 30px 90px #0008;
    transform: rotate(-3deg);
    animation: cardFloat 5s ease-in-out infinite;
}

.hero-game-card > img {
    display: block;
    width: 100%;
    height: 225px;
    object-fit: cover;
    border-radius: 17px;
    background: var(--panel-light);
}

.hero-game-info {
    padding: 17px 10px 10px;
}

.game-tag {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--purple-light);
    direction: ltr;
    display: inline-block;
}

.hero-game-info h2 {
    margin: 8px 0 2px;
    font-size: 25px;
}

.hero-game-info p {
    color: var(--muted);
    font-size: 13px;
}

.free-label, .price {
    display: inline-block;
    color: #c4b5fd;
    background: #8b5cf61a;
    border: 1px solid #8b5cf633;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.orbit {
    position: absolute;
    width: 350px;
    height: 350px;
    border: 1px solid #a78bfa25;
    border-radius: 50%;
    animation: orbitSpin 25s linear infinite;
}

.orbit-two {
    width: 290px;
    height: 290px;
    border-style: dashed;
    animation-direction: reverse;
}

.floating-icon {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid #ffffff20;
    border-radius: 15px;
    background: #171426e8;
    box-shadow: 0 10px 30px #0005;
    animation: float 4s ease-in-out infinite;
}

.float-one { top: 40px; right: 5px; font-size: 23px; }
.float-two { bottom: 50px; left: 0; color: #e9d5ff; font-size: 25px; animation-delay: -1s; }
.float-three { top: 65px; left: 10px; color: #c4b5fd; font-size: 22px; animation-delay: -2s; }

@keyframes cardFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes orbitSpin {
    to { transform: rotate(360deg); }
}

/* Sections and game cards */

.section {
    padding: 35px 0 75px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.section-heading h2, .bottom-banner h2 {
    margin: 8px 0;
    font-size: 27px;
}

.section-heading p, .bottom-banner p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

.text-link, .details-link {
    color: var(--purple-light);
    font-size: 12px;
    font-weight: 700;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.game-card {
    min-width: 0;
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(145deg, #171624, #101019);
    transition: transform .25s, border-color .25s, box-shadow .25s;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: #a78bfa88;
    box-shadow: 0 18px 45px #0005, 0 0 25px #8b5cf61b;
}

.game-cover {
    position: relative;
    overflow: hidden;
    background: var(--panel-light);
}

.game-cover img, .game-image {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    transition: transform .45s;
}

.game-card:hover .game-cover img {
    transform: scale(1.07);
}

.cover-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 7px;
    background: #090910cc;
    backdrop-filter: blur(8px);
    font-size: 10px;
    color: #e9ddff;
}

.cover-arrow {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: grid;
    place-items: center;
    width: 33px;
    height: 33px;
    border-radius: 10px;
    background: #8b5cf6;
    opacity: 0;
    transform: translateY(6px);
    transition: .2s;
}

.game-card:hover .cover-arrow {
    opacity: 1;
    transform: translateY(0);
}

.game-card-body {
    padding: 17px;
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.card-title-row h3 {
    margin: 0;
    font-size: 17px;
}

.game-card-body > p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
    min-height: 43px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--border);
    padding-top: 13px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 11px;
}

.bottom-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin: 0 0 70px;
    padding: 30px;
    border: 1px solid #a78bfa30;
    border-radius: 22px;
    background: radial-gradient(ellipse at left, #6d28d933, transparent 70%), #14121f;
}

/* Catalog and search */

.catalog-header {
    padding: 60px 0 25px;
    text-align: center;
}

.catalog-header h1 {
    font-size: clamp(30px, 4vw, 44px);
    margin: 12px 0;
}

.catalog-header > p {
    color: var(--muted);
    font-size: 14px;
}

.search-form {
    width: min(600px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px auto 0;
    padding: 7px;
    border: 1px solid #a78bfa44;
    border-radius: 15px;
    background: #171624;
}

.search-icon {
    font-size: 26px;
    color: var(--purple-light);
    padding: 0 10px;
}

.search-form input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    color: white;
    background: transparent;
    padding: 10px 0;
}

.search-form input::placeholder {
    color: #77748e;
}

.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 30px 0 18px;
    color: #ded9ef;
    font-size: 13px;
}

.result-count {
    color: var(--muted);
}

.catalog-grid {
    padding-bottom: 70px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 55px 20px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 20px;
    background: #ffffff04;
}

.empty-state > span {
    font-size: 40px;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 25px;
}

/* Login and register */

.auth-wrap {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    width: min(850px, 100%);
    margin: 65px auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 25px;
    background: #11111bf2;
    box-shadow: 0 25px 80px #0004;
}

.auth-decoration {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 35px;
    background: radial-gradient(ellipse at top, #8b5cf644, transparent 70%), #171326;
}

.auth-symbol {
    display: grid;
    place-items: center;
    width: 90px;
    height: 90px;
    border: 1px solid #c4b5fd66;
    border-radius: 25px;
    background: linear-gradient(135deg, #8b5cf655, #6d28d933);
    font-size: 45px;
    font-weight: 900;
    box-shadow: 0 0 50px #8b5cf633;
}

.auth-decoration h2 {
    margin-bottom: 5px;
}

.auth-decoration p, .auth-subtitle {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.auth-card {
    padding: 38px;
}

.auth-card h1 {
    margin: 10px 0 0;
    font-size: 27px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.auth-form label {
    margin-top: 5px;
    font-size: 13px;
    color: #e4def4;
}

.auth-form input {
    width: 100%;
    min-height: 47px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    color: white;
    background: #090910;
    transition: border-color .2s, box-shadow .2s;
}

.auth-form input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px #8b5cf622;
}

.auth-submit {
    width: 100%;
    margin-top: 8px;
}

.form-message {
    padding: 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.error-message {
    color: #ff9aa9;
    background: #ff4d6d12;
    border: 1px solid #ff4d6d44;
}

.success-message {
    color: #8af0ba;
    background: #22c55e12;
    border: 1px solid #22c55e44;
}

.success-message a {
    display: inline-block;
    margin-right: 5px;
    color: #b8f7d2;
    text-decoration: underline;
}

.auth-switch {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.auth-switch a {
    color: var(--purple-light);
    font-weight: 800;
}

/* Game detail page compatibility */

.big-game-image {
    display: block;
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 18px;
}

.game-details {
    padding: 25px 0;
}

.game-details p {
    color: var(--muted);
    line-height: 2;
}

/* Footer */

.footer {
    padding: 30px 4%;
    border-top: 1px solid var(--border);
    text-align: center;
    background: #ffffff03;
}

.footer-logo {
    justify-content: center;
}

.footer p {
    color: var(--muted);
    font-size: 12px;
}

/* Mobile */

@media (max-width: 800px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 50px 0;
        gap: 20px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-description {
        margin-right: auto;
        margin-left: auto;
    }

    .hero-actions, .hero-stats {
        justify-content: center;
    }

    .hero-art {
        min-height: 350px;
    }

    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .auth-wrap {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 35px auto;
    }

    .auth-decoration {
        padding: 25px;
    }

    .auth-symbol {
        width: 65px;
        height: 65px;
        font-size: 32px;
    }

    .bottom-banner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .navbar {
        width: 94%;
        min-height: 70px;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 0;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        width: 31px;
        height: 31px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 8px;
        border-top: 1px solid var(--border);
    }

    .nav-user {
        gap: 7px;
    }

    .user-chip {
        max-width: 105px;
        font-size: 10px;
        padding: 6px 8px;
    }

    .nav-login {
        font-size: 12px;
    }

    .page-content {
        width: 92%;
    }

    .hero {
        padding-top: 35px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero-description {
        font-size: 13px;
    }

    .hero-actions .btn {
        flex: 1;
        padding: 12px 10px;
        font-size: 12px;
    }

    .hero-stats {
        gap: 20px;
    }

    .hero-art {
        min-height: 320px;
    }

    .hero-game-card {
        width: min(85%, 310px);
    }

    .hero-game-card > img {
        height: 190px;
    }

    .orbit {
        width: 280px;
        height: 280px;
    }

    .orbit-two {
        width: 235px;
        height: 235px;
    }

    .section-heading {
        align-items: flex-start;
    }

    .section-heading h2, .bottom-banner h2 {
        font-size: 22px;
    }

    .game-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .game-cover img, .game-image {
        height: 210px;
    }

    .game-card-body > p {
        min-height: 0;
    }

    .search-form {
        gap: 5px;
    }

    .search-form .btn {
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    .search-icon {
        padding: 0 4px;
    }

    .catalog-header {
        padding-top: 40px;
    }

    .auth-card {
        padding: 25px 20px;
    }

    .auth-decoration h2 {
        font-size: 21px;
    }

    .bottom-banner {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}