/* ===================================================================
   WEB VERSION — PUBGFARM Desktop/Mobile Web UI
   Inspired by modern social-app design (dark theme, sidebar, cards)
   =================================================================== */

/* ---- Design Tokens ---- */
:root {
    --bg-primary: #151518;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #f5f5f5;
    --text-secondary: rgba(255, 255, 255, .5);
    --text-tertiary: rgba(255, 255, 255, .3);
    --accent-primary: #0080FF;
    --accent-secondary: #3b82f6;
    --accent-hover: #93c5fd;
    --border-color: rgba(255, 255, 255, .08);
    --block-bg: #222224;
    --block-bg-secondary: #2a2a2c;
    --block-hover-bg: #2c2c2f;
    --bg-hover: rgba(255, 255, 255, .08);
    --bg-active: rgba(255, 255, 255, .12);
    --glass-bg: rgba(47, 47, 47, .5);
    --nav-gradient: linear-gradient(to bottom, transparent 0%, rgba(21, 21, 24, .3) 30%, rgba(21, 21, 24, .8) 100%);
    --btn-primary-bg: #ffffff;
    --btn-primary-text: #000000;
    --shadow-elevated: 0 4px 16px rgb(0 0 0 / 20%);
    --transition-normal: .3s ease;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --sidebar-width: 200px;
    --sidebar-gap: 36px;
    --content-max-width: 700px;
}

/* ---- Critical: Neutralize style.css globals ---- */
body.web-body,
html:has(body.web-body) {
    overflow: visible !important;
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    height: auto !important;
    min-height: 100vh;
    display: block !important;
}

body.web-body:not(.page-index) {
    background: var(--bg-primary) !important;
    background-color: var(--bg-primary) !important;
}

body.web-body * {
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    user-select: auto !important;
}

body.web-body img {
    pointer-events: auto !important;
}

/* ---- Base Reset ---- */
body.web-body {
    margin: 0;
    padding: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.web-body * {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif !important;
}

/* ---- Scrollbar ---- */
body.web-body ::-webkit-scrollbar {
    display: block !important;
    width: 8px !important;
    height: 8px !important;
}
body.web-body ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
body.web-body ::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 4px;
}
body.web-body ::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}
body.web-body * {
    scrollbar-width: thin !important;
    scrollbar-color: var(--text-secondary) var(--bg-primary) !important;
}

/* ---- Hide miniapp elements ---- */
body.web-body .tg-app-header,
body.web-body .bottom-nav,
body.web-body .pc-sidebar,
body.web-body .edge-bar,
body.web-body #orientation-lock-overlay {
    display: none !important;
}

/* ---- Page wrappers (neutralize style.css) ---- */
body.web-body .page-wrapper {
    position: relative !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    transform: none !important;
    transition: none !important;
    min-height: 0;
}

body.web-body .pages-container,
body.web-body #pagesContainer {
    position: relative !important;
    overflow: visible !important;
    height: auto !important;
    display: block !important;
}

/* ============================================================
   LAYOUT — Sidebar | Content | Right
   ============================================================ */

/* ---- Sidebar ---- */
.web-sidebar {
    box-sizing: border-box;
    position: fixed;
    top: 0;
    right: calc(50% + var(--content-max-width) / 2 + var(--sidebar-gap));
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    padding: var(--spacing-2xl) 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;
    overflow: hidden;
}

.web-sidebar-top {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

/* Logo in sidebar */
.web-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
}

.web-sidebar-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.web-sidebar-logo-text {
    font-size: 16px;
    font-weight: 700;
}

.web-sidebar-logo-ver {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: 4px;
    font-weight: 400;
}

/* Sidebar Navigation */
.web-sidebar-nav {
    display: flex;
    flex-direction: column;
    margin-top: var(--spacing-xl);
}

/* Desktop: compact horizontal-wrap nav */
@media (min-width: 1174px) {
    .web-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: var(--spacing-md);
    }
}

.web-sidebar-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 12px 20px;
    border-radius: 18px;
    opacity: .5;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all .2s ease;
    border: none;
    background: none;
    white-space: nowrap;
    text-align: left;
    width: 100%;
}

.web-sidebar-link:hover {
    background-color: var(--block-bg);
}

.web-sidebar-link.active {
    background-color: var(--block-bg);
    opacity: 1;
}

.web-sidebar-link svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* Sidebar bottom */
.web-sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: 0 16px;
    flex-shrink: 0;
}

.web-sidebar-user {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
    color: var(--text-primary);
    cursor: pointer;
    border: none;
    background: none;
    text-align: left;
}

.web-sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.web-sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
}

.web-sidebar-user-balance {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.web-sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 12px;
    transition: all .2s ease;
    opacity: .3;
}

