/* ==========================================================================
   1. КОРНЕВЫЕ СТИЛИ, ПЕРЕМЕННЫЕ И ТЕМЫ
   ========================================================================== */

:root {
    --color-background: #0A0A0C;
    --color-surface: #141418;
    --color-primary: #805AD5;
    --color-primary-light: #9B78F2;
    --color-text-primary: #F7F7F9;
    --color-text-secondary: #A0A0B0;
    --color-border: #2D2D36;
    --color-success: #10B981;
    --color-danger: #E53E3E;
    --font-main: 'Inter', sans-serif;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --shadow-glow: 0px 0px 25px 0px rgb(128 90 213 / 40%);
    --transition-main: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(circle at 1px 1px, rgb(160 160 176 / 10%) 1px, transparent 0);
    background-size: 50px 50px;
    background-attachment: fixed;
}

html.light-theme {
    --color-background: #F7F7F9;
    --color-surface: #FFF;
    --color-text-primary: #0A0A0C;
    --color-text-secondary: #5A5A6B;
    --color-border: #E4E4E7;
    background-image: radial-gradient(circle at 1px 1px, rgb(20 20 24 / 5%) 1px, transparent 0);
}

body.light-theme {
    --shadow-glow: 0px 0px 25px 0px rgb(128 90 213 / 25%);
}

body.light-theme .header.scrolled {
    background-color: rgb(247 247 249 / 60%);
}

body.light-theme .dashboard-nav {
    background-color: rgb(255 255 255 / 60%);
}

.light-theme .aurora-shape {
    opacity: 0.1;
}

/* Контекстные фоны для "Авроры" */
.aurora-shape-2 {
    transition: background-color 0.8s ease;
}
body.bg-context-vp .aurora-shape-2 {
    background-color: #d55a6a;
}
body.bg-context-steam .aurora-shape-2 {
    background-color: #5ad5b5;
}


/* ==========================================================================
   2. ОСНОВНЫЕ СТИЛИ (BODY, LAYOUT, УТИЛИТЫ)
   ========================================================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    overflow: hidden;
    background: transparent !important;
}

#smooth-wrapper {
    position: relative;
    height: 100%;
    overflow-y: auto; 
    overflow-x: hidden;
}

#smooth-content {
    will-change: transform;
    transition: transform 0.1s linear;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main-content {
    position: relative;
    z-index: 1;
    flex-grow: 1;
    padding-bottom: 20vh;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-container {
    padding-top: 100px;
}

.view {
    display: none;
    overflow: visible;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.view.active {
    display: block;
    animation: viewFadeIn 0.5s ease forwards;
    position: relative;
    z-index: 2;
}

@keyframes viewFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.view.view-leave-to-left {
    transform: translateX(-50px);
    opacity: 0;
}

.view.view-enter-from-right {
    transform: translateX(50px);
    opacity: 0;
}

/* Фокус */
:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
    box-shadow: var(--shadow-glow);
    border-radius: var(--border-radius-sm);
}


/* ==========================================================================
   3. ОБЩИЕ КОМПОНЕНТЫ (КНОПКИ, КАРТОЧКИ, INPUTS И Т.Д.)
   ========================================================================== */

/* --- Кнопки --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--color-primary-light);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
}
.btn-secondary:hover {
    background-color: var(--color-border);
}

.btn-danger {
    background-color: var(--color-danger);
    color: white;
}
.btn-danger:hover {
    background-color: #C53030;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 24px;
    position: relative;
}
.btn-icon:hover {
    color: var(--color-text-primary);
}

.btn-full {
    width: 100%;
}
.btn-full:disabled {
    background-color: var(--color-border);
    color: var(--color-text-secondary);
    cursor: not-allowed;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.btn .bx-spin {
    font-size: 20px;
}


/* --- Хлебные крошки --- */
.breadcrumb {
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--color-text-secondary);
}
.breadcrumb a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: var(--transition-main);
}
.breadcrumb a:hover {
    color: var(--color-text-primary);
    text-decoration: underline;
}
.breadcrumb span {
    margin: 0 8px;
}


/* --- Универсальный стиль для "заглушек" --- */
.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    width: 100%;
    min-height: 300px;
    color: var(--color-text-secondary);
}
.empty-state h3, .empty-state h4 {
    color: var(--color-text-primary);
    font-size: 18px;
    margin-bottom: 8px;
}
.empty-state p {
    max-width: 300px;
}


/* ==========================================================================
   4. HEADER
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition-main);
}

.header.scrolled {
    background-color: rgb(10 10 12 / 60%);
    backdrop-filter: blur(12px);
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
}

.header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
}

.logo {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text-primary);
    font-size: 22px;
    font-weight: 800;
}

.logo-icon-wrapper {
    background-color: var(--color-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-main);
    box-shadow: var(--shadow-glow);
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transform: translateX(-10px);
    transition: max-width 0.4s ease-out, opacity 0.3s ease-out, transform 0.4s ease-out;
}

.logo:hover .logo-text {
    opacity: 1;
    max-width: 200px;
    transform: translateX(0);
}

#authControls {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-counter {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--color-primary);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

#open-cart-btn {
    animation: cart-pop-in 0.3s ease-out forwards;
}

@keyframes cart-pop-in {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */

.footer {
    padding: 60px 0 30px;
    margin-top: 10vh;
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.3;
}

