/* ==========================================================================
   1. ПЕРЕМЕННЫЕ И ЦВЕТОВЫЕ СХЕМЫ (ТЕМНАЯ ТЕМА)
   ========================================================================== */
   :root {
    --bg-base: #05050A;
    --bg-panel: rgba(18, 18, 28, 0.6);

    --accent-primary: #00F0FF;
    --accent-secondary: #7000FF;
    --accent-success: #00FF88;
    --accent-danger: #FF0055;

    --text-main: #FFFFFF;
    --text-muted: #8A8A9D;

    --border-light: rgba(255, 255, 255, 0.08);

    --font-ui: 'Montserrat', sans-serif;
    --font-display: 'Orbitron', sans-serif;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   2. БАЗОВЫЕ НАСТРОЙКИ (RESET)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   3. УТИЛИТЫ (ГРАДИЕНТЫ, СТЕКЛО, СКРОЛЛ)
   ========================================================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), #B200FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Оптимизированный Glassmorphism (GPU Acceleration) */
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateZ(0);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

/* ==========================================================================
   4. АНИМИРОВАННЫЙ ФОН (ОПТИМИЗИРОВАН ДЛЯ 60 FPS)
   ========================================================================== */
.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    animation: floatOrb 20s infinite alternate linear;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(112,0,255,0.15) 0%, transparent 70%);
    top: -20%;
    left: -10%;
}
.orb-2 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(0,240,255,0.1) 0%, transparent 70%);
    bottom: -30%;
    right: -20%;
    animation-delay: -5s;
}
.orb-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,0,85,0.1) 0%, transparent 70%);
    top: 30%;
    left: 30%;
    animation-duration: 25s;
}

@keyframes floatOrb {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(50px, 50px, 0) scale(1.1); }
}

/* ==========================================================================
   5. ВЕРХНЯЯ НАВИГАЦИЯ (HEADER)
   ========================================================================== */
.navbar {
    position: sticky;
    top: 15px;
    z-index: 100;
    margin: 15px 24px;
    padding: 0 24px;
    height: 70px;
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
}

.logo i {
    color: var(--accent-primary);
    font-size: 28px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.reviews-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.reviews-link:hover {
    color: var(--accent-primary);
}

.cart-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    padding: 8px 20px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition-fast);
}

.cart-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.cart-icon-wrapper {
    position: relative;
    font-size: 22px;
    display: flex;
}

#cart-counter {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent-danger);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ==========================================================================
   6. ГЛАВНЫЙ ЭКРАН (HERO) И БАННЕРЫ
   ========================================================================== */
.first-buy-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 30px;
    background: linear-gradient(90deg, rgba(0,240,255,0.1), rgba(112,0,255,0.1));
    border-color: var(--accent-primary);
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0,240,255,0.2);
}

.banner-icon {
    font-size: 40px;
    color: var(--accent-primary);
}

.banner-text h3 {
    font-family: var(--font-display);
    margin-bottom: 5px;
}

.hero {
    margin: 30px 0 50px;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: var(--accent-success);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--accent-success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-success);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.6;
    font-weight: 400;
}

.hero-visual {
    position: relative;
    z-index: 1;
    padding-right: 40px;
}

.floating-gem {
    font-size: 180px;
    color: var(--accent-primary);
    animation: float 6s ease-in-out infinite;
    will-change: transform;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ==========================================================================
   7. НАВИГАЦИЯ ПО ИГРАМ И КАТЕГОРИЯМ
   ========================================================================== */
.tabs-container {
    display: flex;
    padding: 8px;
    margin-bottom: 30px;
    position: relative;
    border-radius: 20px;
}

.tabs-slider {
    position: absolute;
    top: 8px;
    left: 8px;
    bottom: 8px;
    width: calc(33.333% - 5.33px);
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    transition: transform 0.4s ease;
    z-index: 1;
}

.game-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: var(--transition-fast);
}

.game-tab img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    filter: grayscale(100%);
    transition: 0.3s;
}

.game-tab.active { color: var(--text-main); }
.game-tab.active img { filter: grayscale(0%); }