.web-sidebar-logout:hover {
    opacity: .6;
}

/* ---- Top Header (hidden on desktop, shown on mobile) ---- */
.web-header {
    display: none;
}

/* ---- Main Content Area ---- */
.web-layout-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.web-content-column {
    position: relative;
    width: 100%;
    max-width: var(--content-max-width);
    display: flex;
    flex-direction: column;
}

.web-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-2xl) 0;
}



/* ---- Right Sidebar ---- */
.web-right-sidebar {
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: calc(50% + var(--content-max-width) / 2 + var(--sidebar-gap));
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    padding: var(--spacing-2xl) 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

.web-right-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: .5;
    font-size: 13px;
    color: var(--text-secondary);
}

.web-right-sidebar-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .2s ease;
}

.web-right-sidebar-links a:hover {
    color: var(--text-primary);
}

.web-right-sidebar-copy {
    margin-top: 16px;
    font-size: 12px;
    opacity: .6;
    color: var(--text-tertiary);
}

/* ---- Footer (hidden on desktop — content moved to right sidebar) ---- */
.web-footer {
    display: none;
}

/* ---- Mobile Bottom Nav ---- */
.web-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--nav-gradient);
    pointer-events: none;
    display: none;
    gap: 12px;
    z-index: 100;
}

.web-mobile-nav-bar {
    position: relative;
    flex: 1;
    height: 64px;
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-radius: 32px;
    pointer-events: auto;
    padding: 6px;
    box-shadow: var(--shadow-elevated);
}

.web-mobile-nav-indicator {
    position: absolute;
    top: 6px;
    bottom: 6px;
    background: rgba(255, 255, 255, .08);
    border-radius: 32px;
    transition: all .2s cubic-bezier(.5, 0, 0, 1);
}

.web-mobile-nav-link {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color .2s ease;
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
}

.web-mobile-nav-link.active {
    color: var(--text-primary);
}

.web-mobile-nav-link svg {
    width: 22px;
    height: 22px;
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ---- Login Button ---- */
.web-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    transition: opacity .2s ease;
    width: 100%;
    margin-top: var(--spacing-md);
}

.web-login-btn:hover {
    opacity: .9;
}

.web-login-btn svg {
    width: 20px;
    height: 20px;
}

/* ---- Guest Landing ---- */
.web-guest-landing {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 24px 0;
}

.web-guest-hero {
    text-align: center;
    padding: 48px 24px;
}

.web-guest-hero-title {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0 0 12px;
    background: linear-gradient(135deg, var(--accent-primary), #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.web-guest-hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.web-guest-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.web-guest-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s ease;
}

.web-guest-hero-btn.primary {
    background: var(--accent-primary);
    color: #fff;
}
.web-guest-hero-btn.primary:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.web-guest-hero-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.web-guest-hero-btn.secondary:hover {
    background: var(--block-bg);
}

/* Feature cards */
.web-guest-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0;
}

.web-guest-feature-card {
    background: var(--block-bg);
    border-radius: 16px;
    padding: 28px 20px 24px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: border-color .2s ease, transform .2s ease;
}
.web-guest-feature-card:hover {
    border-color: rgba(255,255,255,.15);
    transform: translateY(-2px);
}

.web-guest-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: var(--accent-primary);
}
.web-guest-feature-icon svg {
    width: 24px;
    height: 24px;
}

.web-guest-feature-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
}

.web-guest-feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

@media (min-width: 601px) and (max-width: 900px) {
    .web-guest-features {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .web-guest-features {
        grid-template-columns: 1fr;
    }
    .web-guest-hero-title {
        font-size: 32px;
    }
}

/* Guest Reviews */
.web-guest-reviews {
    padding: 0;
}
.web-guest-reviews-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
}
.web-guest-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.web-guest-reviews-loader {
    display: flex;
    justify-content: center;
    padding: 32px;
}

/* Reviews summary header */
.web-guest-reviews-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 0 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    margin-bottom: 16px;
}
.web-guest-reviews-avg {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}
.web-guest-reviews-avg-stars {
    display: flex;
    gap: 3px;
    margin-top: 4px;
}
.web-guest-reviews-count {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Reviews cards grid */
.web-guest-reviews-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Review card */
.web-guest-review-card {
    background: rgba(26,26,26,.5);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px 16px;
    transition: border-color .2s ease;
}
.web-guest-review-card:hover {
    border-color: rgba(255,255,255,.12);
}

/* Staggered animation */
.web-guest-review-card--animated {
    opacity: 0;
    transform: translateY(6px);
    animation: webReviewCardIn .25s cubic-bezier(.16,1,.3,1) forwards;
}

@keyframes webReviewCardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.web-guest-review-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Avatar */
.web-guest-review-avatar-wrap {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    position: relative;
}
.web-guest-review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.web-guest-review-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(90,237,144,.15);
    color: #5AED90;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}

/* Meta */
.web-guest-review-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.web-guest-review-name-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}
.web-guest-review-name {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}
.web-guest-verified-badge {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 2px;
}
.web-guest-review-date {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}
.web-guest-review-stars {
    display: flex;
    gap: 1px;
}

