/* ==========================================================================
KRYONIXMC "ЭФИРНАЯ ДУША" (ETHEREAL SOUL) - ВОЗДУШНЫЙ, ЧИТАЕМЫЙ, ЕДИНЫЙ
========================================================================== */

/* --------------------------------------------------------------------------
1. ЕДИНЫЙ ЭФИРНЫЙ ФОН (Дышащий градиент для всей страницы)
-------------------------------------------------------------------------- */
body {
    background: linear-gradient(-45deg, #f8fafc, #eef2ff, #f1f5f9, #e0e7ff, #f8fafc) !important;
    background-size: 400% 400% !important;
    animation: etherealBreath 25s ease infinite !important;
    min-height: 100vh !important;
    color: #1e293b !important; /* Глубокий серо-синий для идеальной читаемости */
}

@keyframes etherealBreath {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Мягкие эфирные частицы (светящаяся пыльца) */
body::after {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1.5px 1.5px at 150px 80px, rgba(165, 180, 252, 0.6), transparent),
        radial-gradient(1px 1px at 250px 40px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 400px 120px, rgba(196, 181, 253, 0.5), transparent),
        radial-gradient(1px 1px at 550px 60px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1.5px 1.5px at 700px 150px, rgba(165, 180, 252, 0.7), transparent) !important;
    background-repeat: repeat !important;
    background-size: 800px 400px !important;
    animation: floatParticles 8s ease-in-out infinite !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

@keyframes floatParticles {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(-8px); }
}

/* Убираем любые конфликтующие фоны секций, чтобы приветствие и контент были единым целым */
main, .bg-elegant, .bg-pattern, .bg-light, .bg-white, section, .container, #welcome-section {
    background: transparent !important;
    background-image: none !important;
}

/* --------------------------------------------------------------------------
2. НАЗВАНИЕ И ОПИСАНИЕ (Высокая читаемость)
-------------------------------------------------------------------------- */
.shop-name, .navbar-brand {
    font-family: 'Montserrat', 'Inter', 'Segoe UI', sans-serif !important;
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important; /* Эфирный индиго-фиолетовый */
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: drop-shadow(0 2px 4px rgba(124, 58, 237, 0.15)) !important;
    letter-spacing: 1px !important;
    font-weight: 800 !important;
}

.shop-description, .text-white {
    color: #475569 !important; /* Slate 600 - мягкий, но очень читаемый темный оттенок */
    text-shadow: none !important;
    font-weight: 500 !important;
}

/* --------------------------------------------------------------------------
3. НАВИГАЦИЯ (Стекломорфизм)
-------------------------------------------------------------------------- */
.navbar, .navbar-theme-dark {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.05) !important;
}

.nav-link, .navbar-nav .nav-link {
    color: #475569 !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.nav-link:hover, .navbar-nav .nav-link:hover {
    color: #4f46e5 !important;
    text-shadow: none !important;
}

/* --------------------------------------------------------------------------
4. КНОПКИ (Эфирное свечение)
-------------------------------------------------------------------------- */
.btn, .button-username, .shop-button, .chose-server-button, .btn-purple, .btn-primary {
    position: relative !important;
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

/* Убираем старые сложные псевдо-элементы */
.btn::before, .btn::after, 
.button-username::before, .button-username::after,
.shop-button::before, .shop-button::after,
.chose-server-button::before, .chose-server-button::after,
.btn-purple::before, .btn-purple::after,
.btn-primary::before, .btn-primary::after {
    display: none !important;
}

.btn:hover, .button-username:hover, .shop-button:hover, .chose-server-button:hover, .btn-purple:hover, .btn-primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 25px rgba(139, 92, 246, 0.35) !important;
    background: linear-gradient(135deg, #818cf8, #a78bfa) !important;
}

/* --------------------------------------------------------------------------
5. МАГАЗИН И ТОВАРЫ (ЧИСТЫЙ СТЕКЛОМОРФИЗМ)
-------------------------------------------------------------------------- */
.shop-selection, .form-group.position-relative, .shop-selection .form-group {
    overflow: visible !important;
    position: relative !important;
}

.shop {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.95) !important;
    width: 90vw !important;
    max-width: 500px !important;
    max-height: 80vh !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 24px 16px !important;
    border-radius: 20px !important;
    
    /* Эфирное стекло */
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.15) !important;
    
    overflow-y: auto !important;
    overflow-x: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.shop:not(.d-none) {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

.shop::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.3) !important; /* Мягкое затемнение */
    backdrop-filter: blur(4px) !important;
    z-index: -1 !important;
    pointer-events: auto !important;
}