.sub-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.sub-tab {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-tab:hover {
    background: rgba(255,255,255,0.1);
}

.sub-tab.active {
    background: rgba(0,240,255,0.1);
    border-color: var(--accent-primary);
    color: var(--text-main);
}

/* ==========================================================================
   8. СЕТКА ТОВАРОВ И КАРТОЧКИ
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding-bottom: 100px;
}

.product-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: relative;
    transition: 0.3s;
    cursor: pointer;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.4);
}

.product-category {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-light);
    font-size: 10px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
}

.product-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    margin: 10px 0;
    transition: 0.3s;
}

.product-image img {
    max-height: 120px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    transition: 0.3s;
    will-change: transform;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-details {
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-end;
}

.product-name {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
    font-family: var(--font-display);
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-tag {
    font-size: 24px;
    font-weight: 900;
}

.currency {
    color: var(--accent-primary);
    font-size: 20px;
}

.btn-add {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.btn-add:hover {
    background: var(--text-main);
    color: var(--bg-base);
}

/* ==========================================================================
   9. КОРЗИНА И ОФОРМЛЕНИЕ ЗАКАЗА
   ========================================================================== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    transition: 0.3s;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: rgba(10, 10, 15, 0.98);
    border-left: 1px solid var(--border-light);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease;
}

.cart-drawer.active { right: 0; }

.cart-header {
    display: flex;
    justify-content: space-between;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-light);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

.cart-item img {
    width: 50px;
    height: 50px;
}

.item-info { flex: 1; }

.item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 8px;
}

.item-controls button {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
}

.qty-num {
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.cart-footer {
    padding: 30px;
    border-top: 1px solid var(--border-light);
}

.instruction-box {
    background: rgba(0,240,255,0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 13px;
}

.highlight-nick {
    color: var(--accent-primary);
    font-weight: bold;
    cursor: pointer;
}

/* ==========================================================================
   10. ЭЛЕМЕНТЫ ФОРМ И КНОПКИ
   ========================================================================== */
.input-group {
    position: relative;
    margin-bottom: 10px;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 16px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 15px;
    font-family: var(--font-ui);
}

.input-group .form-input {
    padding-left: 48px;
}

.form-input:focus {
    border-color: var(--accent-primary);
}

/* ПРОМОКОДЫ */
.promo-box {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.promo-box input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-main);
    text-transform: uppercase;
    font-family: var(--font-ui);
}

.promo-btn {
    padding: 0 15px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 10px;
    color: var(--text-main);
    cursor: pointer;
    font-weight: 600;
}

.promo-btn:hover {
    background: var(--accent-primary);
    color: #000;
}

.promo-message {
    font-size: 12px;
    margin-bottom: 15px;
    padding-left: 5px;
}
.promo-message.success { color: var(--accent-success); }
.promo-message.error { color: var(--accent-danger); }

/* МЕТОДЫ ОПЛАТЫ */
.method-title {
    font-size: 13px;
    color: var(--text-muted);
    margin: 20px 0 10px;
    font-weight: 700;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.pay-method {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.pay-method.active {
    background: rgba(0,240,255,0.1);
    border-color: var(--accent-primary);
    color: var(--text-main);
}

.total-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 20px;
}

.total-price {
    font-size: 32px;
    color: var(--accent-primary);
}

.btn-primary {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(90deg, #00F0FF, #0080FF);
    color: #000;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    text-transform: uppercase;
    font-family: var(--font-ui);
    font-size: 16px;
}

/* ==========================================================================
   11. МОДАЛЬНОЕ ОКНО СБП (ПЕРЕВОД)
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 2000;
    transition: 0.3s;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    width: 90%;
    max-width: 450px;
    padding: 30px;
    transform: scale(0.95);
    transition: 0.3s;
    text-align: center;
}

.modal-backdrop.active .modal-box {
    transform: scale(1);
}

.pulse-icon {
    width: 60px;
    height: 60px;
    background: rgba(0,240,255,0.1);
    color: var(--accent-primary);
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 1px solid var(--accent-primary);
}

.modal-title {
    font-family: var(--font-display);
    margin-bottom: 5px;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.copy-block {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: left;
}

.copy-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.copy-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 800;
    font-family: var(--font-display);
    cursor: pointer;
    color: var(--accent-primary);
    transition: 0.2s;
}

.copy-value:hover { color: white; }
.text-success { color: var(--accent-success); }
.copy-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

.warning-box {
    background: rgba(255,0,85,0.1);
    border: 1px solid var(--accent-danger);
    padding: 15px;
    border-radius: 12px;
    font-size: 13px;
    color: #ffb3c6;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.btn-success { background: linear-gradient(90deg, #00FF88, #00B25E); }

.btn-close-modal {
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 10px;
    font-family: var(--font-ui);
    font-size: 15px;
}

/* ==========================================================================
   12. УВЕДОМЛЕНИЯ (TOAST)
   ========================================================================== */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(18, 18, 28, 0.95);
    border-left: 4px solid var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show { transform: translateX(0); }

/* ==========================================================================
   13. АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ТЕЛЕФОНОВ
   ========================================================================== */
@media (max-width: 768px) {
    .navbar {
        margin: 10px;
        padding: 0 16px;
        border-radius: 20px;
    }
    .cart-text { display: none; }

    .hero {
        flex-direction: column-reverse;
        padding: 30px 20px;
        text-align: center;
    }

    .hero-title { font-size: 38px; }
    .floating-gem { font-size: 120px; }

    .tabs-slider {
        width: calc(100% - 16px);
        height: calc(33.333% - 5.33px);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 10px 100px;
    }

    .product-image { height: 120px; }
    .product-image img { max-height: 90px; }
    .price-tag { font-size: 18px; }
    .product-name { font-size: 14px; }

    .cart-drawer {
        max-width: 100%;
        border-radius: 0;
    }

    #toast-container {
        bottom: 20px;
        right: 20px;
        left: 20px;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }
}