/* Product */
.web-guest-review-product {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}
.web-guest-review-product-img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Tags */
.web-guest-review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}
.web-guest-review-tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    color: var(--text-secondary);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .web-guest-reviews-cards {
        grid-template-columns: 1fr;
    }
}

/* ---- Guest Lock Screen ---- */
.web-guest-lock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 16px;
    text-align: center;
    padding: var(--spacing-xl);
}

.web-guest-lock-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--block-bg);
    border-radius: 50%;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.web-guest-lock-icon svg {
    width: 32px;
    height: 32px;
}

.web-guest-lock h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.web-guest-lock p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    max-width: 320px;
    line-height: 1.5;
}

.web-guest-lock button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    background-color: #2aabee;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color .15s ease;
    margin-top: var(--spacing-md);
}

.web-guest-lock button:hover {
    background-color: #229ed9;
}

/* ---- Telegram Login Modal ---- */
.web-tg-login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity .2s ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.web-tg-login-overlay.visible {
    opacity: 1;
}

.web-tg-login-modal {
    position: relative;
    background: var(--block-bg);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 380px;
    width: 100%;
    text-align: center;
}

.web-tg-login-modal h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
}

.web-tg-login-modal p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px;
    line-height: 1.5;
}

.web-tg-login-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color .2s ease;
}

.web-tg-login-close:hover {
    color: var(--text-primary);
}

/* ---- Loader ---- */
.web-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .3s ease;
}

.web-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: web-spin .8s linear infinite;
}

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

/* ============================================================
   CONTENT STYLING — Cards, Desktop overrides for page content
   ============================================================ */

/* Page content blocks get card treatment on desktop */
body.web-body .page-wrapper {
    padding: 0 var(--spacing-md);
}

/* Card-like sections */
body.web-body .info-card,
body.web-body .card,
body.web-body .shop-category {
    background: var(--block-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

/* ---- Desktop overrides for page tabs ---- */
body.web-body .greeting-title {
    font-size: 24px;
}

/* ---- Ensure proper top header override ---- */
body.web-body .top-header {
    display: none !important;
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 1173px) {
    .web-sidebar {
        display: none;
    }

    .web-right-sidebar {
        display: none;
    }

    .web-header {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: 56px;
        background: rgba(21, 21, 24, .85);
        -webkit-backdrop-filter: blur(24px);
        backdrop-filter: blur(24px);
        border-bottom: 1px solid var(--border-color);
    }

    .web-header-inner {
        max-width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 var(--spacing-md);
    }

    .web-logo {
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        color: var(--text-primary);
        cursor: pointer;
    }

    .web-logo-img {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .web-logo-text {
        font-size: 18px;
        font-weight: 700;
    }

    .web-nav {
        display: none !important;
    }

    .web-auth {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .web-mobile-nav {
        display: flex;
    }

    .web-footer {
        display: none;
    }

    .web-footer-inner {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .web-footer-brand-name {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .web-footer-brand-desc {
        font-size: 13px;
        color: var(--text-secondary);
        line-height: 1.5;
    }

    .web-footer-links {
        display: flex;
        gap: 48px;
    }

    .web-footer-col {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .web-footer-col h5 {
        font-size: 14px;
        font-weight: 600;
        margin: 0 0 4px;
    }

    .web-footer-col a {
        font-size: 13px;
        color: var(--text-secondary);
        text-decoration: none;
        transition: color .2s ease;
    }

    .web-footer-col a:hover {
        color: var(--text-primary);
    }

    .web-footer-bottom {
        font-size: 12px;
        color: var(--text-tertiary);
        text-align: center;
        padding: 24px 0 0;
        border-top: 1px solid var(--border-color);
    }

    .web-main {
        padding: 56px 0 96px;
    }

    .web-content-column {
        max-width: 100%;
    }

    body.web-body .page-wrapper {
        padding: 0;
    }
}

/* ---- Desktop only ---- */
@media (min-width: 1174px) {
    .web-nav {
        display: none !important;
    }

    .web-auth {
        display: none !important;
    }

    .web-header {
        display: none !important;
    }
}

/* ---- User Profile in header (mobile) ---- */
.web-user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: var(--radius-full);
    background: var(--block-bg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all .2s ease;
}

.web-user-profile:hover {
    background: var(--block-hover-bg);
}

.web-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.web-user-name {
    font-size: 13px;
    font-weight: 600;
}

.web-user-balance {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--block-bg);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 700;
}

/* Mobile header login btn */
@media (max-width: 1173px) {
    .web-login-btn {
        width: auto;
        height: 36px;
        padding: 0 16px;
        font-size: 13px;
        border-radius: 18px;
        margin-top: 0;
    }
}

/* ============================================================
   WEB PROFILE OVERLAY
   ============================================================ */
.web-profile-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    transition: background .3s ease;
}

.web-profile-overlay.open {
    background: rgba(0, 0, 0, .6);
    pointer-events: all;
}

.web-profile-panel {
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    background: var(--block-bg);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.16, 1, .3, 1);
    padding: 0;
}
.web-profile-panel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.web-profile-overlay.open .web-profile-panel {
    transform: translateY(0);
}



/* Handle bar */
.web-profile-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 8px;
}

.web-profile-handle-bar {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, .2);
    border-radius: 2px;
}

/* User section */
.web-profile-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 24px 24px;
    gap: 12px;
}

.web-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
}