html.light-theme .footer::before {
    background-image: radial-gradient(circle at 1px 1px, rgb(20 20 24 / 5%) 1px, transparent 0);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column .logo {
    gap: 20px;
    margin-bottom: 16px;
}
.footer-column .logo:hover .logo-text {
    transform: none;
}
.footer-column .logo-icon-wrapper {
    background-color: transparent;
    box-shadow: none;
}
.footer-column .logo-icon {
    width: 60px;
    height: 60px;
}

.footer-tagline {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.6;
    max-width: 250px;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--color-text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    padding-left: 18px;
}

.footer-column h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-radius: 2px;
    box-shadow: 0 0 5px var(--color-primary);
}

.footer-links a {
    display: block;
    margin-bottom: 12px;
    color: var(--color-text-secondary);
    text-decoration: none;
    position: relative;
    padding-left: 0;
    transition: var(--transition-main);
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    color: var(--color-primary);
    transition: var(--transition-main);
}

.footer-links a:hover {
    color: var(--color-text-primary);
    transform: translateX(5px);
}
.footer-links a:hover::before {
    left: -15px;
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    color: var(--color-text-secondary);
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-main);
}

.social-links a:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-glow);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--color-text-secondary);
    flex-wrap: wrap;
    gap: 12px;
}

.footer-legal-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: var(--transition-main);
}
.footer-legal-link:hover {
    color: var(--color-text-primary);
    text-decoration: underline;
}

.footer-legal {
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text-secondary);
    opacity: 0.7;
}

/* ==========================================================================
   6. LANDING PAGE СЕКЦИИ
   ========================================================================== */

#landing-page {
    padding-top: 100px;
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 120px 0;
}
.hero h1 {
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
    background: linear-gradient(120deg, #fff, #A0A0B0);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 20px;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 20px;
}
.bento-item {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-main);
}
.bento-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius-md);
    padding: 1px;
    background: conic-gradient(from 180deg at 50% 50%, rgb(128 90 213 / 80%) 0deg, rgb(10 10 12 / 0%) 360deg);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition-main);
}
.bento-item:hover {
    transform: translateY(-5px);
    border-color: transparent;
}
.bento-item:hover::before {
    opacity: 1;
}
.bento-item.col-span-2 {
    grid-column: span 2;
}
.bento-item.row-span-2 {
    grid-row: span 2;
}
.bento-item h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}
.bento-item p {
    color: var(--color-text-secondary);
}
.bento-item .icon {
    font-size: 48px;
    color: var(--color-primary);
    margin-bottom: 20px;
}
.bento-product {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--color-surface), #1a1722);
}
.bento-product .price {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-text-primary);
}
.bento-testimonial {
    display: flex;
    flex-direction: column;
}
.testimonial-text {
    font-style: italic;
    flex-grow: 1;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}
.testimonial-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-primary);
}
.testimonial-author-name {
    font-weight: 500;
}

/* --- Прочие секции --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-header-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}
.section-header-split h2 {
    font-size: 36px;
    font-weight: 800;
}

.product-preview-section,
.catalog-showcase-section,
.featured-products-section {
    padding-bottom: 10vh;
}

.faq-section,
.faq-split-section,
.final-promise-section,
.final-brand-section {
    padding-bottom: 15vh;
}

/* --- Final CTA "Прожектор" --- */
.final-spotlight-section {
    padding: 15vh 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.final-spotlight-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    padding-top: 50%;
    max-width: 2000px;
    transform: translate(-50%, -50%);
    background: radial-gradient( ellipse at center, rgb(128 90 213 / 15%) 0%, rgb(128 90 213 / 0%) 40% );
    z-index: 0;
    animation: spotlight-pulse 8s infinite ease-in-out;
}
@keyframes spotlight-pulse {
    0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.8; }
}

.spotlight-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.spotlight-content h2 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #FFF, #c0c0d0);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.spotlight-content p {
    font-size: 18px;
    color: var(--color-text-secondary);
    max-width: 55ch;
    margin-bottom: 40px;
}
.spotlight-content .btn {
    animation: button-glow 4s infinite ease-in-out;
}
@keyframes button-glow {
    0%, 100% { box-shadow: var(--shadow-glow); transform: scale(1); }
    50% { box-shadow: 0 0 35px 0 rgb(128 90 213 / 50%); transform: scale(1.02); }
}


/* ==========================================================================
   7. DASHBOARD & ACCOUNT
   ========================================================================== */

.dashboard-nav-menu a i {
    transition: transform 0.3s ease;
}

.dashboard-nav-menu a:hover i {
    transform: scale(1.1) rotate(-5deg); /* Иконка слегка увеличится и наклонится */
}

/* Особая анимация для иконки настроек */
.dashboard-nav-menu a[data-panel="panel-settings"]:hover i {
    transform: scale(1.1) rotate(45deg); /* Шестеренка будет вращаться */
}   

#dashboard {
    padding-top: 100px;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: flex-start;
    height: 100%;
}

