/* ws_menu.css — desktop (>=1024px) menu design: top bar with logo mark + pill navigation, search row with "/" hint,
   "Игры 21 · Все ›" section header and large game tiles. Dark theme only: the light theme keeps its previous look.
   Loaded after theme.css; selectors are deliberately specific because theme.css/app.html use !important in places. */

/* desktop-only reviews controls (the mobile list keeps the "Фильтр" popup) */
.ws-rev-toolbar, .ws-rev-head-btn, #home-reviews-more { display: none; }

/* the slash hint chip only exists for the desktop search bar */
.ws-search-kbd { display: none; }

@media screen and (min-width: 1024px) {
    html:not([data-theme="light"]) body { background: #111312 !important; }
    html:not([data-theme="light"]) body::before {
        content: ""; position: fixed; left: 0; right: 0; top: 0; height: 460px; z-index: 0; pointer-events: none;
        background: radial-gradient(ellipse 55% 100% at 50% 0%, rgba(34, 98, 62, .34), rgba(17, 19, 18, 0) 72%);
    }
    html:not([data-theme="light"]) body .app { background: transparent !important; box-shadow: none !important; }

    /* ---------- top bar ---------- */
    html:not([data-theme="light"]) body .side-nav {
        height: 80px;
        padding: 0 max(24px, calc((100vw - 1200px) / 2)) !important;
        background: linear-gradient(180deg, rgba(17, 19, 18, .94) 0%, rgba(17, 19, 18, .8) 100%) !important;
        -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
        box-shadow: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, .05) !important;
        font-family: Inter, Nunito, -apple-system, "system-ui", sans-serif;
    }
    html:not([data-theme="light"]) body .side-nav::after { display: none; }

    html body .side-nav-logo { gap: 10px; cursor: pointer; }
    html body .side-nav-logo .ws-logo-mark { display: block; flex: none; height: 24px; width: auto; }
    html:not([data-theme="light"]) body .side-nav-logo h2 {
        background: none; -webkit-background-clip: border-box; background-clip: border-box;
        -webkit-text-fill-color: #fff; color: #fff;
        font-size: 20px; line-height: 1; font-weight: 700; letter-spacing: -.01em;
    }
    html:not([data-theme="light"]) body .side-nav-logo:hover h2 { transform: none; filter: none; }

    html:not([data-theme="light"]) body .side-nav-links {
        gap: 2px; height: 46px; padding: 4px;
        background: #181c1b; border: 1px solid rgba(255, 255, 255, .07); border-radius: 999px;
    }
    html:not([data-theme="light"]) body .side-nav-link {
        height: 36px !important; padding: 0 18px; gap: 9px;
        border: 0 !important; border-radius: 999px !important;
        font-size: 15px !important; font-weight: 500; color: #a9aeab;
        box-shadow: none;
    }
    html:not([data-theme="light"]) body .side-nav-link::before { border-radius: 999px; background: rgba(255, 255, 255, .06); }
    html:not([data-theme="light"]) body .side-nav-link:hover { color: #fff; }
    html:not([data-theme="light"]) body .side-nav-link.active {
        background: #2c312d !important; color: #fff !important; box-shadow: none !important;
    }
    html:not([data-theme="light"]) body .side-nav-link.active svg { color: #52be84; }
    html body .side-nav-link svg { fill: none !important; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    html body .side-nav-badge {
        margin-left: 2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
        background: #40d47e; color: #06240f; font-size: 12px; font-weight: 700;
    }

    html body .side-nav-right { gap: 18px !important; }
    html:not([data-theme="light"]) body #desktop-auth-buttons { gap: 20px !important; }
    html:not([data-theme="light"]) body #desktop-auth-buttons a:first-child {
        color: #fff !important; font: 600 15.5px/1 Inter, Nunito, sans-serif !important;
    }
    html:not([data-theme="light"]) body #desktop-auth-buttons a:last-child {
        display: inline-flex; align-items: center; height: 42px; padding: 0 26px !important;
        background: #40d47e !important; color: #06240f !important; border-radius: 12px !important;
        font: 700 15.5px/1 Inter, Nunito, sans-serif !important;
    }
    html:not([data-theme="light"]) body #desktop-auth-buttons a:last-child:hover { background: #5de597 !important; }

    /* ---------- home: content column ---------- */
    html body #page-home .home-scroll { max-width: 1248px; margin: 0 auto; padding: 0 24px 60px; }
    html body #page-home .ws-home-header { padding: 6px 0 16px; margin-bottom: 0; gap: 0; }

    /* ---------- search row ---------- */
    html:not([data-theme="light"]) body .ws-search-row { gap: 12px; }
    html:not([data-theme="light"]) body .ws-search-bar {
        height: 51px; padding: 0 12px 0 18px; gap: 12px; border-radius: 16px;
        background: #181c1b !important; border: 1px solid rgba(255, 255, 255, .07) !important;
        box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none;
    }
    html body .ws-search-bar svg { width: 20px; height: 20px; color: #8a8f8c; }
    html:not([data-theme="light"]) body .ws-search-bar input { font-size: 16px; color: #fff; font-family: Inter, Nunito, sans-serif; }
    html:not([data-theme="light"]) body .ws-search-bar input::placeholder { color: #7d827f; }
    html body .ws-search-kbd {
        display: flex; align-items: center; justify-content: center; flex: none;
        width: 30px; height: 30px; border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03);
        color: #8a8f8c; font: 500 13px/1 Inter, Nunito, sans-serif;
    }
    html:not([data-theme="light"]) body .ws-theme-toggle {
        width: 51px; height: 51px; padding: 0; border-radius: 16px; justify-content: center;
        background: #181c1b !important; border: 1px solid rgba(255, 255, 255, .07) !important; box-shadow: none !important;
        -webkit-backdrop-filter: none; backdrop-filter: none;
    }
    html:not([data-theme="light"]) body .ws-theme-toggle .ws-toggle-knob {
        width: 24px; height: 24px; background: transparent !important; color: #d7dbd9 !important; transform: none !important;
    }

    /* ---------- banner ---------- */
    html:not([data-theme="light"]) body #page-home .toty-banner { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; border-radius: 22px; min-height: 0; height: 368px; }

    /* ---------- "Игры 21 · Все ›" ---------- */
    html body #page-home .category-group-block { margin-top: 34px !important; }
    html body #page-home .category-group-block > div:first-child { padding: 0 !important; margin-bottom: 18px !important; }
    html body #page-home .category-group-block h2 {
        font-size: 22px !important; line-height: 28px; font-weight: 600 !important; letter-spacing: -.01em;
        gap: 10px; font-family: Inter, Nunito, sans-serif;
    }
    html body #page-home .category-group-block h2 svg { display: none !important; }
    html body #page-home .category-group-block h2[data-ws-count]::after {
        content: attr(data-ws-count); font-size: 15px; font-weight: 500; color: #7d827f; align-self: flex-end; padding-bottom: 3px;
    }
    html:not([data-theme="light"]) body #page-home .category-group-action-container {
        background: transparent !important; border: 0 !important; padding: 4px 0 4px 8px !important;
        font: 500 16px/1 Inter, Nunito, sans-serif !important; color: #9a9f9c !important; gap: 4px !important;
    }
    html body #page-home .category-group-action-container:hover { color: #fff !important; }
    html body #page-home .category-group-action-container svg { width: 16px; height: 16px; }

    /* ---------- game tiles ---------- */
    html body #page-home .category-group-container { gap: 20px !important; }
    html body #page-home .category-group-block .category-card-wrapper {
        width: calc((100% - 120px) / 7) !important; min-width: 124px;
    }
    html body #page-home .category-card-wrapper {
        align-items: center !important; gap: 14px !important; font-family: Inter, Nunito, sans-serif;
    }
    html body #page-home .category-card-wrapper .category-card {
        width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; border-radius: 24px !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .35) !important;
    }
    html body #page-home .category-card-wrapper > span {
        font-family: Inter, Nunito, sans-serif !important; font-size: 16px; font-weight: 500 !important;
        color: #fff !important; text-align: center; line-height: 1.2; width: 100%; min-height: 20px;
    }
    html body #page-home .category-card-media { width: 100% !important; transition: transform .22s ease; }
    html body #page-home .category-card-media > img[src*="auto_delivery"] { top: 10px !important; right: 10px !important; width: 26px !important; height: 26px !important; }
    /* hover: the whole tile (picture + lightning badge) lifts together, and the row leaves room so nothing is clipped */
    html body #page-home .home-block .category-card-wrapper:hover .category-card { transform: none !important; }
    html body #page-home .home-block .category-card-wrapper:hover .category-card-media { transform: translateY(-5px) scale(1.04); }
    html body #page-home .category-group-container { padding: 18px 20px 26px !important; margin: -18px -20px -26px !important; }
}


