/* ==========================================================================
   KAVABI — Official Server Shop Stylesheet
   Theme: Refined Charcoal & Dark Gray (Modern High-End Dark UI)
   Icons: Lucide Icons Library (https://lucide.dev/icons/)
   ========================================================================== */

:root {
  /* Dark Gray Charcoal Palette (#121214) */
  --bg-app: #1a1a1e;
  --bg-primary: #17171a;
  --bg-secondary: #1e1e23;
  --bg-card: rgba(26, 26, 31, 0.78);
  --bg-card-hover: rgba(36, 36, 44, 0.9);
  --bg-elevated: rgba(30, 30, 36, 0.95);
  --bg-glass: rgba(18, 18, 22, 0.85);
  --bg-input: #1a1a20;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-highlight: rgba(226, 232, 240, 0.3);
  --border-focus: #94a3b8;

  /* Sophisticated Accents */
  --accent-primary: #e2e8f0;
  --accent-primary-hover: #ffffff;
  --accent-slate: #64748b;
  
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.2);

  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);

  --accent-purple: #a855f7;
  --accent-purple-glow: rgba(168, 85, 247, 0.2);

  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.2);

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.2);

  --accent-pink: #ec4899;
  --accent-pink-glow: rgba(236, 72, 153, 0.2);

  --accent-gold: #eab308;
  --accent-danger: #ef4444;

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Unbounded', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Layout & Radii */
  --container-max: 1240px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

/* ================= Reset & Base ================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: #252b38;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #363e50;
}

/* Lucide Icon Global Rules */
svg.lucide, i[data-lucide] {
  display: inline-block;
  vertical-align: middle;
  width: 1.25em;
  height: 1.25em;
  stroke-width: 2px;
  flex-shrink: 0;
}

/* Ambient Canvas */
.ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  outline: none;
}

/* ================= 1. Top Curtain Trigger Bar (Свайп-Индикатор) ================= */
.curtain-top-trigger {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 105;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 14px 6px;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.curtain-handle-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 18px 6px;
  background: rgba(22, 26, 35, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all var(--transition-normal);
}

.curtain-notch {
  width: 38px;
  height: 4px;
  background: #475569;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast), width var(--transition-fast);
}

.curtain-trigger-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.curtain-arrow-icon {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.curtain-top-trigger:hover .curtain-handle-bar {
  background: rgba(30, 36, 48, 0.95);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(2px);
}

.curtain-top-trigger:hover .curtain-notch {
  background: #cbd5e1;
  width: 48px;
}

.curtain-top-trigger:hover .curtain-trigger-text {
  color: #f8fafc;
}

.curtain-top-trigger:hover .curtain-arrow-icon {
  transform: translateY(2px);
}

/* ================= 2. Pull-Down Swipe Curtain (Шторка) ================= */
.swipe-curtain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 200;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.4s;
}

.swipe-curtain-overlay.active {
  pointer-events: auto;
  visibility: visible;
}

.curtain-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 10, 14, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.swipe-curtain-overlay.active .curtain-backdrop {
  opacity: 1;
}

.curtain-panel {
  position: relative;
  width: 100%;
  max-height: 88vh;
  background: linear-gradient(180deg, #141720 0%, #101319 100%);
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transform: translateY(-102%);
  transition: transform var(--transition-smooth);
  overflow-y: auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
}

.swipe-curtain-overlay.active .curtain-panel {
  transform: translateY(0);
}

.curtain-drag-pill {
  display: flex;
  justify-content: center;
  padding: 10px 0 6px;
  cursor: grab;
}

.curtain-drag-pill .pill-bar {
  width: 54px;
  height: 5px;
  background: #334155;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast);
}

.curtain-drag-pill:hover .pill-bar {
  background: #64748b;
}

.curtain-inner {
  padding-top: 10px;
}

.curtain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.curtain-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.curtain-brand .logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.curtain-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.curtain-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.curtain-balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 36, 48, 0.8);
  border: 1px solid var(--border-medium);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.icon-chip-coin {
  width: 16px;
  height: 16px;
  color: var(--accent-amber);
}

.curtain-close-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.curtain-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Curtain Cards Grid */
.curtain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}

@media (max-width: 1024px) {
  .curtain-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .curtain-grid {
    grid-template-columns: 1fr;
  }
}

.curtain-nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.curtain-nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

.curtain-nav-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.curtain-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(30, 36, 48, 0.7);
  border: 1px solid var(--border-subtle);
}

.curtain-card-icon.color-slate { color: #94a3b8; border-color: rgba(148, 163, 184, 0.2); }
.curtain-card-icon.color-amber { color: var(--accent-amber); border-color: var(--accent-amber-glow); }
.curtain-card-icon.color-emerald { color: var(--accent-emerald); border-color: var(--accent-emerald-glow); }
.curtain-card-icon.color-purple { color: var(--accent-purple); border-color: var(--accent-purple-glow); }
.curtain-card-icon.color-blue { color: var(--accent-blue); border-color: var(--accent-blue-glow); }
.curtain-card-icon.color-pink { color: var(--accent-pink); border-color: var(--accent-pink-glow); }
.curtain-card-icon.color-cyan { color: var(--accent-cyan); border-color: var(--accent-cyan-glow); }
.curtain-card-icon.color-gold { color: var(--accent-gold); border-color: rgba(234, 179, 8, 0.3); }

.curtain-card-info {
  flex: 1;
}

.curtain-card-info h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.curtain-card-info p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.curtain-card-arrow {
  color: var(--text-muted);
  opacity: 0.6;
  transition: all var(--transition-fast);
}

.curtain-nav-card:hover .curtain-card-arrow {
  color: #fff;
  opacity: 1;
  transform: translate(2px, -2px);
}

/* Curtain Footer Bar */
.curtain-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 14px;
}

.server-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.curtain-quick-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-curtain-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-curtain-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ================= 3. Header & Navigation ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(18, 18, 20, 0.92);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  gap: 20px;
}

/* Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-symbol {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(226, 232, 240, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.2);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal), filter var(--transition-normal);
}

.logo-symbol.small {
  width: 32px;
  height: 32px;
}

.icon-logo {
  width: 20px;
  height: 20px;
}

.icon-logo-small {
  width: 17px;
  height: 17px;
}

.brand-logo:hover .logo-symbol {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.4);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

/* Header Nav Menu (Direct Section Tabs) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-subtle);
}

.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-medium);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.nav-section-btn .icon-nav {
  width: 17px;
  height: 17px;
}

/* Currency Switcher Dropdown */
.currency-selector {
  position: relative;
}