.dashboard-nav {
    background-color: rgb(20 20 24 / 60%);
    backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 20px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
}
.user-profile-avatar {
    width: 72px;
    height: 72px;
    margin-top: 8px;
    border-radius: 50%;
    background-color: var(--color-surface-variant);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--color-surface);
    box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
}
.user-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-profile-avatar .fallback-icon {
    font-size: 36px;
    color: var(--color-text-secondary);
}
.user-profile-name {
    font-size: 18px;
    font-weight: 700;
}
.user-profile-balance {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.dashboard-nav-menu {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: calc(100% - 102px);
}
.dashboard-nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: var(--transition-main);
}
.dashboard-nav-menu a:hover {
    background-color: var(--color-border);
    color: var(--color-text-primary);
}
.dashboard-nav-menu a.active {
    background-color: var(--color-primary);
    color: white;
}
.dashboard-nav-menu a i {
    font-size: 20px;
}

#logoutBtn-wrapper {
    margin-top: auto; /* Прижимает кнопку к низу навигации */
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

/* Стили для самой кнопки */
#logoutBtn-wrapper .btn {
    width: 100%;
    margin: 0;
    justify-content: flex-start;
    padding: 12px 16px;
    background-color: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 16px;
    font-family: var(--font-main);
}

/* Эффект при наведении - делаем его "опасным", красным */
#logoutBtn-wrapper .btn:hover {
    background-color: rgba(229, 62, 62, 0.1); /* Легкий красный фон */
    color: var(--color-danger);
    transform: none; /* Убираем лишние сдвиги */
    box-shadow: none;
}

.dashboard-panel {
    display: none;
}
.dashboard-panel.active {
    display: block; /* <-- ВОЗВРАЩАЕМ КАК БЫЛО */
    animation: fadeIn 0.5s ease-out;
}

#panel-wishlist #no-wishlist-results {
    flex-grow: 1;
    width: 100%;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-panel-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.stat-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 24px;
}
.stat-card-title {
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}
.stat-card-value {
    font-size: 28px;
    font-weight: 700;
}

/* --- Настройки --- */
.settings-section {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    margin-bottom: 30px;
}
.settings-section h3 {
    padding: 24px 24px 0;
    font-size: 20px;
}
.settings-section > p {
    padding: 0 24px 24px;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}
.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    gap: 20px;
}
.settings-section .settings-item:last-child {
    border-bottom: none;
}
.settings-item-label h4, .settings-item-label h5 {
    font-size: 16px;
    font-weight: 500;
}
.settings-item-label p {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--color-border);
    border-radius: 34px;
    transition: .4s;
}
.slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}
input:checked + .slider {
    background-color: var(--color-primary);
}
input:checked + .slider::before {
    transform: translateX(22px);
}

.danger-zone {
    border-top: 1px solid var(--color-danger);
}
.danger-zone h4 {
    padding: 24px 24px 0;
    color: var(--color-danger);
}
.danger-zone .settings-item-label h5 {
    color: var(--color-danger);
}

.theme-selector {
    display: flex;
    gap: 10px;
}
.theme-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    background-color: var(--color-surface);
    color: var(--color-text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-main);
}
.theme-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.theme-btn.active {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
    color: white;
}

/* --- История заказов --- */
.history-list .history-item {
    border-bottom: 1px solid var(--color-border);
}
.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
}
.history-item-header:hover {
    background-color: var(--color-surface);
}
.history-item-info span {
    margin-right: 20px;
}
.history-item-id {
    font-weight: 700;
}
.history-item-date {
    color: var(--color-text-secondary);
}
.history-item-price {
    font-weight: 700;
    color: var(--color-primary);
}
.history-item-toggle {
    font-size: 24px;
    transition: transform 0.3s ease;
}
.history-item.active .history-item-toggle {
    transform: rotate(180deg);
}
.history-item-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: var(--color-surface);
}
.history-item.active .history-item-body {
    max-height: 500px;
}
.history-item-body-content {
    padding: 20px;
    border-top: 1px solid var(--color-border);
}
.code-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-background);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    margin-top: 10px;
}
.code-block code {
    font-family: monospace;
    font-size: 16px;
}
.copy-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 20px;
    cursor: pointer;
}
.copy-btn:hover {
    color: var(--color-primary);
}

/* --- Реферальная система --- */
.referral-link-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-background);
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
    margin-top: 10px;
}
.referral-link-box code {
    font-family: monospace;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==========================================================================
   8. SHOP & PRODUCTS
   ========================================================================== */

.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap;
}

.category-filters {
    display: flex;
    gap: 10px;
    background-color: var(--color-surface);
    padding: 8px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
}
.category-filters .filter-btn {
    background-color: transparent;
    color: var(--color-text-secondary);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    cursor: pointer;
}
.category-filters .filter-btn.active, .category-filters .filter-btn:hover {
    background-color: var(--color-primary);
    color: white;
}

.search-bar {
    position: relative;
    flex-grow: 1;
    max-width: 300px;
}
.search-bar input {
    width: 100%;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 12px 16px 12px 40px;
    color: var(--color-text-primary);
    font-size: 16px;
    transition: var(--transition-main);
}
.search-bar input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}
.search-bar .bx-search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    font-size: 20px;
}

.sort-selector {
    position: relative;
    display: flex;
    align-items: center;
}
.sort-selector .bx {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    font-size: 20px;
    pointer-events: none;
}
#sortSelect {
    appearance: none;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 12px 16px 12px 40px;
    color: var(--color-text-primary);
    font-size: 16px;
    font-family: var(--font-main);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-main);
    width: 250px;
}
#sortSelect:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}


