@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --color-bg-darkest: #0a0b0e;
  --color-bg-dark: #10121a;
  --color-bg-card: rgba(16, 17, 24, 0.75);
  --color-border-card: rgba(255, 255, 255, 0.08);
  --color-border-card-hover: rgba(245, 184, 0, 0.4);
  --color-accent-gold: #f5b800;
  --color-accent-gold-hover: #ffc700;
  --color-accent-amber: #e5a800;
  --color-accent-red: #ff2b2b;
  --color-text-primary: #f3f4f6;
  --color-text-secondary: #9ca3af;
  --font-family: 'Montserrat', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Глобальные стили */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg-darkest);
  color: var(--color-text-primary);
  min-height: 100vh;
  background-image:
    /* Majestic RP Las Vegas Ambient Glow (Золотисто-желтый + глубокий металлик) */
    radial-gradient(ellipse 70% 50% at 15% 20%, rgba(245, 184, 0, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 80%, rgba(229, 168, 0, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 43, 43, 0.04) 0%, transparent 65%),
    /* Тонкая геометрическая SVG-сетка */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M 60 0 L 0 0 0 60' fill='none' stroke='rgba(255,255,255,0.025)' stroke-width='0.5'/%3E%3C/svg%3E"),
    /* Подложка */
    linear-gradient(160deg, #0b0c10 0%, #0d0e14 50%, #08090d 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Скроллбар */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-darkest);
}
::-webkit-scrollbar-thumb {
  background: rgba(245, 184, 0, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-gold);
}

/* СТИЛИ БОКОВОГО МЕНЮ (Left Sidebar Nav) */
.sidebar-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 14px;
  color: #9ca3af;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}
.sidebar-nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}
.sidebar-nav-btn.active {
  color: #0b0c10 !important;
  font-weight: 900;
  background: linear-gradient(135deg, #f5b800 0%, #d49b00 100%);
  border-color: rgba(245, 184, 0, 0.6);
  box-shadow: 0 4px 20px rgba(245, 184, 0, 0.35);
}

/* Стекляморфизм / Glassmorphism */
.glass-panel {
  background: var(--color-bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border-card);
  border-radius: 18px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(245, 184, 0, 0.2);
}

/* Кастомные кнопки */
.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-gold) 0%, var(--color-accent-amber) 100%);
  color: #0b0c10;
  border: none;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 14px rgba(245, 184, 0, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 184, 0, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Модальные окна с анимацией */
.modal-overlay {
  background-color: rgba(6, 6, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.3s ease;
  z-index: 100;
}

.modal-content {
  animation: modalEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  border: 1px solid rgba(245, 184, 0, 0.25);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 184, 0, 0.15);
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Анимация переходов между вкладками */
.tab-content {
  animation: tabFadeIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Тексты с акцентом */
.text-accent-gold {
  color: #f5b800;
}

/* Статусы заказов */
.status-badge-pending {
  background: rgba(245, 184, 0, 0.15);
  border: 1px solid rgba(245, 184, 0, 0.3);
  color: #f5b800;
}

.status-badge-completed {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.status-badge-cancelled {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Уведомления (Toasts) */
.toast-notification {
  animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateY(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Премиум стили магазина Majestic RP */
.shop-card {
  background: linear-gradient(145deg, #14151e 0%, #0f1016 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.shop-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245, 184, 0, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.shop-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 184, 0, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(245, 184, 0, 0.2), 0 0 25px rgba(245, 184, 0, 0.12);
}

.shop-card:hover::before {
  opacity: 1;
}

.category-pill {
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.03);
}

.category-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
}

.category-pill.active {
  background: #f5b800;
  color: #0b0c10;
  font-weight: 900;
  border-color: #f5b800;
  box-shadow: 0 0 18px rgba(245, 184, 0, 0.4);
}

.clothing-subpill {
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(236, 72, 153, 0.25);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  color: #f472b6;
  background: rgba(236, 72, 153, 0.06);
}

.clothing-subpill:hover {
  background: rgba(236, 72, 153, 0.18);
  color: white;
  border-color: rgba(236, 72, 153, 0.45);
}

.clothing-subpill.active {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: white;
  font-weight: 900;
  border-color: #ec4899;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.45);
}

.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  background: rgba(245, 184, 0, 0.12);
  border: 1px solid rgba(245, 184, 0, 0.3);
  border-radius: 50px;
  color: #f5b800;
  font-weight: 900;
  font-size: 14px;
}

.buy-btn {
  padding: 9px 20px;
  background: linear-gradient(135deg, #f5b800 0%, #d49b00 100%);
  color: #0b0c10;
  font-weight: 900;
  font-size: 12px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(245, 184, 0, 0.3);
}

.buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245, 184, 0, 0.5);
  background: linear-gradient(135deg, #ffc700 0%, #e5a800 100%);
}

/* Полное скрытие устаревших модалок */
#submit-pts-modal,
.btn-submit-pts,
button[onclick*="openSubmitPtsModal"] {
  display: none !important;
}

/* Аккуратный стиль инпутов в сетке баллов */
#leaderboard-body input[type="number"],
.table-point-input {
  width: 64px !important;
  height: 38px !important;
  background: #12131c !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  text-align: center !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6) !important;
}

.table-point-input:hover {
  border-color: rgba(245, 184, 0, 0.4) !important;
  background: #181926 !important;
}

.table-point-input:focus {
  border-color: #f5b800 !important;
  background: #1e1f30 !important;
  box-shadow: 0 0 12px rgba(245, 184, 0, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.6) !important;
}

.table-point-input.has-draft {
  border-color: #f5b800 !important;
  background: rgba(245, 184, 0, 0.18) !important;
  color: #f5b800 !important;
  box-shadow: 0 0 14px rgba(245, 184, 0, 0.35) !important;
}

/* Орбитальные фоновые эффекты */
.bg-orbit-ring {
  position: fixed;
  border-radius: 50%;
  border: 1px solid rgba(245, 184, 0, 0.05);
  pointer-events: none;
  z-index: 0;
  animation: orbitPulse 12s ease-in-out infinite;
}

@keyframes orbitPulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.03); }
}

.bg-star-dot {
  position: fixed;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  z-index: 0;
  animation: starTwinkle 4s ease-in-out infinite;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.5); }
}