.shop::after {
    content: '✕' !important;
    position: absolute !important;
    top: 16px !important;
    right: 20px !important;
    font-size: 1.3rem !important;
    font-weight: bold !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    z-index: 10 !important;
    transition: all 0.2s ease !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

.shop::after:hover {
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.1) !important;
    transform: rotate(90deg) !important;
}

.shop .card-body {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 16px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* Сортировка */
.shop a.shop-item[data-request-data*="product_id: 1096523 "] { order: 1 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096524 "] { order: 2 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096525 "] { order: 3 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096526 "] { order: 4 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096527 "] { order: 5 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096528 "] { order: 6 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096529 "] { order: 7 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096530 "] { order: 8 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096531 "] { order: 9 !important; }

.shop .card-body > h6:first-child {
    order: -1 !important;
    margin-bottom: 12px !important;
    padding: 0 8px !important;
    text-align: center !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    letter-spacing: 0.5px !important;
}

/* Эфирные разделители */
.shop a.shop-item[data-request-data*="product_id: 1096523 "]::after,
.shop a.shop-item[data-request-data*="product_id: 1096524 "]::after,
.shop a.shop-item[data-request-data*="product_id: 1096525 "]::after,
.shop a.shop-item[data-request-data*="product_id: 1096526 "]::after,
.shop a.shop-item[data-request-data*="product_id: 1096527 "]::after,
.shop a.shop-item[data-request-data*="product_id: 1096528 "]::after,
.shop a.shop-item[data-request-data*="product_id: 1096529 "]::after,
.shop a.shop-item[data-request-data*="product_id: 1096530 "]::after {
    content: '' !important;
    display: block !important;
    width: 60% !important;
    height: 1px !important;
    margin: 10px auto 8px !important;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent) !important;
    box-shadow: none !important;
}

.shop a.shop-item[data-request-data*="product_id: 1096523 "]::after { order: 1.5 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096524 "]::after { order: 2.5 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096525 "]::after { order: 3.5 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096526 "]::after { order: 4.5 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096527 "]::after { order: 5.5 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096528 "]::after { order: 6.5 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096529 "]::after { order: 7.5 !important; }
.shop a.shop-item[data-request-data*="product_id: 1096530 "]::after { order: 8.5 !important; }

/* ---------- КАРТОЧКИ ТОВАРОВ (Воздушные) ---------- */
.shop a.shop-item {
    position: relative !important;
    display: block !important;
    flex: 0 0 auto !important;
    border-radius: 16px !important;
    transition: transform 0.3s ease !important;
}

.shop .shop-item .card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03) !important;
}

.shop .shop-item:hover .card {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #e0e7ff !important;
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.1), 0 10px 10px -5px rgba(79, 70, 229, 0.04) !important;
    transform: translateY(-4px) !important;
}

.shop .shop-item:hover .text-purple {
    filter: none !important;
    color: #4f46e5 !important;
    transform: scale(1.03) !important;
}

.shop .shop-item:hover img {
    transform: scale(1.08) !important;
    filter: drop-shadow(0 8px 12px rgba(79, 70, 229, 0.15)) !important;
}