/* --- Сетка товаров --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    /* ДОБАВЬТЕ ЭТО СВОЙСТВО */
    justify-content: start; /* Не растягивать колонки, если их мало */
}
#panel-shop .products-grid {
    min-height: 400px;
}
.products-grid.empty {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Карточка товара --- */
.product-card {
    background: var(--color-surface);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--color-text-primary);
    position: relative; /* САМОЕ ВАЖНОЕ: создает "холст" для позиционирования */
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-primary-light);
}
.product-card-entering {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
}
.bento-item:hover, .product-card:hover { /* <-- Объединим селекторы для общего эффекта */
    transform: translateY(-5px) scale(1.02); /* Добавим легкое увеличение */
    box-shadow: var(--shadow-glow); /* Используем вашу переменную для свечения! */
    border-color: transparent; /* Скрываем обычную рамку, чтобы свечение было видно */
}

/* Для bento-элементов оставляем анимированную рамку */
.bento-item:hover::before {
    opacity: 1;
}

/* Для карточек товара, у которых нет псевдоэлемента, просто меняем цвет рамки */
.product-card:hover {
    border-color: var(--color-primary-light);
}
.product-image {
    height: 180px; /* Фиксированная высота для блока с картинкой */
    /* flex-grow: 1; <-- УБЕДИТЕСЬ, ЧТО ЭТА СТРОКА УДАЛЕНА ИЛИ ЗАКОММЕНТИРОВАНА */
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image-vp { background: linear-gradient(45deg, #1a1a1f, #3c1a4a); }
.product-image-steam { background: linear-gradient(45deg, #1a1a1f, #1a3a4a); }
.product-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(10 10 12 / 70%);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
}

.product-card-top-info {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 50px);
}
.tag {
    background-color: rgb(10 10 12 / 60%);
    backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.tag-hit { color: #ffae00; border: 1px solid rgb(255 174 0 / 30%); }
.tag-profitable { color: var(--color-success); border: 1px solid rgb(16 185 129 / 30%); }
.tag-auto, .tag-global { color: var(--color-primary-light); border: 1px solid rgb(155 120 242 / 30%); }
.stock-counter.tag { color: var(--color-text-secondary); border: 1px solid var(--color-border); }
.stock-counter.low { color: #ffae00; border-color: rgb(255 174 0 / 30%); }


.product-main-link {
    text-decoration: none;
    color: var(--color-text-primary);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info {
    flex-grow: 1;
    padding: 20px;
}
.product-info h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.price-action {
    padding: 0 16px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.price-action .price {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary);
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}
.action-buttons-grid .btn.buy-now-direct-btn {
    flex-grow: 1;
}
.action-buttons-grid .btn.add-to-cart-btn-small {
    padding: 10px;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}
.action-buttons-grid .btn.add-to-cart-btn-small i {
    font-size: 24px;
    margin: 0;
}
.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    
    /* 🔥 ДИЗАЙН КАК У .tag */
    padding: 5px 10px; /* Делаем отступы, чтобы получилась пилюля */
    border-radius: 999px; /* Гарантирует форму пилюли */
    font-size: 0; /* Скрываем любой текст, оставляем только иконку */

    background-color: rgb(10 10 12 / 60%);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-main);
}

/* Иконка внутри кнопки */
.wishlist-btn::before {
    content: '\ea73'; /* Иконка bx-heart */
    font-family: 'boxicons' !important;
    font-size: 18px; /* Немного уменьшим для гармонии с паддингами */
    font-weight: normal;
    font-style: normal;
    color: var(--color-text-secondary);
    line-height: 1;
}

/* Эффект при наведении */
.wishlist-btn:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary-light);
}
.wishlist-btn:hover::before {
    color: var(--color-primary-light);
}

/* Активное состояние (товар в избранном) */
.wishlist-btn.active {
    background-color: var(--color-danger);
    border-color: var(--color-danger);
}

.wishlist-btn.active::before {
    content: '\ed42'; /* Иконка bxs-heart (закрашенная) */
    color: white;
}
/* Анимация при добавлении в избранное */
@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* --- Страница товара --- */
.product-details-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}
.product-gallery-main {
    width: 100%;
    height: 400px;
    background-color: var(--color-surface);
    border-radius: var(--border-radius-md);
}
.product-info-main h1 {
    font-size: 36px;
    margin-bottom: 16px;
}
.product-info-main .price {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 24px;
}
.product-info-main .description {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}
.action-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

/* ==========================================================================
   9. CART, CHECKOUT, BALANCE
   ========================================================================== */

/* --- Оверлей --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 12, 0.5);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}
.content-blurred {
    filter: blur(5px);
    transform: scale(0.99);
    pointer-events: none;
    transition: filter 0.3s ease, transform 0.3s ease;
}
.overlay.active {
    opacity: 1;
    visibility: visible;
}


/* --- Сайдбар корзины --- */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background-color: var(--color-surface);
    border-left: 1px solid var(--color-border);
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    z-index: 1010;
}
.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}
.cart-header h3 {
    font-size: 20px;
}
.close-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition-main);
}
.close-btn:hover {
    color: var(--color-text-primary);
}
.cart-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}
.cart-empty-msg {
    text-align: center;
    color: var(--color-text-secondary);
    margin-top: 40px;
}
.cart-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}
.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    background-color: var(--color-border);
}
.cart-item-details {
    flex-grow: 1;
}
.cart-item-title {
    font-weight: 500;
}
.cart-item-price {
    color: var(--color-text-secondary);
}
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.quantity-btn {
    width: 24px;
    height: 24px;
    background: var(--color-border);
    border: none;
    color: var(--color-text-primary);
    cursor: pointer;
    border-radius: 4px;
}
.remove-item-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 20px;
    cursor: pointer;
}
.remove-item-btn:hover {
    color: var(--color-danger);
}
.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--color-border);
}
.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 18px;
}
.total-price {
    font-weight: 700;
}