/* ---------- "Популярное" and other home showcase rows: big cards, 4 per row, centred ---------- */
@media screen and (min-width: 1024px) {
    html body #home-layout-container .home-block .product-grid {
        display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;
    }
    html body #home-layout-container .home-block .product-grid > .product-card {
        flex: 0 0 calc((100% - 60px) / 4); max-width: calc((100% - 60px) / 4); margin: 0;
    }
    html body #home-layout-container .home-block .product-card .product-title { font-size: 17px; line-height: 1.3; }
    html body #home-layout-container .home-block .product-card .price-current { font-size: 22px; }
    html body #home-layout-container .home-block .product-card .price-old { font-size: 14px; }
    html body #home-layout-container .home-block .product-card .product-button { min-height: 48px; font-size: 16px; }
}

/* ---------- reviews section (desktop): rating card on the left, filters + 2-column cards on the right ---------- */
@media screen and (min-width: 1024px) {
    html body #home-reviews-section {
        display: grid; grid-template-columns: minmax(290px, 330px) minmax(0, 1fr); column-gap: 24px; align-items: start;
        margin-top: 52px !important;
    }
    html body #home-reviews-section > .section-header { grid-column: 1 / -1; margin-bottom: 22px !important; align-items: center !important; }
    html body #home-reviews-section .section-title { font-size: 30px !important; font-weight: 700 !important; letter-spacing: -.01em !important; }
    html body #reviewsFilterBtnLabel { display: none !important; }
    .ws-rev-head-btn {
        display: inline-flex; align-items: center; gap: 8px; margin-left: 0; height: 46px; padding: 0 20px;
        border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03);
        color: var(--text-primary, #fff); font: 600 15px/1 Inter, Nunito, sans-serif; cursor: pointer; transition: border-color .2s, color .2s;
    }
    .ws-rev-head-btn:hover { border-color: rgba(64, 212, 126, .55); color: #40d47e; }

    html body #reviews-avg-rating {
        grid-column: 1; grid-row: 2; align-self: stretch;
        display: flex !important; flex-direction: column;
        max-width: none !important; margin-bottom: 0 !important; padding: 30px 26px 26px !important; border-radius: 22px !important;
    }
    /* the card is as tall as the review grid beside it: summary on top, bars below, button pinned to the bottom */
    html body #reviews-avg-rating > div:first-child { flex: 1; justify-content: space-between; }
    html body #reviews-avg-rating > div:first-child { flex-direction: column; align-items: stretch !important; gap: 20px !important; margin-bottom: 8px !important; }
    html body #reviews-avg-rating > div:first-child > div:first-child { align-items: center; }
    html body #avg-rating-number { font-size: 64px !important; font-weight: 800 !important; }
    html body #avg-rating-stars { font-size: 26px !important; letter-spacing: 3px !important; margin-top: 8px !important; }
    html body #rating-bars-container { padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); gap: 9px !important; }
    html body #reviews-avg-rating > button {
        margin-top: auto; flex: none; height: 52px; padding: 0 16px !important; border-radius: 14px !important; border: 0 !important;
        background: #40d47e !important; color: #06240f !important; font-weight: 700 !important;
    }
    html body #reviews-avg-rating > button:hover { background: #5de597 !important; }

    html body .ws-rev-toolbar {
        display: flex; align-items: center; gap: 12px; margin-left: auto;
    }
    .ws-rev-tabs { display: flex; gap: 6px; padding: 4px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08); }
    .ws-rev-tab {
        height: 36px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; background: transparent;
        color: var(--text-secondary, #aab0ad); font: 500 15px/1 Inter, Nunito, sans-serif; cursor: pointer; transition: color .2s, border-color .2s, background .2s, box-shadow .2s, transform .15s;
    }
    .ws-rev-tab:hover { color: var(--text-primary, #fff); }
    .ws-rev-tab:active { transform: scale(.97); }
    .ws-rev-tab.is-active, .ws-rev-tab.is-active:hover { border-color: transparent; background: #35E07C; color: #0a0a0a; font-weight: 600; box-shadow: 0 2px 10px rgba(53, 224, 124, .22); }
    .ws-rev-sort {
        position: relative; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px;
        border-radius: 14px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); color: var(--text-primary, #fff); cursor: pointer;
    }
    .ws-rev-sort select {
        -webkit-appearance: none; appearance: none; background: transparent; border: 0; outline: 0; color: inherit;
        font: 500 15px/1 Inter, Nunito, sans-serif; padding: 0 28px 0 0; cursor: pointer; min-width: 170px;
    }
    .ws-rev-sort select option { background: #1c201f; color: #fff; }
    .ws-rev-sort__chev { position: absolute; right: 12px; pointer-events: none; color: var(--text-secondary, #aab0ad); }

    html body #home-reviews-list {
        grid-column: 2; grid-row: 2; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px !important; align-items: stretch;
    }
    html body #home-reviews-more {
        grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: stretch;
    }
    html body #home-reviews-more:empty { display: none; }
    html body #reviews-show-more-btn { grid-column: 1 / -1; grid-row: 4; margin-top: 16px !important; height: 54px; border-radius: 16px !important; font-size: 16px !important; }

    .ws-rv {
        display: flex; flex-direction: column; padding: 20px 22px 16px; border-radius: 18px;
        background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .07); transition: border-color .2s;
    }
    .ws-rv:hover { border-color: rgba(64, 212, 126, .28); }
    .ws-rv__top { display: flex; align-items: center; gap: 14px; }
    .ws-rv__ava { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700; }
    .ws-rv__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
    .ws-rv__who b { font-size: 16px; font-weight: 600; color: var(--text-primary, #fff); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ws-rv__who span { font-size: 13px; color: var(--text-muted, #7f8582); }
    .ws-rv__stars { flex: none; color: #facc15; font-size: 17px; letter-spacing: 2px; white-space: nowrap; }
    .ws-rv__stars i { font-style: normal; color: rgba(255, 255, 255, .14); }
    .ws-rv__text { margin: 16px 0; font-size: 15px; line-height: 1.55; color: var(--text-primary, #d8dcda); opacity: .92; flex: 1; word-break: break-word; }
    .ws-rv__text--empty { color: var(--text-muted, #6e7471); font-style: italic; }
    .ws-rv__reply { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid #40d47e; border-radius: 8px; background: rgba(64, 212, 126, .07); display: flex; flex-direction: column; gap: 3px; font-size: 14px; color: var(--text-primary, #d8dcda); }
    .ws-rv__reply b { font-size: 12px; color: #40d47e; }
    .ws-rv__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .07); min-height: 52px; }
    .ws-rv__prod { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; color: var(--text-secondary, #c9cecb); }
    .ws-rv__prod > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ws-rv__pimg { width: 60px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; background: rgba(255, 255, 255, .05); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
    .ws-rv__pimg--blank { display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .06); color: #8a908d; }
    .ws-rv__ok { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 13.5px; font-weight: 500; color: #40d47e; }

    html[data-theme="light"] .ws-rv, html[data-theme="light"] .ws-rev-toolbar { background: rgba(10, 15, 20, .03); border-color: rgba(10, 15, 20, .09); }
    html[data-theme="light"] .ws-rv__foot { border-top-color: rgba(10, 15, 20, .09); }
    html[data-theme="light"] .ws-rv__stars i { color: rgba(10, 15, 20, .16); }
    html[data-theme="light"] .ws-rev-sort { border-color: rgba(10, 15, 20, .14); }
    html[data-theme="light"] .ws-rev-head-btn { border-color: rgba(10, 15, 20, .14); background: rgba(10, 15, 20, .03); }
}

/* "Мои покупки" (cart header): solid green, tighter corners, slight volume. Not tied to a breakpoint. */
#btn-my-purchases {
    position: relative; flex-shrink: 0; display: inline-flex; align-items: center; white-space: nowrap; line-height: 1;
    padding: 10px 18px; border: 0; border-radius: 8px; cursor: pointer;
    font-family: inherit; font-size: 14px; font-weight: 700; color: #0a0a0a;
    background: linear-gradient(180deg, #5AEE98 0%, #35E07C 52%, #2BCB6E 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 0 rgba(0, 70, 30, .22), 0 2px 0 #1c9b4f, 0 6px 14px rgba(53, 224, 124, .2);
    transition: filter .15s, transform .12s, box-shadow .12s;
}
#btn-my-purchases:hover { filter: brightness(1.06); }
#btn-my-purchases:active {
    transform: translateY(2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(0, 70, 30, .22), 0 0 0 #1c9b4f, 0 3px 8px rgba(53, 224, 124, .18);
}

/* Search bar: animated placeholder ("Найти" + rolling category names), injected by theme-toggle.js */
.ws-search-bar { position: relative; }
.ws-ph {
    position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: .3em; overflow: hidden;
    white-space: nowrap; pointer-events: none; z-index: 1; transition: opacity .15s;
}
.ws-ph__pre { flex: none; color: var(--ws-ph-pre, #7d827f); }
.ws-ph__win { position: relative; flex: 1; min-width: 0; height: 1.5em; overflow: hidden; }
.ws-ph__w { position: absolute; left: 0; top: 0; line-height: 1.5em; white-space: nowrap; color: var(--ws-ph-word, #b4b9b6); will-change: transform, opacity; }
.ws-search-bar.ws-has-value .ws-ph { opacity: 0; }
html[data-theme="light"] .ws-ph { --ws-ph-pre: var(--text-secondary, #6b7280); --ws-ph-word: var(--text-primary, #111); }

/* Scrollbars are hidden everywhere (scrolling itself is untouched: wheel, trackpad, touch, keyboard).
   Overrides the 6px custom scrollbar that app.html turns on for tablet and up. */
html, html * { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, html *::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; background: transparent !important; }