.web-profile-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.web-profile-id {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.web-profile-balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 700;
}

/* Colors wrap (collapsible) */
.web-profile-colors-wrap {
    padding: 0 16px 8px;
}

/* Actions */
.web-profile-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 16px 16px;
}

.web-profile-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease;
    text-align: left;
    width: 100%;
}

.web-profile-action:hover {
    background: var(--bg-hover);
}

.web-profile-action svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.web-profile-action-danger {
    color: #ef4444;
}

.web-profile-action-danger svg {
    color: #ef4444;
}



/* Orders section */
.web-profile-orders {
    padding: 16px;
}

.web-profile-orders-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.web-profile-orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.web-profile-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    transition: background .15s ease;
}

.web-profile-order-item:hover {
    background: var(--block-hover-bg);
}

.web-profile-order-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
    background: rgba(255,255,255,.05);
}

.web-profile-order-info {
    flex: 1;
    min-width: 0;
}

.web-profile-order-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.web-profile-order-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.web-profile-order-price {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.web-profile-orders-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.web-profile-orders-empty svg {
    display: block;
    margin: 0 auto 12px;
    width: 40px;
    height: 40px;
    color: var(--text-tertiary);
}

.web-profile-orders-loader {
    display: flex;
    justify-content: center;
    padding: 32px;
}

.web-profile-orders-loader .web-loader-spinner {
    width: 28px;
    height: 28px;
}

@media (min-width: 1174px) {
    .web-profile-panel {
        border-radius: var(--radius-xl);
        max-height: 80vh;
        margin-bottom: 32px;
    }
    .web-profile-overlay {
        align-items: center;
    }
}

/* ---- Profile section ---- */
.web-profile-section {
    padding: 16px;
}

.web-profile-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.web-profile-section-title svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---- Color cards (mini-app style) ---- */
.web-profile-colors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.wpc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all .2s ease;
    background: rgba(255,255,255,.03);
}

.wpc-card:hover {
    background: rgba(255,255,255,.06);
}

.wpc-card.active {
    border-color: var(--accent-primary, #3b82f6);
    background: rgba(59,130,246,.08);
    box-shadow: 0 0 12px rgba(59,130,246,.15);
}

.wpc-preview {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.wpc-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary, #999);
    text-align: center;
    line-height: 1.2;
}

.wpc-card.active .wpc-label {
    color: var(--text-primary, #fff);
}

/* Neon edit button */
.wpc-neon-edit-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0;
    transition: transform .15s, background .15s;
}

.wpc-neon-edit-btn svg {
    width: 14px;
    height: 14px;
}

.wpc-neon-edit-btn:hover {
    transform: scale(1.15);
    background: rgba(0,0,0,.7);
}

/* CDN image inside preview */
.wpc-preview-img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}

.web-profile-order-balance {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}

/* ============================================
   SHOP GRID — Web desktop responsive grid
   ============================================ */

/* Базовый грид магазина для веб-версии */
.web-shop-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 16px !important;
    justify-content: stretch;
    width: 100%;
}

/* Десктоп: при видимом сайдбаре — увеличиваем минимум и gap */
@media (min-width: 1174px) {
    .web-shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
        gap: 20px !important;
    }
}

/* Широкие экраны: увеличиваем минимум и gap */
@media (min-width: 1600px) {
    .web-shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
        gap: 24px !important;
    }
}

/* ---- Shop card enhancements (web) ---- */
body.web-body .web-shop-grid .glass-card {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                box-shadow 0.25s ease;
}

body.web-body .web-shop-grid .glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Правильный аспект карточки на десктопе */
body.web-body .web-shop-grid .aspect-card {
    aspect-ratio: 3 / 4;
}