/* --- Страница/Модальное окно оформления заказа --- */
.checkout-layout-v3 {
    width: 100%;
    height: 100%;
    grid-template-columns: 500px 1fr;
}
.checkout-actions-column-v3 {
    padding: 40px;
    display: flex;
    flex-direction: column;
}
.checkout-actions-column-v3 .section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}
.checkout-actions-column-v3 .section-block {
    margin-bottom: 32px;
}
.checkout-actions-column-v3 h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}
.summary-wrapper-v3 {
    margin-top: auto;
}
.checkout-order-column-v3 {
    background-color: var(--color-background);
    padding: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.checkout-order-column-v3 h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}
.checkout-order-list {
    overflow-y: auto;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}
.checkout-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
}
.checkout-item-img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--border-radius-sm);
    background-color: var(--color-border);
}
.checkout-item-details {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.checkout-item-name {
    font-weight: 500;
}
.checkout-item-price {
    font-weight: 700;
}


.delivery-options .option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition-main);
}
.delivery-options .option:hover {
    border-color: var(--color-primary-light);
    background-color: rgb(127 86 217 / 5%);
}
.delivery-options .option.selected {
    border-color: var(--color-primary);
    background-color: rgb(127 86 217 / 10%);
    box-shadow: var(--shadow-glow);
}
.delivery-options .option i {
    font-size: 28px;
    color: var(--color-primary);
    margin-right: 20px;
    min-width: 30px;
}
.option-details h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.option-details p {
    font-size: 14px;
    color: var(--color-text-secondary);
}


.checkout-summary-card {
    position: sticky;
    top: 100px;
}
.checkout-summary-card .promo-section {
    margin-top: 24px;
    display: flex;
    gap: 8px;
}
.promo-section input {
    flex-grow: 1;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
    color: var(--color-text-primary);
    font-size: 16px;
    min-width: 0;
}
#promo-input:read-only {
    background-color: var(--color-background);
    opacity: 0.6;
    cursor: not-allowed;
}
.promo-section .btn.promo-applied {
    background-color: var(--color-danger);
    border-color: transparent;
    color: white;
}
.promo-section .btn.promo-applied:hover {
    background-color: #C53030;
}


.checkout-summary-card .balance-toggle-section {
    margin-top: 20px;
}
.balance-toggle-section.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.checkout-summary-card .order-summary-breakdown {
    margin: 24px 0;
    font-size: 16px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
}
.summary-row.discount .summary-value {
    color: var(--color-success);
}
.summary-row.total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
}
.summary-value {
    transition: color 0.3s ease;
}
.price-updated {
    animation: price-flash 0.5s ease;
}
@keyframes price-flash {
    0% {
        color: var(--color-primary-light);
    }
    100% {
        color: inherit;
    }
}
.checkout-summary-card .total-label {
    color: var(--color-text-secondary);
    font-size: 18px;
}
.checkout-summary-card .total-amount {
    font-size: 36px;
    font-weight: 800;
    margin: 8px 0 24px;
}


/* --- Страница пополнения баланса --- */
.balance-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: flex-start;
}
.amount-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 24px;
    padding-top: 12px;
}
.amount-btn {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-main);
}
.amount-btn:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary-light);
    background-color: var(--color-surface);
}
.amount-btn.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.custom-amount-wrapper {
    position: relative;
    padding: 0 24px 24px;
}
.custom-amount-input {
    width: 100%;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 16px 40px 16px 20px;
    color: var(--color-text-primary);
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-main);
    transition: var(--transition-main);
    appearance: textfield;
}
.custom-amount-input::-webkit-outer-spin-button,
.custom-amount-input::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
}
.custom-amount-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}
.currency-symbol {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-secondary);
    pointer-events: none;
}


/* ==========================================================================
   10. MODALS, POPOVERS, TOASTS
   ========================================================================== */

/* --- Общие стили модальных окон --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    z-index: 1020;
}
.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.modal-content {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal.active .modal-content {
    transform: scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--color-border);
}
.modal-header h2 {
    font-size: 20px;
}
.close-modal-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-main);
}
.close-modal-btn:hover {
    color: var(--color-text-primary);
    transform: rotate(90deg);
}
.modal-body {
    padding: 30px;
}

/* --- Модальное окно Checkout --- */
#checkout-modal .modal-content {
    max-width: 960px;
    min-height: 620px;
    padding: 0;
    overflow: hidden;
}
#checkout-modal .close-modal-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
}
.checkout-step, .checkout-result-state {
    display: none;
}
.checkout-step.active {
    display: grid;
}
.checkout-result-state.active {
    display: flex;
}