/* Эфирный скроллбар */
.shop::-webkit-scrollbar { width: 6px !important; }
.shop::-webkit-scrollbar-track { background: transparent !important; }
.shop::-webkit-scrollbar-thumb { background: #cbd5e1 !important; border-radius: 10px !important; }
.shop::-webkit-scrollbar-thumb:hover { background: #94a3b8 !important; }
.shop { scrollbar-width: thin !important; scrollbar-color: #cbd5e1 transparent !important; }

/* --------------------------------------------------------------------------
6. МОДАЛЬНОЕ ОКНО ОПЛАТЫ
-------------------------------------------------------------------------- */
#payment-type .modal-body,
.modal-body[style*="background"] {
    background: transparent !important;
    padding: 30px !important;
}

#payment-type .text-black,
#payment-type .modal-body h1,
#payment-type .modal-body h4,
#payment-type .modal-body h5,
#payment-type .modal-body p,
#payment-type .modal-body span,
#payment-type .modal-body div {
    color: #334155 !important;
}

#payment-type .modal-body h1,
#payment-type .modal-body h4 {
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

#payment-type .modal-content,
.modal-content {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.15) !important;
    color: #334155 !important;
}

#payment-type .card,
.modal-body .card {
    background: rgba(248, 250, 252, 0.8) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

#payment-type .card:hover,
.modal-body .card:hover {
    transform: translateY(-3px) !important;
    background: #ffffff !important;
    border-color: #c7d2fe !important;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.08) !important;
}

#payment-type .card:hover h5,
#payment-type .card:hover p,
.modal-body .card:hover h5,
.modal-body .card:hover p {
    color: #1e293b !important;
}

#payment-type .card:hover img,
.modal-body .card:hover img {
    filter: drop-shadow(0 4px 8px rgba(79, 70, 229, 0.15)) !important;
    transform: scale(1.05) !important;
}

/* --------------------------------------------------------------------------
7. ФОРМЫ И ПОЛЯ ВВОДА
-------------------------------------------------------------------------- */
input.form-control, input[name="username"], input[name="email"], input.input-username {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    color: #1e293b !important;
    transition: all 0.3s ease !important;
    font-size: 0.95rem !important;
}

input.form-control:focus, input[name="username"]:focus, input[name="email"]:focus, input.input-username:focus {
    background: #ffffff !important;
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15) !important;
    outline: none !important;
    color: #1e293b !important;
}

input::placeholder {
    color: #94a3b8 !important;
}

/* --------------------------------------------------------------------------
8. ТИПОГРАФИКА И АКЦЕНТЫ
-------------------------------------------------------------------------- */
.text-purple, .shop-name, .cart-cost {
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: none !important;
}

/* --------------------------------------------------------------------------
9. АДАПТИВНОСТЬ
-------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .shop-name { font-size: 2.4em !important; }
    .shop-description { font-size: 1.1em !important; }
    section:not(#welcome-section) { margin: 15px !important; padding: 25px !important; }
}

@media (max-width: 768px) {
    section:not(#welcome-section) { margin: 10px !important; padding: 20px !important; border-radius: 16px !important; }
    .shop-name { font-size: 2em !important; }
    .shop-description { font-size: 1em !important; }
    .btn, .button-username, .shop-button, .chose-server-button, .btn-purple {
        padding: 10px 20px !important;
        font-size: 0.9em !important;
    }
    
    .shop {
        max-height: 75vh !important;
        border-radius: 16px !important;
        padding: 16px 12px !important;
    }
    .shop .card-body { padding: 12px 8px !important; gap: 6px !important; }
    .shop::-webkit-scrollbar { width: 4px !important; }
}

@media (max-width: 575px) {
    .shop-name { font-size: 1.6em !important; }
    .shop-description { font-size: 0.9em !important; }
    section:not(#welcome-section) { padding: 15px !important; border-radius: 12px !important; }
    #payment-type .modal-body { padding: 20px !important; }
    #payment-type .card { margin-bottom: 8px !important; }
    #payment-type .card-body { padding: 12px !important; }
    #payment-type img { width: 35px !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}