/* ==========================================
   СКИДКИ И АКЦИИ (DISCOUNTS & PROMOTIONS)
   ========================================== */

.discount-pill {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(245, 158, 11, 0.2) 100%) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15) !important;
}

.discount-pill:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(245, 158, 11, 0.35) 100%) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3) !important;
}

.discount-pill.active {
  background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%) !important;
  border-color: #f59e0b !important;
  color: #000000 !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5) !important;
}

.discount-card {
  border-color: rgba(245, 158, 11, 0.4) !important;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, rgba(17, 17, 24, 0.95) 40%) !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.12), inset 0 0 15px rgba(245, 158, 11, 0.05) !important;
  position: relative;
}

.discount-card:hover {
  border-color: rgba(245, 158, 11, 0.8) !important;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.25), inset 0 0 20px rgba(245, 158, 11, 0.08) !important;
  transform: translateY(-4px);
}

.discount-price-badge {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15) !important;
}

/* ==========================================
   РУЛЕТКА И CS:GO ОТКРЫТИЕ (ROULETTE)
   ========================================== */

#roulette-track {
  display: flex;
  align-items: center;
  user-select: none;
}

.winner-slot {
  position: relative;
  border-color: #f59e0b !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(239, 68, 68, 0.25) 100%) !important;
  animation: winnerSlotPulse 1.2s ease-in-out infinite alternate;
}

@keyframes winnerSlotPulse {
  0% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); transform: scale(1); }
  100% { box-shadow: 0 0 45px rgba(245, 158, 11, 0.95), 0 0 70px rgba(239, 68, 68, 0.5); transform: scale(1.04); }
}

/* Эпическое свечение победителя (Sunburst Aura & Champion Spotlight) */
.epic-winner-box {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.35) 0%, rgba(239, 68, 68, 0.15) 50%, rgba(13, 14, 23, 0.95) 100%) !important;
  border: 2px solid rgba(245, 158, 11, 0.8) !important;
  box-shadow: 0 0 60px rgba(245, 158, 11, 0.5), 0 0 120px rgba(239, 68, 68, 0.3), inset 0 0 40px rgba(245, 158, 11, 0.25) !important;
  animation: epicWinnerPulse 2s ease-in-out infinite alternate;
}

@keyframes epicWinnerPulse {
  0% { box-shadow: 0 0 40px rgba(245, 158, 11, 0.4), inset 0 0 25px rgba(245, 158, 11, 0.2); }
  100% { box-shadow: 0 0 80px rgba(245, 158, 11, 0.8), 0 0 140px rgba(245, 158, 11, 0.4), inset 0 0 50px rgba(245, 158, 11, 0.4); }
}

.epic-sunburst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  background: repeating-conic-gradient(from 0deg, rgba(245, 158, 11, 0.15) 0deg 15deg, transparent 15deg 30deg);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: spinSunburst 25s linear infinite;
  z-index: 0;
}

@keyframes spinSunburst {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}