/* --- Модальное окно Confirmation --- */
#confirmation-modal .modal-content {
    max-width: 450px;
    text-align: center;
}
#confirmation-modal .modal-body {
    padding: 30px 40px;
}
#confirmation-modal .modal-icon {
    font-size: 56px;
    color: var(--color-danger);
    margin-bottom: 20px;
}
#confirmation-modal h3 {
    font-size: 22px;
    margin-bottom: 12px;
}
#confirmation-modal p {
    color: var(--color-text-secondary);
    margin-bottom: 30px;
}
#confirmation-modal .modal-actions {
    display: flex;
    gap: 12px;
}

/* --- Модальное окно Result --- */
#result-modal .issued-items-list {
    margin-top: -10px;
    margin-bottom: 30px;
    border-top: 1px solid var(--color-border);
}
#result-modal .issued-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}
#result-modal .issued-item h4 {
    font-size: 16px;
    margin-bottom: 12px;
}

/* --- Всплывающие уведомления (Toasts) --- */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
#toast-container.shifted {
    right: 430px;
}
.toast {
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgb(0 0 0 / 20%);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastInRight 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards, toastOutRight 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards 3s;
    transform: translateX(110%);
}
.toast-icon { font-size: 22px; }
.toast.success .toast-icon { color: var(--color-success); }
.toast.info .toast-icon { color: var(--color-primary); }
@keyframes toastInRight { to { transform: translateX(0); } }
@keyframes toastOutRight { from { transform: translateX(0); } to { transform: translateX(110%); } }

/* --- Popover корзины --- */
.cart-popover {
    position: absolute;
    z-index: 1010;
    width: 320px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    box-shadow: 0 15px 30px rgb(0 0 0 / 20%);
    top: 75px;
    right: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: var(--transition-main);
}
.cart-popover.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.cart-popover-body {
    max-height: 250px;
    overflow-y: auto;
    padding: 16px;
}
.cart-popover-item {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 14px;
    margin-bottom: 12px;
}
.cart-popover-item-img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--border-radius-sm);
    background-color: var(--color-border);
}
.cart-popover-item-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-popover-item-price {
    margin-left: auto;
    font-weight: 700;
    white-space: nowrap;
}
.cart-popover-footer {
    padding: 16px;
    border-top: 1px solid var(--color-border);
}
.cart-popover-summary {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    margin-bottom: 16px;
}
.cart-popover-summary .total-price {
    font-weight: 800;
}

/* --- Командная палитра --- */
#command-palette .command-palette-content {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 40%);
    transform: translateY(-20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#command-palette.active .command-palette-content {
    transform: translateY(0);
}
.command-palette-search {
    position: relative;
    border-bottom: 1px solid var(--color-border);
}
#command-palette-input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 20px 16px 50px;
    font-size: 16px;
    color: var(--color-text-primary);
    outline: none;
}
.command-palette-search .bx {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    font-size: 20px;
}
.command-palette-results {
    list-style: none;
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
}
.command-palette-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.command-palette-item:hover, .command-palette-item.selected {
    background-color: var(--color-border);
}
.command-palette-item .item-text {
    flex-grow: 1;
}
.command-palette-item .item-shortcut {
    font-size: 12px;
    color: var(--color-text-secondary);
}

#balance-modal .modal-content {
    max-width: 420px;
}
#balance-modal .payment-options .option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition-main);
}
#balance-modal .payment-options .option:hover {
    border-color: var(--color-primary-light);
    background-color: rgb(127 86 217 / 5%);
}
#balance-modal .payment-options .option.selected {
    border-color: var(--color-primary);
    background-color: rgb(127 86 217 / 10%);
    box-shadow: var(--shadow-glow);
}
#balance-modal .payment-options .option .icon {
    font-size: 28px;
    color: var(--color-primary);
    margin-right: 20px;
    min-width: 30px;
}
#balance-modal .payment-summary {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    text-align: center;
}
#balance-modal .total-label {
    color: var(--color-text-secondary);
    font-size: 16px;
}
#balance-modal .total-amount {
    font-size: 32px;
    font-weight: 800;
    margin: 4px 0 20px;
}

/* ==========================================================================
   11. АНИМАЦИИ И ЭФФЕКТЫ
   ========================================================================== */

/* --- Анимация появления при скролле --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.7s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- Анимация фона "Аврора" --- */
.aurora-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}
.aurora-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    will-change: transform;
    transform: translateY(var(--parallax-y, 0px)); 
    transition: transform 0.1s linear;
}
.aurora-shape-1 {
    width: 700px;
    height: 700px;
    top: -15%;
    left: -10%;
    background-color: var(--color-primary);
    animation: aurora-move-1 25s infinite alternate ease-in-out;
}
.aurora-shape-2 {
    width: 600px;
    height: 600px;
    bottom: -20%;
    right: -15%;
    background-color: #5AD5B5;
    animation: aurora-move-2 30s infinite alternate ease-in-out;
}
@keyframes aurora-move-1 { to { transform: translateX(100px); } }
@keyframes aurora-move-2 { to { transform: translateX(-80px); } }
/* --- Микровзаимодействия для кнопок и ссылок --- */
.btn, .wishlist-btn, .filter-btn, .theme-btn, .quantity-btn, .nav-link, .bento-card-principle, .catalog-item {
    transition: transform 0.2s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.btn:hover, .wishlist-btn:hover, .filter-btn:not(.active):hover, .theme-btn:not(.active):hover, .nav-link:not(.active):hover, .bento-card-principle:hover, .catalog-item:hover {
    transform: translateY(-3px);
}
.btn:active, .wishlist-btn:active, .filter-btn:active, .theme-btn:active, .quantity-btn:active, .nav-link:active {
    transform: scale(0.97) translateY(1px);
    transition-duration: 0.05s;
}

/* ==========================================================================
    12. ПРОЧИЕ СТРАНИЦЫ И КОМПОНЕНТЫ
    ========================================================================== */
/* --- 404 Not Found Page --- */
.not-found-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 80vh;
    padding-top: 5vh;
}
.not-found-content {
    max-width: 600px;
    margin-bottom: 40px;
}
.not-found-content h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: 16px;
}
.not-found-content p {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
}
.not-found-content p strong {
    color: var(--color-primary);
    font-weight: bold;
}