.currency-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.currency-select-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.curr-symbol {
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-weight: 800;
}

.curr-code {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.curr-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.currency-selector.open .curr-chevron {
  transform: rotate(180deg);
}

.currency-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 170px;
  background: #141822;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--transition-fast);
}

.currency-selector.open .currency-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.curr-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  text-align: left;
}

.curr-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.curr-option.active {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fff;
}

.curr-option-sym {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent-amber);
  min-width: 16px;
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Эскиз новой шапки: компактная тёмная pill-панель */
.site-header {
  top: 16px;
  margin: 0 24px;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.header-inner {
  max-width: none;
  height: 52px;
  padding: 0 12px 0 22px;
  gap: 14px;
  border-radius: 999px;
  background: #121214;
  border: 1px solid rgba(255, 255, 255, .05);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
}

.brand-logo {
  gap: 8px;
  flex-shrink: 0;
}

.logo-symbol {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #6d5dfc;
  border: 0;
  color: #160019;
}

.logo-text { font-size: .95rem; color: #fff; }

.nav-menu {
  flex: 1;
  justify-content: center;
  gap: 2px;
}

.nav-link {
  padding: 7px 12px;
  border-radius: 999px;
  color: rgba(255,255,255,.72);
  font-size: .78rem;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: #6d5dfc;
  border-color: transparent;
  box-shadow: none;
}
.site-header .nav-link.active {
  color: #111114;
  background: #fff;
  border-color: #fff;
}
.site-header .nav-link.active .icon-nav,
.site-header .nav-link.active span { color: #111114 !important; }
.site-header .nav-link:hover:not(.active) {
  background: transparent;
  border-color: transparent;
  color: rgba(255,255,255,.72);
  box-shadow: none;
}

.header-actions { gap: 8px; }

.cart-trigger-btn,
.profile-header-btn {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: #6d5dfc;
  color: #fff;
}

.cart-trigger-btn { padding: 0 14px; }
.profile-header-btn { width: 34px; padding: 0; justify-content: center; }
.profile-header-btn span { display: none; }
.cart-btn-label { font-size: .75rem; font-weight: 700; }

@media (max-width: 760px) {
  .site-header { margin: 0 10px; }
  .header-inner { padding-left: 10px; }
  .logo-text { display: none; }
  .nav-link { padding: 7px 8px; }
  .nav-link span { display: none; }
  .cart-btn-label { display: none; }
  .cart-trigger-btn { padding: 0 10px; }
}

/* Финальные переопределения шапки */
.site-header .profile-header-btn,
.site-header .cart-trigger-btn {
  background: #6d5dfc;
  border: 0;
  color: #fff;
  box-shadow: none;
}

.site-header .profile-header-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}

.site-header .profile-header-btn span { display: inline; }
.site-header .profile-header-btn { width: auto; padding: 0 14px; gap: 7px; }
.site-header .cart-trigger-btn { min-height: 34px; padding: 0 14px; }
.site-header .cart-trigger-btn:hover,
.site-header .profile-header-btn:hover { background: #887cff; transform: none; }

/* Настоящий popover профиля: без полноэкранного модального фона */
.modal-profile-backdrop {
  top: 76px;
  left: auto;
  right: 24px;
  width: 310px;
  height: auto;
  min-height: 0;
  padding: 0;
  display: block;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}
.modal-profile-backdrop.active { pointer-events: none; }
.modal-profile-backdrop .modal-profile-card {
  width: 310px;
  transform: translateY(-8px) scale(.96);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  pointer-events: auto;
}
.modal-profile-backdrop.active .modal-profile-card { transform: translateY(0) scale(1); }

@media (max-width: 760px) {
  .modal-profile-backdrop { top: 76px; right: 10px; width: calc(100vw - 20px); }
.modal-profile-backdrop .modal-profile-card { width: 100%; }
}

/* Нижний блок появляется только при прокрутке к самому низу */
.site-footer {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.site-footer.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.active-section-tag { display: none !important; }
main {
  min-height: 100vh;
}
.site-header {
  transition: transform .28s ease, opacity .28s ease;
}
.site-header.header-hidden {
  transform: translateY(-110px);
  opacity: 0;
  pointer-events: none;
}

/* Цвет верхней шапки popover профиля */
.modal-profile-backdrop .modal-header {
  background: #121214 !important;
}
.logo-symbol {
  border-radius: 8px;
  overflow: hidden;
  border: 0 !important;
  background: transparent !important;
}
.server-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.22);
}
.site-header .logo-symbol {
  width: 36px;
  height: 36px;
}
.homepage-video-card {
  width: min(820px, 100%);
  margin: 42px auto 0;
  padding: 10px;
  background: #151519;
  border: 1px solid #2d2d34;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
.homepage-video-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 6px 11px;
  text-align: left;
}
.homepage-video-kicker {
  color: #a99fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.homepage-video-caption {
  color: #8f8f99;
  font-size: .72rem;
}
.homepage-video {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 7px;
  background: #0f0f12;
}
@media (max-width: 600px) {
  .homepage-video-card { margin-top: 28px; padding: 7px; }
  .homepage-video-heading { display: block; padding: 4px 4px 9px; }
  .homepage-video-caption { display: block; margin-top: 3px; }
}

/* Обновлённый дизайн корзины */
.cart-drawer-overlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(8, 8, 10, .58);
}
.cart-drawer {
  max-width: 430px;
  background: #1a1a1e;
  border-left: 1px solid #2d2d33;
  box-shadow: -18px 0 45px rgba(0,0,0,.42);
}
.cart-drawer-header {
  padding: 18px 20px;
  background: #151519;
  border-bottom: 1px solid #2d2d33;
}
.cart-title-row { gap: 9px; }
.cart-title-row h3 { font-size: 1.05rem; }
.icon-cart-head { color: #887cff; }
.cart-header-count {
  background: #292735;
  color: #c9c5ff;
}
.cart-close-btn {
  border: 1px solid #303038;
  background: #202024;
}
.cart-items-body { padding: 18px 20px; gap: 10px; }
.cart-item-card {
  background: #202024;
  border: 1px solid #2d2d33;
  border-radius: 8px;
  padding: 12px;
}
.cart-item-card:hover { border-color: #49435f; }
.empty-icon-wrap { background: #24232d; color: #887cff; }
.cart-drawer-footer {
  padding: 18px 20px;
  background: #151519;
  border-top: 1px solid #2d2d33;
}
.checkout-btn { border-radius: 8px; }

/* Финальный стиль именно всплывающей корзины */
.cart-drawer-overlay {
  background: rgba(0,0,0,.25) !important;
  backdrop-filter: blur(1px) !important;
  -webkit-backdrop-filter: blur(1px) !important;
}
.cart-drawer {
  width: min(430px, 100vw) !important;
  background: #1a1a1e !important;
  border-left: 1px solid #34343c !important;
  border-radius: 0;
  overflow: hidden;
}
.cart-drawer-header {
  background: #151519 !important;
  padding: 20px !important;
  border-bottom: 1px solid #34343c !important;
}
.cart-drawer-header .cart-title-row h3 { color: #f4f4f5; }
.cart-items-body { background: #1a1a1e; }
.cart-item-card {
  background: #242428 !important;
  border: 1px solid #35353d !important;
  border-radius: 10px !important;
}
.cart-drawer-footer {
  background: #151519 !important;
  border-top: 1px solid #34343c !important;
}

/* Карточки товаров в корзине */
.cart-item-card {
  position: relative;
  padding: 16px !important;
  background: #202024 !important;
  border: 1px solid #303038 !important;
  border-radius: 10px !important;
}
.cart-item-head {
  margin-bottom: 13px;
  padding-bottom: 12px;
  align-items: center;
  border-bottom: 1px solid #303038;
}
.cart-item-title-group { gap: 7px; }
.cart-item-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: .62rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cart-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: .025em;
  color: #fff;
}
.cart-item-name::before {
  content: '✦';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 5px;
  background: #2b293f;
  color: #a99fff;
  font-size: .7rem;
}
.cart-item-remove {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
}
.cart-item-remove:hover { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.25); }
.cart-qty-ctrl {
  gap: 10px;
  padding: 3px 7px;
  border: 1px solid #35353d;
  border-radius: 5px;
  background: #18181b;
}
.cart-qty-ctrl .qty-btn { width: 20px; text-align: center; color: #aaaab5; }
.cart-qty-ctrl .qty-val { min-width: 15px; text-align: center; color: #fff; }
.cart-item-price {
  font-size: 1.05rem;
  color: #f4f4f5;
  letter-spacing: .03em;
}
.cart-item-price.price-kav { color: #a99fff; }

/* Главная: единый hero-блок с видео */
.hero-container-clean { max-width: 1180px; }
.hero-content-center {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(420px, 1.22fr);
  column-gap: 54px;
  row-gap: 0;
  align-items: center;
  text-align: left;
}
.hero-content-center .hero-title,
.hero-content-center .hero-subtitle,
.hero-content-center .hero-actions { grid-column: 1; }
.hero-content-center .hero-title { align-self: end; }
.hero-content-center .hero-subtitle { align-self: start; }
.hero-actions-center { justify-content: flex-start; }
.homepage-video-card {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 100%;
  margin: 0;
  transform: rotate(1deg);
  transition: transform .3s ease;
}
.homepage-video-card:hover { transform: rotate(0) translateY(-3px); }
.homepage-video-heading { padding-left: 8px; }
@media (max-width: 820px) {
  .hero-content-center {
    grid-template-columns: 1fr;
    text-align: center;
    row-gap: 0;
  }
  .hero-content-center .hero-title,
  .hero-content-center .hero-subtitle,
  .hero-content-center .hero-actions,
  .homepage-video-card { grid-column: 1; }
  .hero-actions-center { justify-content: center; }
  .homepage-video-card { grid-row: auto; margin-top: 30px; transform: none; }
}

.site-header .cart-btn-label { display: none; }
.site-header .cart-trigger-btn { width: 34px; padding: 0; justify-content: center; }

@media (max-width: 760px) {
  .site-header .profile-header-btn { width: 34px; padding: 0; }
  .site-header .profile-header-btn span { display: none; }
}

/* Настоящий popover профиля: без полноэкранного модального фона */
.modal-profile-backdrop {
  top: 68px;
  left: auto;
  right: 24px;
  width: 310px;
  height: auto;
  min-height: 0;
  padding: 0;
  display: block;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

.modal-profile-backdrop.active { pointer-events: none; }
.modal-profile-backdrop .modal-profile-card {
  width: 310px;
  transform: translateY(-8px) scale(.96);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  pointer-events: auto;
}
.modal-profile-backdrop.active .modal-profile-card {
  transform: translateY(0) scale(1);
}

@media (max-width: 760px) {
  .modal-profile-backdrop { top: 68px; right: 10px; width: calc(100vw - 20px); }
  .modal-profile-backdrop .modal-profile-card { width: 100%; }
}

/* Компактное выпадающее окно профиля */
.modal-profile-backdrop {
  align-items: flex-start;
  justify-content: flex-end;
  padding: 76px 24px 24px;
  background: transparent;
  pointer-events: none;
}

.modal-profile-backdrop .modal-profile-card {
  width: 310px;
  max-height: none;
  border: 1px solid rgba(109, 93, 252, .35);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .45);
  pointer-events: auto;
}

.modal-profile-backdrop .modal-header { display: none; }
.modal-profile-backdrop .modal-profile-head { min-width: 0; }
.modal-profile-backdrop .user-avatar-wrap,
.modal-profile-backdrop .user-id-badge,
.modal-profile-backdrop .modal-close,
.modal-profile-backdrop .profile-topup-strip,
.modal-profile-backdrop .profile-settings-card,
.modal-profile-backdrop .stat-box:not(:first-child),
.modal-profile-backdrop .profile-history-card,
.modal-profile-backdrop .modal-footer { display: none; }

.modal-profile-backdrop .modal-profile-body { padding: 12px 16px 16px; }
.modal-profile-backdrop .user-name { font-size: .95rem; }
.modal-profile-backdrop .profile-stats-grid { display: block; }
.modal-profile-backdrop .stat-box:first-child {
  display: block;
  padding: 16px;
  border-radius: 12px;
  background: #1a1a1e;
  border: 1px solid rgba(255,255,255,.08);
}
.modal-profile-backdrop .stat-header { margin-bottom: 8px; }
.modal-profile-backdrop .stat-value { font-size: 1.45rem; }
.profile-login-btn {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #6d5dfc;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.profile-login-btn:hover { background: #887cff; }

@media (max-width: 760px) {
  .modal-profile-backdrop { padding: 70px 10px 10px; }
  .modal-profile-backdrop .modal-profile-card { width: min(310px, calc(100vw - 20px)); }
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Balance Badge */
.balance-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 24, 32, 0.85);
  border: 1px solid var(--border-medium);
  padding: 6px 12px 6px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
}

.balance-icon {
  color: var(--accent-amber);
  display: flex;
  align-items: center;
}

.balance-label {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.balance-value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.balance-add-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  transition: all var(--transition-fast);
  margin-left: 2px;
}

.balance-add-btn:hover {
  background: var(--accent-amber);
  color: #000;
  transform: scale(1.1);
}

/* Cart Trigger */
.cart-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.cart-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.cart-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cart-badge-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--accent-amber);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cart-badge-count.pop {
  animation: badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badge-pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Profile Button in Header */
.profile-header-btn, .login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-medium);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.profile-header-btn:hover, .login-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

/* ================= 4. Hero Section ================= */
.hero-section {
  padding: 60px 0 40px;
  position: relative;
}

.hero-section-clean {
  padding: 80px 0 50px;
}

.hero-container-clean {
  display: flex;
  justify-content: center;
}

.hero-content-center {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 36, 48, 0.7);
  border: 1px solid var(--border-medium);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 18px;
}

.icon-sparkle {
  color: var(--accent-amber);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 620px;
}

.hero-actions-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

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

.btn-outline {
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--border-strong);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.84rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* Hero Feature Card Visual */
.hero-visual {
  position: relative;
}

.floating-card-stack {
  position: relative;
}

.hero-feature-card {
  background: rgba(24, 28, 38, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.preview-tag {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.preview-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.preview-role-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: #f8fafc;
  margin-bottom: 16px;
}

.preview-perks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.perk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.icon-check {
  color: var(--accent-emerald);
  width: 16px;
  height: 16px;
}

.preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.preview-price-kav {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.preview-status {
  font-size: 0.78rem;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-mini-stat {
  position: absolute;
  background: rgba(20, 24, 34, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 3;
}

.hero-mini-stat.stat-1 {
  top: -18px;
  right: -12px;
}

.hero-mini-stat.stat-2 {
  bottom: -18px;
  left: -12px;
}

.mini-stat-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-amber);
}

.mini-stat-num {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
}

.mini-stat-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ================= 5. Shop Section ================= */
.shop-section {
  padding: 50px 0 90px;
}

.shop-header {
  margin-bottom: 36px;
}

.shop-title-wrap {
  margin-bottom: 22px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.section-description {
  color: var(--text-secondary);
  font-size: 0.96rem;
}

/* Shop Section Header & Active Section Indicator */
.shop-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.active-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.active-section-icon {
  width: 15px;
  height: 15px;
}

.btn-change-section {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-medium);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-change-section:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

/* Tab Panes */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

/* ================= 6. Tab: ALL (Все товары) ================= */
.all-overview-header {
  margin-bottom: 34px;
}

.overview-lead-card {
  background: linear-gradient(135deg, rgba(28, 33, 44, 0.9) 0%, rgba(20, 24, 32, 0.9) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .overview-lead-card {
    grid-template-columns: 1fr;
  }
}

.lead-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  color: #cbd5e1;
  margin-bottom: 12px;
}

.overview-lead-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.overview-lead-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 18px;
}

.lead-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-visual-box {
  background: rgba(18, 22, 30, 0.8);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.icon-lead-gem {
  width: 36px;
  height: 36px;
  color: var(--accent-emerald);
}

.lead-visual-box span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Category Blocks in All */
.all-category-block {
  margin-bottom: 40px;
}

.all-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.cat-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-icon {
  width: 22px;
  height: 22px;
}

.cat-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.btn-more-tab {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.btn-more-tab:hover {
  color: #fff;
}

/* ================= 7. Currency Grid & Cards ================= */
.currency-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

@media (max-width: 1100px) {
  .currency-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .currency-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .currency-grid {
    grid-template-columns: 1fr;
  }
}

.currency-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.currency-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.currency-card.featured {
  border-color: rgba(245, 158, 11, 0.3);
}

.card-badge-profitable {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.currency-card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 18px;
}

.currency-card-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-amber);
}

.currency-card-icon svg {
  width: 28px;
  height: 28px;
}

.tier-legendary .currency-card-icon { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.4); color: #ffd700; }
.tier-epic .currency-card-icon      { background: rgba(168, 85, 247, 0.15); border-color: rgba(168, 85, 247, 0.35); color: #c084fc; }
.tier-rare .currency-card-icon      { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.35); color: #60a5fa; }
.tier-uncommon .currency-card-icon  { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.35); color: #34d399; }
.tier-common .currency-card-icon    { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.15); color: #cbd5e1; }
.tier-basic .currency-card-icon     { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); color: #94a3b8; }
.tier-minimal .currency-card-icon   { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); color: #64748b; }

.currency-amount {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.currency-unit {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.currency-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  gap: 10px;
}

.currency-price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-buy-currency {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-medium);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.btn-buy-currency:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* Custom Quantity Slider */
.custom-slider-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

.slider-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 16px;
}

.slider-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  color: #cbd5e1;
  margin-bottom: 8px;
}

.slider-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.slider-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 540px;
}

.slider-display-box {
  background: rgba(18, 22, 30, 0.9);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  text-align: right;
}

.slider-display-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.slider-display-val {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-amber);
}

.slider-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-preset {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-preset:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-preset.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.slider-control-wrap {
  position: relative;
  margin-bottom: 24px;
}

.slider-scale-limits {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.kav-range-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  background: #1e2430;
  border-radius: var(--radius-pill);
  outline: none;
}

.kav-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f8fafc;
  border: 3px solid #0f172a;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.kav-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 16px;
}

.slider-calc-summary {
  display: flex;
  align-items: center;
  gap: 20px;
}

.calc-cost-col {
  display: flex;
  flex-direction: column;
}

.calc-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.calc-price-rub {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.calc-bonus-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ================= 8. Items Tab (Предметы) ================= */
.empty-section-container {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-section-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.empty-section-icon svg {
  width: 28px;
  height: 28px;
}

.empty-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.5;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 1100px) {
  .items-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .items-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= 9. Roles Grid (Роли) ================= */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  justify-content: center;
  align-items: stretch;
}

/* Role Gradient Cards */
.role-card.role-phantom {
  border-color: rgba(208, 78, 214, 0.35);
  background: linear-gradient(135deg, rgba(38, 22, 45, 0.9) 0%, rgba(20, 24, 34, 0.95) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(208, 78, 214, 0.08);
}
.role-card.role-phantom:hover {
  border-color: rgba(208, 78, 214, 0.65);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(208, 78, 214, 0.2);
}
.badge-phantom {
  background: linear-gradient(135deg, rgba(131, 77, 155, 0.3) 0%, rgba(208, 78, 214, 0.3) 100%);
  color: #e879f9;
  border: 1px solid rgba(208, 78, 214, 0.45);
}
.role-phantom .role-card-title {
  background: linear-gradient(135deg, #834d9b 0%, #d04ed6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.role-card.role-spectre {
  border-color: rgba(0, 255, 135, 0.35);
  background: linear-gradient(135deg, rgba(18, 38, 32, 0.9) 0%, rgba(20, 24, 34, 0.95) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 135, 0.08);
}
.role-card.role-spectre:hover {
  border-color: rgba(96, 239, 255, 0.65);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 255, 135, 0.2);
}
.badge-spectre {
  background: linear-gradient(135deg, rgba(0, 255, 135, 0.25) 0%, rgba(96, 239, 255, 0.25) 100%);
  color: #60efff;
  border: 1px solid rgba(96, 239, 255, 0.45);
}
.role-spectre .role-card-title {
  background: linear-gradient(135deg, #00ff87 0%, #60efff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.role-card.role-vortex {
  border-color: rgba(142, 45, 226, 0.35);
  background: linear-gradient(135deg, rgba(28, 18, 48, 0.9) 0%, rgba(20, 24, 34, 0.95) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(142, 45, 226, 0.08);
}
.role-card.role-vortex:hover {
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(142, 45, 226, 0.2);
}
.badge-vortex {
  background: linear-gradient(135deg, rgba(142, 45, 226, 0.3) 0%, rgba(74, 0, 224, 0.3) 100%);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.45);
}
.role-vortex .role-card-title {
  background: linear-gradient(135deg, #8e2de2 0%, #a855f7 50%, #4a00e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.role-card.role-eclipse {
  border-color: rgba(255, 75, 31, 0.35);
  background: linear-gradient(135deg, rgba(42, 22, 20, 0.9) 0%, rgba(20, 24, 34, 0.95) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 75, 31, 0.08);
}
.role-card.role-eclipse:hover {
  border-color: rgba(255, 144, 104, 0.65);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 75, 31, 0.2);
}
.badge-eclipse {
  background: linear-gradient(135deg, rgba(255, 75, 31, 0.3) 0%, rgba(255, 144, 104, 0.3) 100%);
  color: #ff9068;
  border: 1px solid rgba(255, 144, 104, 0.45);
}
.role-eclipse .role-card-title {
  background: linear-gradient(135deg, #ff4b1f 0%, #ff9068 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.role-card.role-immortal {
  border-color: rgba(76, 173, 208, 0.35);
  background: linear-gradient(135deg, rgba(20, 36, 46, 0.9) 0%, rgba(20, 24, 34, 0.95) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(76, 173, 208, 0.1);
}
.role-card.role-immortal:hover {
  border-color: rgba(178, 249, 255, 0.65);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(76, 173, 208, 0.25);
}
.badge-immortal {
  background: linear-gradient(135deg, rgba(76, 173, 208, 0.3) 0%, rgba(178, 249, 255, 0.3) 100%);
  color: #b2f9ff;
  border: 1px solid rgba(178, 249, 255, 0.45);
}
.role-immortal .role-card-title {
  background: linear-gradient(135deg, #4cadd0 0%, #b2f9ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 1300px) {
  .roles-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .roles-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.role-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.role-badge-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.badge-blue { background: rgba(59, 130, 246, 0.2); color: var(--accent-blue); border: 1px solid rgba(59, 130, 246, 0.35); }
.badge-purple { background: rgba(168, 85, 247, 0.2); color: var(--accent-purple); border: 1px solid rgba(168, 85, 247, 0.35); }
.badge-gold { background: rgba(245, 158, 11, 0.2); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-pink { background: rgba(236, 72, 153, 0.2); color: var(--accent-pink); border: 1px solid rgba(236, 72, 153, 0.35); }
.badge-emerald { background: rgba(16, 185, 129, 0.2); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.35); }

.role-card-title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
}

.role-card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
  min-height: 44px;
}

.role-perks-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.role-perk-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.role-perk-item .icon-check {
  margin-top: 1px;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.role-perk-item code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
  color: #f1f5f9;
}

.role-card-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.role-price-tag {
  font-family: var(--font-mono);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--accent-amber);
}

.role-price-tag.role-price-soon {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.btn-buy-role {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-medium);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-buy-role:hover:not(:disabled) {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.btn-buy-role:disabled {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.service-card.service-unban {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(18, 36, 28, 0.85) 0%, rgba(20, 24, 34, 0.95) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.08);
}

.service-card.service-unban:hover {
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(16, 185, 129, 0.2);
}

/* ================= 10. Services Grid (Услуги) ================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 420px));
  gap: 20px;
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-3px);
}

.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(59, 130, 246, 0.18);
  color: var(--accent-blue);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.service-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.service-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.service-price {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-amber);
}

/* ================= 11. Custom Tab (Stub) ================= */
.custom-stub-container {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 60px 24px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.stub-icon-glow {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.stub-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.stub-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.stub-progress-bar {
  width: 100%;
  max-width: 320px;
  height: 6px;
  background: #1e2430;
  border-radius: var(--radius-pill);
  margin: 0 auto;
  overflow: hidden;
}

.stub-progress-fill {
  width: 65%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple));
  border-radius: var(--radius-pill);
}

/* ================= 12. Profile / Personal Cabinet ================= */
.profile-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-user-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.user-avatar-wrap {
  position: relative;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: #252c3b;
  border: 2px solid var(--border-strong);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
  display: block;
}

.user-avatar.has-avatar-img {
  padding: 0;
  overflow: hidden;
  border-color: #5865F2;
  box-shadow: 0 0 14px rgba(88, 101, 242, 0.35);
}

.profile-login-btn.is-logged-in {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.profile-connect-btn.is-connected {
  background: rgba(88, 101, 242, 0.2);
  border-color: rgba(88, 101, 242, 0.6);
  color: #fff;
}

.profile-connect-btn.is-connected:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.modal-discord-card {
  max-width: 480px;
}

.modal-discord-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-discord-oauth {
  background: #5865F2;
  border-color: #4752C4;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-discord-oauth:hover {
  background: #4752C4;
  border-color: #3c45a5;
  box-shadow: 0 4px 18px rgba(88, 101, 242, 0.4);
  transform: translateY(-1px);
}

.user-status-online {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: var(--accent-emerald);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
}

.user-meta {
  flex: 1;
}

.user-name {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.user-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.user-id-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.user-quick-actions {
  display: flex;
  gap: 10px;
}

/* Profile Settings Card */
.profile-settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.settings-label-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(30, 36, 48, 0.7);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-icon-box.color-amber { color: var(--accent-amber); border-color: rgba(245, 158, 11, 0.25); }
.settings-icon-box.color-blue { color: var(--accent-blue); border-color: rgba(59, 130, 246, 0.25); }

.settings-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.settings-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.profile-currency-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-curr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.profile-curr-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.profile-curr-chip.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fff;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.15);
}

.curr-chip-sym {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent-amber);
}

.settings-divider {
  height: 1px;
  background: var(--border-subtle);
  width: 100%;
}

.btn-profile-sound {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-medium);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-profile-sound:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .profile-stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.stat-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon-badge.color-cyan { color: var(--accent-cyan); }
.stat-icon-badge.color-emerald { color: var(--accent-emerald); }
.stat-icon-badge.color-purple { color: var(--accent-purple); }
.stat-icon-badge.color-gold { color: var(--accent-amber); }
.stat-icon-badge.color-blue { color: var(--accent-blue); }
.stat-icon-badge.color-pink { color: var(--accent-pink); }

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.stat-value.highlight-cyan {
  color: var(--accent-cyan);
}

.stat-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* History Card */
.profile-history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.history-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.history-empty {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
}

.history-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.history-item-info {
  display: flex;
  flex-direction: column;
}

.history-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.history-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-item-price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-amber);
}

/* ================= 13. Cart Drawer ================= */
.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 10, 14, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 210;
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  opacity: 0;
  transition: all var(--transition-normal);
}

.cart-drawer-overlay.active {
  visibility: visible;
  opacity: 1;
}

.cart-drawer {
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: #13161e;
  border-left: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
}

.cart-drawer-overlay.active .cart-drawer {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-title-row h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.cart-header-count {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.cart-close-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.cart-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.cart-items-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-empty-state {
  margin: auto;
  text-align: center;
  padding: 30px 10px;
}

.empty-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.cart-empty-state h4 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.cart-empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.cart-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.cart-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.cart-item-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.badge-cat-currency { background: rgba(245, 158, 11, 0.2); color: var(--accent-amber); }
.badge-cat-item { background: rgba(16, 185, 129, 0.2); color: var(--accent-emerald); }
.badge-cat-role { background: rgba(168, 85, 247, 0.2); color: var(--accent-purple); }
.badge-cat-service { background: rgba(59, 130, 246, 0.2); color: var(--accent-blue); }

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.cart-item-remove {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.cart-item-remove:hover {
  color: var(--accent-danger);
}

.cart-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
}

.qty-btn {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 700;
  padding: 0 4px;
}

.qty-btn:hover {
  color: #fff;
}

.qty-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.cart-item-price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.cart-item-price.price-kav {
  color: var(--accent-amber);
}

.cart-drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-subtle);
  background: #0f1219;
}

.cart-summary-block {
  margin-bottom: 16px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.total-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.total-amount-rub {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.total-amount-kav {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-amber);
}

/* ================= 14. Modals & Toasts ================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 10, 14, 0.75);
  backdrop-filter: blur(8px);
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: all var(--transition-normal);
}

.modal-backdrop.active {
  visibility: visible;
  opacity: 1;
}

.modal-card {
  background: #141822;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

/* Profile Modal Popup Custom Styles */
.modal-profile-card {
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #141822;
  border: 1px solid var(--border-strong);
}

.modal-profile-card .modal-header {
  padding: 20px 24px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(20, 24, 34, 0.95);
}

.modal-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-profile-body {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 0;
}

.modal-profile-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(18, 22, 30, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-topup-strip {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.topup-strip-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.topup-quick-grid-sm {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-topup-pill {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-amber);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-topup-pill:hover {
  background: var(--accent-amber);
  color: #000;
  transform: scale(1.04);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-body h4 {
  color: #fff;
  font-size: 0.95rem;
  margin: 12px 0 4px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-info h5 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.step-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.topup-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  background: #1c212d;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}

.toast-message.toast-exit {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
}

.toast-success { border-color: rgba(16, 185, 129, 0.4); }
.toast-success .toast-icon { color: var(--accent-emerald); }
.toast-error { border-color: rgba(239, 68, 68, 0.4); }
.toast-error .toast-icon { color: var(--accent-danger); }
.toast-warn { border-color: rgba(245, 158, 11, 0.4); }
.toast-warn .toast-icon { color: var(--accent-amber); }
.toast-info .toast-icon { color: var(--accent-cyan); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ================= 15. Footer ================= */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #0a0c10;
  padding: 36px 0;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links-col {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-link-btn {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-link-btn:hover {
  color: #fff;
}

/* Финальные переопределения шапки */
.site-header .profile-header-btn,
.site-header .cart-trigger-btn {
  background: #6d5dfc;
  border: 0;
  color: #fff;
  box-shadow: none;
}

.site-header .profile-header-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}

.site-header .profile-header-btn span { display: inline; }
.site-header .profile-header-btn { width: auto; padding: 0 14px; gap: 7px; }
.site-header .cart-trigger-btn { min-height: 34px; padding: 0 14px; }
.site-header .cart-trigger-btn:hover,
.site-header .profile-header-btn:hover { background: #887cff; transform: none; }

.cart-drawer { background: #1a1a1e; }
.modal-profile-card { background: #1a1a1e; }

/* Профиль: серый стиль без синей обводки */
.site-header .profile-header-btn {
  background: #6d5dfc;
  border: 1px solid #6d5dfc;
  color: #fff;
}
.site-header .profile-header-btn:hover { background: #887cff; }
.site-header .header-inner { background: #151519; }
.modal-profile-backdrop .modal-header { background: #1e1e23; }
.modal-profile-backdrop .modal-profile-card { background: #1a1a1e; }
.modal-profile-backdrop .modal-header { background: #151519; }
.header-sound-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #6d5dfc;
  color: #fff;
  cursor: pointer;
}
.header-sound-btn:hover { background: #887cff; }
.header-sound-btn svg { width: 17px; height: 17px; }
.header-sound-btn.is-muted::after {
  content: '';
  position: absolute;
  width: 23px;
  height: 2px;
  border-radius: 2px;
  background: #ef4444;
  transform: rotate(-45deg);
}
.modal-profile-backdrop .modal-profile-card {
  border-color: #121214;
}
.modal-profile-backdrop .modal-header {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 16px;
  background: #121214;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.modal-profile-backdrop .modal-profile-head { width: 100%; }
.modal-profile-backdrop .modal-close,
.modal-profile-backdrop .user-avatar-wrap,
.modal-profile-backdrop .user-id-badge { display: none; }
.modal-profile-backdrop .user-name { color: #fff; }
.modal-profile-backdrop .modal-profile-body { padding: 8px 12px 12px; }
.modal-profile-backdrop .profile-login-btn { margin-bottom: 6px; padding: 8px 12px; }
.modal-profile-backdrop .stat-box:first-child {
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: none;
}
.modal-profile-backdrop .stat-header { margin-bottom: 3px; }
.modal-profile-backdrop .stat-value { font-size: 1.2rem; }
.modal-profile-backdrop .stat-box:first-child { transform: translateY(-4px); }
.popover-currency-switcher {
  display: flex;
  gap: 5px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.popover-currency-switcher .profile-curr-chip {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 7px;
  background: #121214;
  color: #a1a1aa;
  font-size: .82rem;
  cursor: pointer;
}
.popover-currency-switcher .profile-curr-chip:hover,
.popover-currency-switcher .profile-curr-chip.active {
  background: #6d5dfc;
  border-color: #6d5dfc;
  color: #fff;
}
.modal-profile-backdrop .stat-box:first-child {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #252532 0%, #1a1a1e 70%);
  border: 1px solid rgba(109, 93, 252, .38);
  box-shadow: 0 8px 20px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.05);
}
.modal-profile-backdrop .stat-box:first-child::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: linear-gradient(90deg, #6d5dfc, #887cff, transparent);
}
.modal-profile-backdrop .stat-box:first-child .stat-title {
  color: #c4c4d0;
  font-size: .74rem;
  letter-spacing: .02em;
}
.modal-profile-backdrop .stat-box:first-child .stat-value {
  color: #fff;
  text-shadow: 0 0 16px rgba(136,124,255,.45);
}

/* Чистый вариант карточки баланса */
.modal-profile-backdrop .stat-box:first-child {
  padding: 12px 14px 10px;
  background: #202024;
  border: 1px solid #2b2b31;
  border-radius: 10px;
  box-shadow: none;
}
.modal-profile-backdrop .stat-box:first-child::before { display: none; }
.modal-profile-backdrop .stat-box:first-child .stat-header {
  margin-bottom: 4px;
  align-items: center;
}
.modal-profile-backdrop .stat-box:first-child .stat-icon-badge {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: #2b293f;
  color: #887cff;
}
.modal-profile-backdrop .stat-box:first-child .stat-value {
  font-size: 1.35rem;
  line-height: 1.25;
  color: #f4f4f5;
  text-shadow: none;
}
.popover-currency-switcher {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #303036;
}
.popover-currency-switcher .profile-curr-chip {
  height: 26px;
  background: #18181b;
  border-color: #303036;
  border-radius: 6px;
  justify-content: center;
  text-align: center;
}
.modal-profile-backdrop .stat-box:first-child {
  border: 0;
  border-radius: 2px;
}
.modal-profile-backdrop .stat-box:first-child { transform: translateY(-12px); }
.profile-connect-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
  transform: translateY(-10px);
}
.profile-connect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 30px;
  padding: 5px 6px;
  border: 1px solid #303036;
  border-radius: 4px;
  background: #18181b;
  color: #b7b7c2;
  font-size: .66rem;
  font-weight: 700;
  cursor: pointer;
}
.profile-connect-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.profile-connect-btn:hover {
  background: #fff;
  border-color: #fff;
  color: #111114;
}
.profile-connect-btn:hover svg { color: #111114; }
.modal-profile-backdrop { top: 76px; }
@media (max-width: 760px) {
  .modal-profile-backdrop { top: 76px; }
}
.modal-profile-backdrop { top: 81px; }

/* Popover профиля без полноэкранного модального фона */
.modal-profile-backdrop {
  top: 81px;
  left: auto;
  right: 24px;
  width: 310px;
  height: auto;
  min-height: 0;
  padding: 0;
  display: block;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}
.modal-profile-backdrop .modal-profile-card {
  width: 310px;
  transform: translateY(-8px) scale(.96);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  pointer-events: auto;
}
.modal-profile-backdrop.active .modal-profile-card { transform: translateY(0) scale(1); }

@media (max-width: 760px) {
  .site-header .profile-header-btn { width: 34px; padding: 0; }
  .site-header .profile-header-btn span { display: none; }
  .modal-profile-backdrop { top: 81px; right: 10px; width: calc(100vw - 20px); }
  .modal-profile-backdrop .modal-profile-card { width: 100%; }
}

/* Финальная компоновка главной страницы */
.hero-section-clean { padding: 92px 0 70px; }
.hero-container-clean { max-width: 1240px; }
.hero-content-center {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: minmax(300px, .68fr) minmax(560px, 1.32fr);
  gap: 0 44px;
  align-items: center;
  text-align: left;
}
.hero-content-center .hero-title { grid-column: 1; grid-row: 1; margin-bottom: 20px; }
.hero-content-center .hero-subtitle { grid-column: 1; grid-row: 2; margin-bottom: 28px; }
.hero-content-center .hero-actions { grid-column: 1; grid-row: 3; }
.hero-actions-center { justify-content: flex-start; }
.homepage-video-card {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 100%;
  margin: 0;
  padding: 11px;
  transform: none;
  border-radius: 14px;
  background: #151519;
  border: 1px solid #303038;
  box-shadow: 0 22px 50px rgba(0,0,0,.3);
}
.homepage-video-card:hover { transform: translateY(-3px); }
.homepage-video-heading { padding: 4px 7px 12px; }
@media (max-width: 900px) {
  .hero-content-center { grid-template-columns: 1fr; text-align: center; gap: 0; }
  .hero-content-center .hero-title,
  .hero-content-center .hero-subtitle,
  .hero-content-center .hero-actions,
  .homepage-video-card { grid-column: 1; }
  .hero-content-center .hero-title { grid-row: auto; }
  .hero-content-center .hero-subtitle { grid-row: auto; }
  .hero-content-center .hero-actions { grid-row: auto; }
  .hero-actions-center { justify-content: center; }
  .homepage-video-card { grid-row: auto; margin-top: 34px; }
}

/* Информационный блок главной страницы */
.homepage-info-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr repeat(2, 1fr);
  gap: 12px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.homepage-info-heading {
  grid-row: span 2;
  padding: 8px 18px 8px 0;
}
.homepage-section-label {
  display: block;
  margin-bottom: 10px;
  color: #a99fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.homepage-info-heading h2 {
  max-width: 300px;
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.2;
}
.homepage-info-heading p { max-width: 300px; color: #8f8f99; font-size: .82rem; }
.homepage-feature-card {
  min-height: 142px;
  padding: 16px;
  background: #1c1c20;
  border: 1px solid #2b2b31;
  border-radius: 9px;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.homepage-feature-card:hover {
  background: #202025;
  border-color: #4a4563;
  transform: translateY(-2px);
}
.homepage-feature-card svg {
  width: 19px;
  height: 19px;
  margin-bottom: 10px;
  color: #a99fff;
}
.homepage-feature-card h3 { margin-bottom: 5px; font-size: .87rem; }
.homepage-feature-card p { color: #92929c; font-size: .74rem; line-height: 1.5; }
.homepage-info-heading { grid-row: span 3; }
.homepage-feature-card:last-child { grid-column: 2 / -1; }
@media (max-width: 900px) {
  .homepage-info-grid { grid-template-columns: repeat(2, 1fr); margin-top: 38px; }
  .homepage-info-heading { grid-column: 1 / -1; grid-row: auto; padding: 0 0 8px; }
  .homepage-info-heading h2, .homepage-info-heading p { max-width: none; }
  .homepage-feature-card:last-child { grid-column: auto; }
}
@media (max-width: 520px) {
  .homepage-info-grid { grid-template-columns: 1fr; }
}

/* Компоновка hero поверх базовых стилей */
.hero-content-center {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(300px, .68fr) minmax(540px, 1.32fr);
  gap: 0 44px;
  align-items: center;
  text-align: left;
}
.hero-content-center .hero-title { grid-column: 1; grid-row: 1; }
.hero-content-center .hero-subtitle { grid-column: 1; grid-row: 2; }
.hero-content-center .hero-actions { grid-column: 1; grid-row: 3; }
.hero-content-center .homepage-video-card { grid-column: 2; grid-row: 1 / span 3; }
.hero-actions-center { justify-content: flex-start; }
.homepage-video-card {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.homepage-video { border-radius: 0; }
@media (max-width: 900px) {
  .hero-content-center { grid-template-columns: 1fr; text-align: center; }
  .hero-content-center .hero-title,
  .hero-content-center .hero-subtitle,
  .hero-content-center .hero-actions,
  .hero-content-center .homepage-video-card { grid-column: 1; grid-row: auto; }
  .hero-actions-center { justify-content: center; }
}
@media (max-width: 900px) {
  .hero-content-center .homepage-video-card,
  .hero-content-center .homepage-info-grid { grid-column: 1; width: 100%; }
  .homepage-info-grid { grid-template-columns: 1fr; min-width: 0; }
  .homepage-feature-card { min-width: 0; }
}

/* ================= 15. Admin Panel Styles ================= */
.header-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
  transition: all var(--transition-fast);
}

.header-admin-btn:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.4) 0%, rgba(168, 85, 247, 0.4) 100%);
  border-color: #ef4444;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.35);
}

.badge-admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modal-admin-card {
  width: 95%;
  max-width: 980px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.admin-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-title-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-subtext {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.admin-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.admin-tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-tab-btn.active {
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.5);
  color: #fff;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.15);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-search-box {
  flex: 1;
  max-width: 400px;
  position: relative;
  display: flex;
  align-items: center;
}

.admin-search-box input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 9px 14px 9px 38px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.admin-search-box input:focus {
  border-color: var(--accent-purple);
}

.admin-search-box svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

.admin-users-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(18, 20, 26, 0.85);
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.admin-users-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.admin-users-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  vertical-align: middle;
}

.admin-users-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.table-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #252c3b;
  flex-shrink: 0;
}

.table-user-name {
  font-weight: 700;
  color: #fff;
}

.table-user-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.admin-stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .admin-stats-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.admin-stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.admin-stat-val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.admin-stat-val.highlight-blue { color: var(--accent-blue); }
.admin-stat-val.highlight-amber { color: var(--accent-amber); }
.admin-stat-val.highlight-emerald { color: var(--accent-emerald); }
.admin-stat-val.highlight-cyan { color: var(--accent-cyan); }

.admin-stat-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.admin-config-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  max-width: 720px;
}

.admin-config-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.admin-config-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.admin-input-group {
  margin-bottom: 16px;
}

.admin-input-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.admin-input-text {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
}

.admin-input-text:focus {
  border-color: var(--accent-purple);
}

.admin-config-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 28px;
}

.admin-sql-helper {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.sql-helper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.btn-copy-sql {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-medium);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-copy-sql:hover {
  background: rgba(255, 255, 255, 0.15);
}

.sql-code-block {
  margin: 0;
  padding: 12px;
  background: rgba(10, 12, 16, 0.9);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #a7f3d0;
  line-height: 1.45;
  overflow-x: auto;
}

/* User Edit Modal */
.modal-admin-user-card {
  max-width: 480px;
}

.edit-user-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
}

.edit-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #252c3b;
}

.edit-user-id {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.edit-field-group {
  margin-bottom: 16px;
}

.edit-field-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-with-quick-adjust {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-adjust-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-adjust {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-adjust:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-adjust-reset {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.edit-roles-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.role-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