/* --- Игра 2048 --- */
.game-2048-container {
    --grid-size: 4;
    --cell-size: 100px;
    --cell-gap: 8px;
    width: calc(var(--grid-size) * var(--cell-size) + (var(--grid-size) + 1) * var(--cell-gap));
}
.game-2048-container .game-ui-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 8px;
}
.game-score-box {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-sm);
    padding: 8px 16px;
    font-weight: 700;
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: center;
    line-height: 1.2;
}
.game-score-box span {
    font-size: 20px;
    color: var(--color-text-primary);
}
#game-board {
    width: 100%;
    height: calc(var(--grid-size) * var(--cell-size) + (var(--grid-size) + 1) * var(--cell-gap));
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: var(--cell-gap);
    display: grid;
    grid-template-columns: repeat(var(--grid-size), var(--cell-size));
    grid-template-rows: repeat(var(--grid-size), var(--cell-size));
    gap: var(--cell-gap);
    position: relative;
    touch-action: none;
}
.grid-cell {
    background-color: var(--color-background);
    border-radius: var(--border-radius-sm);
}
.tile {
    --x: 0;
    --y: 0;
    position: absolute;
    top: calc(var(--y) * (var(--cell-size) + var(--cell-gap)) + var(--cell-gap));
    left: calc(var(--x) * (var(--cell-size) + var(--cell-gap)) + var(--cell-gap));
    width: var(--cell-size);
    height: var(--cell-size);
    border-radius: var(--border-radius-sm);
    font-size: 40px;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: top 0.15s ease-out, left 0.15s ease-out;
    animation: tile-spawn 0.2s ease;
}
.tile[data-value="2"] { background-color: #4A5568; color: #fff; }
.tile[data-value="4"] { background-color: #2D3748; color: #fff; }
.tile[data-value="8"] { background-color: #805AD5; color: #fff; }
.tile[data-value="16"] { background-color: #B794F4; color: #fff; }
.tile[data-value="32"] { background-color: #D65F7F; color: #fff; }
.tile[data-value="64"] { background-color: #E53E3E; color: #fff; }
.tile[data-value="128"] { background-color: #DD6B20; color: #fff; font-size: 36px; }
.tile[data-value="256"] { background-color: #D69E2E; color: #fff; font-size: 36px; }
.tile[data-value="512"] { background-color: #38A169; color: #fff; font-size: 36px; }
.tile[data-value="1024"] { background-color: #3182CE; color: #fff; font-size: 32px; }
.tile[data-value="2048"] { background-color: #FFD700; color: #111; font-size: 32px; animation: tile-spawn 0.2s ease, tile-pulse 1s infinite alternate; }

@keyframes tile-spawn { from { transform: scale(0); } to { transform: scale(1); } }
.tile.merged { animation: tile-merge 0.2s ease; }
@keyframes tile-merge { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes tile-pulse { from { box-shadow: 0 0 0 #FFD700; } to { box-shadow: 0 0 20px 5px #FFD700; } }

.game-over-overlay {
    position: absolute;
    inset: 0;
    background-color: rgb(20 20 24 / 70%);
    backdrop-filter: blur(4px);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}
.game-over-overlay.active { opacity: 1; pointer-events: auto; }
.game-over-overlay h2 { font-size: 40px; margin-bottom: 8px; }
.game-over-overlay p { font-size: 18px; }
.game-over-overlay.win h2 { color: #FFD700; }


/* ==========================================================================
   13. АДАПТИВНОСТЬ (MEDIA QUERIES)
   ========================================================================== */

@media (width <= 992px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-item.row-span-2 { grid-row: span 1; }
    
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-nav { position: static; margin-bottom: 30px; }

    .checkout-layout-improved, .balance-layout { grid-template-columns: 1fr; }
    .checkout-main-column { grid-row: 2; }

    #checkout-modal .modal-content { max-width: 450px; min-height: 0; }
    .checkout-layout-v3 { grid-template-columns: 1fr; }
    .checkout-order-column-v3 { display: none; }
    .checkout-actions-column-v3 { padding: 24px; }

    .about-bento-layout { grid-template-columns: 1fr; gap: 80px; }
    .about-content { text-align: center; }
    .about-content p { margin-left: auto; margin-right: auto; }

    .product-preview-grid { grid-template-columns: repeat(2, 1fr); }

    .faq-split-layout { grid-template-columns: 1fr; gap: 40px; }
    .faq-intro-text { text-align: center; }
    .faq-intro-text p { margin-left: auto; margin-right: auto; }
    
    .brand-cta-layout { grid-template-columns: 1fr; text-align: center; gap: 40px; padding: 40px; }
    .cta-content p { margin-left: auto; margin-right: auto; }
}


@media (width <= 768px) {
    .product-details-layout { grid-template-columns: 1fr; }
    .featured-products-grid { grid-template-columns: 1fr; }
    
    .footer-top { grid-template-columns: 1fr; text-align: center; }
    .footer-column { display: flex; flex-direction: column; align-items: center; }
    .footer-column h4 { justify-content: center; padding-left: 0; }
    .footer-column h4::before, .footer-links a::before { display: none; }
    .footer-links a:hover { transform: none; }
    .logo-column .logo { justify-content: center; }
    .social-links, .footer-bottom { justify-content: center; }
}


@media (width <= 576px) {
    .hero h1 { font-size: 48px; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-item.col-span-2 { grid-column: span 1; }

    .stats-grid { grid-template-columns: 1fr; }
    .settings-item { flex-direction: column; align-items: flex-start; gap: 16px; }
    .cart-sidebar { width: 100%; right: -100%; }

    .about-bento-grid { grid-template-columns: 1fr; }
    .about-content h2 { font-size: 32px; }

    .product-preview-grid { grid-template-columns: 1fr; }
    .section-header-split { justify-content: center; text-align: center; }
    
    .item-action span:first-child { display: none; }
    .item-info { gap: 12px; }
    .cta-content h2, .spotlight-content h2 { font-size: 32px; }
}
#panel-shop .products-grid {
    display: grid;
}

#panel-shop #no-results {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    min-height: 300px;
}
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    color: white;
    font-size: 28px;
    text-decoration: none;
    transition: var(--transition-main);
    z-index: 999;
}
.fab:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-glow);
}
.social-links a i.bxl-telegram {
    fill: none;
    width: 24px;
    height: 24px;
}
.session-icon {
    font-size: 28px;
    color: var(--color-text-secondary);
    flex-shrink: 0;
    line-height: 1;
}
.session-details {
    flex-grow: 1;
    margin-left: 16px;
    margin-right: 16px;
    min-width: 0;
}
.session-device {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3; 
    margin-bottom: 2px;
}
.session-meta {
    font-size: 14px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bento-card-principle {
    background-color: rgb(20 20 24 / 60%);
    backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 32px;
    transition: var(--transition-main);
}
.about-bento-grid {
    display: grid; /* Включаем режим сетки для контейнера */
    grid-template-columns: repeat(2, 1fr); /* Создаем 2 колонки равной ширины */
    gap: 20px; /* Добавляем отступ в 20px между карточками */
}
.about-section {
    padding: 10vh 0 15vh;
}

.about-bento-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h2 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.about-content p {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
    max-width: 45ch;
}

.about-content .btn {
    margin-top: 20px;
}

/* --- Карточки-принципы --- */
.bento-card-principle {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 24px;
}

.bento-card-principle i {
    font-size: 28px;
    color: var(--color-primary);
    margin-bottom: 16px;
    display: block;
    text-align: left;
}

.bento-card-principle h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: left;
}

.bento-card-principle p {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    text-align: left;
}


/* --- СЕКЦИЯ: КАТАЛОГ-ВИТРИНА --- */
.catalog-showcase-section {
    padding-bottom: 10vh;
}

.catalog-list {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.catalog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    text-decoration: none;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s ease;
}

.catalog-item:last-child {
    border-bottom: none;
}

.catalog-item:hover {
    background-color: var(--color-surface);
}

.item-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.item-visual {
    width: 48px; height: 48px; min-width: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; background-color: var(--color-primary);
}
.item-visual.steam { background-color: #3b82f6; }
.item-visual.discord { background-color: #5865F2; }

.item-info h4 { font-size: 18px; font-weight: 700; }
.item-info p { font-size: 14px; color: var(--color-text-secondary); }

.item-action {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.item-action .arrow-link-minimal {
    font-size: 24px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.catalog-item:hover .item-action .arrow-link-minimal {
    transform: translateX(5px);
    color: var(--color-text-primary);
}

.catalog-footer {
    padding-top: 40px;
    text-align: center;
}


/* --- СЕКЦИЯ: FAQ (двухколоночная) --- */
.faq-split-section {
    padding-bottom: 15vh;
}

.faq-split-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: flex-start;
}

.faq-intro-text h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 24px;
}

.faq-intro-text p {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    max-width: 40ch;
    margin-bottom: 20px;
}

.faq-accordion { border-top: 1px solid var(--color-border); }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 24px 0; background: none; border: none; color: var(--color-text-primary); font-size: 18px; font-weight: 700; text-align: left; cursor: pointer; }
.faq-question:hover span { color: var(--color-primary-light); }
.faq-icon { font-size: 24px; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), padding 0.4s ease; }
.faq-answer p { font-size: 16px; color: var(--color-text-secondary); line-height: 1.7; padding-bottom: 24px; max-width: 60ch; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-item.active .faq-answer { max-height: 200px; }


/* --- ФИНАЛЬНЫЙ CTA "ПРОЖЕКТОР" --- */
.final-spotlight-section {
    padding: 15vh 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.final-spotlight-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%; 
    padding-top: 50%;
    max-width: 2000px;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse at center,
        rgb(128 90 213 / 15%) 0%,
        rgb(128 90 213 / 0%) 40% 
    );
    z-index: 0;
    animation: spotlight-pulse 8s infinite ease-in-out;
}