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

@font-face{
    font-family: "DrukWideCyWeb-Bold";
    src: url("font/DrukWideCyWeb-Bold.eot");
    src: url("font/DrukWideCyWeb-Bold.eot?#iefix")format("embedded-opentype"),
	    url("font/DrukWideCyWeb-Bold.woff")format("woff"),
	    url("font/DrukWideCyWeb-Bold.woff2")format("woff2"),
	    url("font/DrukWideCyWeb-Bold.ttf")format("truetype"),
	    url("font/DrukWideCyWeb-Bold.svg#DrukWideCyWeb-Bold")format("svg");
	font-weight:normal;
	font-style:normal;
	font-display:swap;
}

:root {
  /* Dark theme colors */
  --bg-dark: #0a0a0f;
  --bg-darker: #050508;
  --bg-card: rgba(15, 15, 25, 0.7);
  --bg-card-hover: rgba(20, 20, 35, 0.85);
  --glass-bg: rgba(10, 10, 20, 0.5);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.05);
  
  /* Нейтральный акцент в тоне сайта */
  --accent: rgba(255, 255, 255, 0.9);
  --accent-hover: #ffffff;
  --accent-light: rgba(255, 255, 255, 0.08);
  --accent-glow: transparent;
  
  /* Text colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --headline-color: #ffffff;
  
  /* Border radius */
  --radius: 24px;
  --radius-lg: 32px;
  --radius-sm: 16px;
  --radius-xs: 12px;
  
  /* Shadows */
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(0, 0, 0, 0.4);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--bg-darker);
  font-family: 'Manrope', -apple-system, sans-serif;
  font-weight: 500;
  color: var(--text-secondary);
  min-height: 100vh;
  position: relative;
}

/* Background image layer */
#bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  transition: opacity 0.5s ease;
}

/* Overlay gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: radial-gradient(circle at 50% 50%, rgba(10, 10, 20, 0.8), rgba(5, 5, 8, 0.95));
  pointer-events: none;
}

/* Brand marquee — крестом по диагонали, перекрестие по центру (приоритет над overlay) */
.brand-marquee-cross {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.12;
}

.brand-marquee-cross .brand-marquee-line {
  position: absolute;
  top: 0;
  left: 70%;
  width: 200vmax;
  height: 48px;
  margin-left: -100vmax;
  margin-top: -24px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.brand-marquee-cross .brand-marquee-line-1 {
  transform: rotate(346deg);
  top: 23rem;
}

.brand-marquee-cross .brand-marquee-line-2 {
  transform: rotate(13deg);
  top: 20rem;
}

.brand-marquee-cross .brand-marquee-content {
  display: flex;
  gap: 80px;
  white-space: nowrap;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.brand-marquee-cross .brand-marquee-content span {
  display: inline-block;
  flex-shrink: 0;
  color: inherit;
}

.brand-marquee-cross .brand-marquee-line-1 .brand-marquee-content {
  animation: marquee 50s linear infinite;
}

.brand-marquee-cross .brand-marquee-line-2 .brand-marquee-content {
  animation: marquee-reverse 50s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes marquee-reverse {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

/* Hero: title + slot (hosting: "Гоним серваки до 6.1 ГГц" | arch browser / chart / console) */
.hero-title-model-row {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

@media (max-width: 900px) {
  .hero-title-model-row { flex-direction: column; align-items: flex-start; }
  .hero-model-slot { min-width: 100%; max-width: 100%; transform: none; }
}
.hero-chart-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero-online-chart canvas {
  flex: 1;
  width: 100%;
  min-height: 140px;
  border-radius: 8px;
}
.console-terminal-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 10px;
  overflow: hidden;
}
.console-output-hero {
  flex: 1;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 14px;
  font-family: 'Consolas', 'Monaco', 'Ubuntu Mono', monospace;
  font-size: 11px;
  line-height: 1.5;
  color: #7ee787;
  background: #0d1117;
  white-space: pre-wrap;
  word-break: break-all;
}
/* Кастомный скроллбар для консоли */
.console-output-hero::-webkit-scrollbar {
  width: 8px;
}
.console-output-hero::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}
.console-output-hero::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.console-output-hero::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
.console-output-hero {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) rgba(255, 255, 255, 0.04);
}

/* Header + Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-top: 20px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
  transition: var(--transition);
}

.header.scrolled {
  padding-top: 0 !important;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 28px;
  border-radius: var(--radius);
  background: rgba(10, 10, 20, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  pointer-events: auto;
  transition: var(--transition);
}

.header.scrolled .nav {
  max-width: 100%;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-right: none;
  background: rgba(10, 10, 20, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: var(--transition);
}

.logo:hover {
  color: var(--text-primary);
  opacity: 0.8;
}

.logo span {
  transform: translateY(1px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  position: relative;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger .nav-dropdown-arrow {
  font-size: 0.65rem;
  margin-left: 6px;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown.open .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 8px 0 0;
  padding: 8px 0;
  min-width: 280px;
  background: var(--bg-darker);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu .nav-dropdown-item {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  direction: ltr;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-dropdown-item > i:first-child {
  flex-shrink: 0;
  order: 0;
}

.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-dropdown-item i {
  font-size: 1.1rem;
  margin-top: 2px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-dropdown-item:hover i {
  color: var(--text-primary);
}

.nav-dropdown-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-dropdown-item-text strong {
  font-size: 0.95rem;
  color: inherit;
}

.nav-dropdown-item-text small {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.nav-dropdown-item:hover .nav-dropdown-item-text small {
  color: var(--text-secondary);
}

.nav-dropdown-item-disabled {
  cursor: not-allowed;
  opacity: 0.65;
  pointer-events: none;
}

.nav-dropdown-item-disabled .nav-dropdown-item-text strong,
.nav-dropdown-item-disabled .nav-dropdown-item-text small {
  color: var(--text-muted);
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: var(--radius-xs);
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  position: relative;
  display: block;
}

.nav-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 6px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.nav-links a.nav-dropdown-trigger::after {
  display: none;
}

.nav-links a:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.nav-links a:hover::before {
  opacity: 1;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::before {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active::after {
  transform: scaleX(1);
  background: rgba(255, 255, 255, 0.4);
}

.nav-link-login {
  margin-left: 8px;
  padding: 6px 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.nav-link-login:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav-link-profile-icon {
  padding: 8px 10px !important;
}
.nav-link-profile-icon .fa-user {
  margin: 0;
}
.nav-dropdown-item-btn {
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: row;
  direction: ltr;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 18px;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-item-btn > i:first-child {
  flex-shrink: 0;
  order: 0;
}
.nav-dropdown-item-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.nav-dropdown-item-btn {
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.nav-dropdown-item-btn i {
  font-size: 1.1rem;
  margin-top: 2px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.nav-dropdown-item-btn:hover i {
  color: var(--text-primary);
}
.nav-dropdown-profile .nav-dropdown-menu {
  left: auto;
  right: 0;
  min-width: 180px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  flex-direction: row;
  direction: ltr;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn > i:first-child {
  flex-shrink: 0;
  order: 0;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  transition: var(--transition);
}

.btn:hover::before {
  opacity: 1;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
  background: var(--accent-light);
  color: var(--text-primary);
  border-color: var(--glass-border);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-lg i {
  font-size: 1.1rem;
}

/* Glass panels — без фона/блюра по умолчанию */
.glass {
  background: transparent;
  border: none;
  box-shadow: none;
}

.glass-panel,
.glass-card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: var(--radius);
}

.glass-card {
  padding: 24px 28px;
}

/* Hero section */
.hero-banner {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 120px 32px 100px;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-banner.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  padding: 60px 0 80px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  align-items: start;
}

.hero-overlay {
  position: relative;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  width: 90%;
  max-width: 1200px;
  min-height: 400px;
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.hero-title-model-row {
  display: flex;
  align-items: stretch;
  gap: 40px;
  width: 100%;
  flex-wrap: wrap;
}

/* Слева — заголовок "Гоним серваки до 6.1 ГГц", справа — блок с консолью Arch (+15% размер) */
.hero-model-slot {
  position: fixed;
  left: 50%;
  flex: 1 1 483px;
  width: min(736px, 48vw);
  min-width: 45%;
  max-width: 736px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: transparent;
  transform: perspective(900px) rotateY(-4deg) rotateX(2deg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}



.hero-arch-browser {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-darker);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-sizing: border-box;
}

/* Установка Arch — во весь фрейм */
.hero-arch-console {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.console-terminal-arch {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  overflow: hidden;
}

.console-terminal-arch .console-header {
  flex-shrink: 0;
}

.console-output-arch {
  flex: 1 1 0;
  min-height: 0;
  margin: 0;
  padding: 12px 14px;
  font-family: 'Consolas', 'Monaco', 'Ubuntu Mono', monospace;
  font-size: 10px;
  line-height: 1.45;
  color: #7ee787;
  background: #0d1117;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.console-output-arch .line-prompt { color: #79c0ff; }
.console-output-arch .line-dim { color: #8b949e; }
.console-output-arch .line-accent { color: #d2a8ff; }

/* BIOS и загрузка после установки Arch */
.hero-arch-bios,
.hero-arch-boot {
  position: absolute;
  inset: 0;
  display: none;
  background: #000;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}

.hero-bios-screen {
  margin: 0;
  padding: 16px 20px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 11px;
  line-height: 1.5;
  color: #00aaee;
  background: #000;
  white-space: pre-wrap;
  border: none;
}

.hero-arch-boot {
  flex-direction: column;
  gap: 24px;
  background: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
}

.hero-arch-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-arch-logo {
  width: 120px;
  height: 120px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120"><rect fill="%231793d1" width="120" height="120" rx="12"/><text x="60" y="78" font-family="sans-serif" font-size="72" font-weight="bold" fill="%23fff" text-anchor="middle">A</text></svg>') center/contain no-repeat;
}

.hero-arch-progress-wrap {
  width: 80%;
  max-width: 280px;
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  overflow: hidden;
}

.hero-arch-progress-bar {
  height: 100%;
  width: 0%;
  background: #1793d1;
  border-radius: 4px;
  transition: width 0.05s linear;
}

/* Рабочий стол после установки Arch */
.hero-arch-desktop {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: var(--radius-sm);
}

.hero-arch-desktop.visible {
  display: flex;
}

.arch-desktop-wallpaper {
  position: absolute;
  inset: 0;
  background: url('/img/13.png') center/cover no-repeat;
  pointer-events: none;
}

.arch-desktop-wallpaper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 10, 25, 0.75) 0%, rgba(5, 5, 15, 0.6) 100%);
  pointer-events: none;
}

/* Левая панель в стиле Linux (dock / dash) */
.arch-desktop-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 52px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.arch-desktop-panel .arch-panel-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  font-size: 1.2rem;
}

.arch-desktop-panel .arch-panel-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: scale(1.08);
}

.arch-desktop-panel .arch-panel-icon.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.arch-desktop-panel .arch-panel-sep {
  width: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 6px 0;
  flex-shrink: 0;
}

.arch-desktop-icons {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px 16px;
  padding: 18px 18px 18px 70px;
  align-content: start;
  justify-items: start;
}

.arch-desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  max-width: 72px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.72rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  font-family: inherit;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.arch-desktop-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.02);
}

.arch-desktop-icon:active {
  background: rgba(255, 255, 255, 0.08);
}

.arch-desktop-icon i {
  font-size: 1.6rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.arch-desktop-icon span {
  line-height: 1.2;
  word-break: break-word;
}

/* Окно блокнота — 16:9 */
.hero-notepad-window {
  left: 200px;
  top: 120px;
}

.hero-notepad-window .hero-window-drag,
.hero-doom-window .hero-window-drag {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.hero-window-close {
  margin-left: auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: rgba(255,255,255,0.1);
  color: var(--text-secondary);
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.hero-window-close:hover {
  background: rgba(255,255,255,0.2);
  color: var(--text-primary);
}

.win-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.win-btn-fullscreen,
.win-btn-volume {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: rgba(255,255,255,0.08);
  color: inherit;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.win-btn-fullscreen:hover,
.win-btn-volume:hover {
  background: rgba(255,255,255,0.15);
}

.win-btn-fullscreen i,
.win-btn-volume i {
  font-size: 0.85rem;
}

.win-volume-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.win-volume-slider {
  width: 60px;
  height: 6px;
  accent-color: var(--text-primary);
  cursor: pointer;
}

.hero-terminal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0d1117;
}

.hero-terminal-window .hero-terminal-output {
  flex: 1;
  margin: 0;
  padding: 12px 14px 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #7ee787;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.hero-terminal-window .hero-terminal-output .term-dim { color: #8b949e; }
.hero-terminal-window .hero-terminal-output .term-accent { color: #79c0ff; }
.hero-terminal-window .hero-terminal-output .term-prompt { color: #7ee787; }
.hero-terminal-window .hero-terminal-output .term-red { color: #ff7b72; }
.hero-terminal-window .hero-terminal-output .term-yellow { color: #d29922; }
.hero-terminal-window .hero-terminal-output .term-cyan { color: #39c5cf; }
.hero-terminal-window .hero-terminal-output .term-green { color: #3fb950; }
.hero-terminal-window .hero-terminal-output .term-magenta { color: #bc8cff; }

.hero-terminal-body.term-focus-mode {
  background: #0a0e14;
  box-shadow: inset 0 0 0 1px rgba(57, 197, 207, 0.25);
}
.hero-terminal-body.term-focus-mode .hero-terminal-output {
  color: #39c5cf;
}

/* Скроллбар терминала */
.hero-terminal-body .hero-terminal-output {
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 231, 135, 0.4) transparent;
}
.hero-terminal-body .hero-terminal-output::-webkit-scrollbar {
  width: 8px;
}
.hero-terminal-body .hero-terminal-output::-webkit-scrollbar-track {
  background: transparent;
}
.hero-terminal-body .hero-terminal-output::-webkit-scrollbar-thumb {
  background: rgba(126, 231, 135, 0.35);
  border-radius: 4px;
}
.hero-terminal-body .hero-terminal-output::-webkit-scrollbar-thumb:hover {
  background: rgba(126, 231, 135, 0.55);
}

.hero-terminal-line {
  display: flex;
  align-items: center;
  padding: 4px 14px 12px;
  gap: 0;
}

.hero-terminal-prompt {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #7ee787;
  flex-shrink: 0;
}

.hero-terminal-input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0 0 0 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #7ee787;
  background: transparent;
  border: none;
  outline: none;
  caret-color: #7ee787;
}

.hero-terminal-input::placeholder {
  color: rgba(126, 231, 135, 0.4);
}

/* Стили окон: только Mac и Windows 10 */
.win-style-mac .hero-window-titlebar {
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.win-style-mac .win-buttons .wb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: filter 0.15s ease;
}
.win-style-mac .win-buttons .wb:hover { filter: brightness(1.2); }
.win-style-mac .win-buttons .wb-close { background: #ff5f57; }
.win-style-mac .win-buttons .wb-min,
.win-style-mac .win-buttons .wb-max { display: none; }
.win-style-mac .hero-window-close { display: none; }
.win-style-mac .win-title { color: var(--text-primary); margin-left: 4px; }

.hero-notepad-textarea {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 12px;
  background: #0d1117;
  border: none;
  color: #c9d1d9;
  font-family: 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: none;
  outline: none;
}

/* Окна игр — 16:9 */
.hero-doom-window,
.hero-game-window {
  left: 100px;
  top: 80px;
}

.hero-doom-window .hero-window-drag {
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.hero-doom-frame-wrap {
  flex: 1;
  min-height: 0;
  background: #000;
  position: relative;
  overflow: hidden;
}

.hero-doom-frame-wrap .hero-game-iframe {
  width: 100%;
  height: 100%;
  min-height: 200px;
  border: none;
  display: block;
  overflow: hidden;
}

.hero-doom-frame-wrap::-webkit-scrollbar {
  display: none;
}

/* Окно игры с фиксированными размерами (data-width/data-height задаются в JS) */
.hero-game-window[data-width][data-height] {
  aspect-ratio: auto;
}

.hero-floating-window.win-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none;
  border-radius: 0;
  aspect-ratio: auto;
}

/* Окна поверх консоли Arch — перетаскиваемые, соотношение 16:9, ширина ~600px */
.hero-floating-window {
  position: fixed !important;
  aspect-ratio: 16 / 9;
  width: 600px;
  height: auto;
  min-height: 280px;
  left: 80px;
  top: 100px;
  display: none;
  flex-direction: column;
  background: var(--bg-darker);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--glass-border);
  transition: opacity 0.2s ease, visibility 0.2s ease;
  transform-origin: center center;
}

.hero-online-chart,
.hero-console-window,
.hero-notepad-window,
.hero-terminal-window,
.hero-doom-window,
.hero-game-window {
  width: 600px;
}

.hero-terminal-window {
  width: 690px;
}

.hero-console-window { z-index: 1001; }

.hero-online-chart.visible,
.hero-console-window.visible,
.hero-notepad-window.visible,
.hero-terminal-window.visible,
.hero-doom-window.visible,
.hero-game-window.visible {
  display: flex;
  padding: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Общий заголовок окна — за него таскаем */
.hero-window-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  flex-shrink: 0;
  cursor: move;
  user-select: none;
  min-height: 36px;
}

.hero-window-titlebar .win-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.hero-window-titlebar .win-title {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: inherit;
}

.hero-online-chart .hero-chart-header,
.hero-console-window .console-header {
  cursor: move;
  user-select: none;
}

.hero-online-chart .hero-chart-header {
  flex-shrink: 0;
  padding: 8px 10px;
}

.hero-online-chart .hero-chart-header .win-title { flex: 0 1 auto; }
.hero-online-chart .hero-chart-header .hero-chart-range { margin-left: auto; }

.hero-online-chart canvas {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.hero-console-window .console-terminal-hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hero-console-window .console-output-hero {
  flex: 1;
  max-height: none;
  min-height: 0;
}

.hero-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 8px;
  flex-shrink: 0;
}

.hero-chart-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.hero-chart-range {
  display: flex;
  gap: 4px;
}

.hero-chart-range-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.hero-chart-range-btn:hover {
  color: var(--text-secondary);
  border-color: rgba(255,255,255,0.2);
}

.hero-chart-range-btn.active {
  background: var(--accent-light);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

.hero-content {
  width: 50%;
  max-width: 50%;
  padding: 48px 40px 48px 0;
  position: relative;
  z-index: 1;
  background: transparent;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.hero-banner.visible .hero-content {
  opacity: 1;
  transform: translateX(0);
}

.hero-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hero-title em {
  color: var(--text-primary);
  font-style: normal;
  opacity: 0.9;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 32px;
  max-width: 520px;
  line-height: 1.7;
}

.hero-visual {
  display: flex;
  justify-content: center;
  margin-top: 0;
  width: 100%;
  max-width: 100%;
}

.hero-info-block {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 48px 40px;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
  text-align: left;
}

.hero-banner.visible .hero-info-block {
  opacity: 1;
  transform: translateY(0);
}

/* Standalone pages: hero always visible (no map section) */
.hero-banner.hero-banner-visible {
  display: flex !important;
  opacity: 1;
  transform: translateY(0);
}
.hero-banner.hero-banner-visible .hero-content,
.hero-banner.hero-banner-visible .hero-info-block {
  opacity: 1;
  transform: none;
}
/* Окошко карты на вкладке «Истребитель демонов» — показываем (на standalone странице нет .visible, есть .hero-banner-visible) */
.hero-banner.hero-banner-visible .hero-player-preview .preview-frame-wrap {
  opacity: 1;
}

/* --- Главная: один экран без прокрутки (старый hero с 3D-чеком) --- */
.main-page-wrap.hero-page-legacy {
  position: relative;
  z-index: 10;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-banner-main {
  position: relative;
  z-index: 20;
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 100px 32px 80px;
}

.hero-with-cards .hero {
  padding: 0;
  max-width: 100%;
  width: 100%;
}

.hero-overlay-with-cards {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
}

.hero-row-with-cards {
  display: flex;
  align-items: center;
  flex: 1;
  width: 100%;
  gap: 0;
  flex-wrap: nowrap;
}

.hero-with-cards .hero-content {
  flex: 0 1 auto;
  max-width: 520px;
  min-width: 0;
  padding: 48px 32px 48px 0;
}

.hero-drawn-slot {
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  opacity: 0;
  overflow: visible;
  transition: flex 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, width 0.5s ease;
}

.hero-drawn-slot.has-card {
  position: fixed;
  left: 65%;
  top: 50%;
  transform: translate(-50%, -50%);
  flex: none;
  width: 200px;
  min-width: 200px;
  height: 280px;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 100;
}

/* Холст с разбросанными картами на весь экран, под блоком текста */
.page-cards-deck {
  position: fixed;
  inset: 0;
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 5;
  pointer-events: none;
}

.page-cards-deck > .hero-dev-card {
  pointer-events: auto;
}

/* Карта в разбросе: минимум в 2 раза больше, позиция и угол через CSS-переменные (задаются в JS) */
.hero-dev-card {
  position: absolute;
  left: var(--scatter-left, 50%);
  top: var(--scatter-top, 50%);
  width: 200px;
  height: 280px;
  transform: translate(-50%, -50%) rotate(var(--scatter-rotate, 0deg));
  transform-origin: center center;
  cursor: pointer;
  transition: transform 0.22s ease, z-index 0.2s, opacity 0.25s ease, visibility 0.25s ease;
  z-index: 1;
  opacity: 0;
}

.page-cards-deck.hero-cards-fan-out .hero-dev-card {
  opacity: 1;
}

.hero-dev-card:hover {
  z-index: 20;
  transform: translate(-50%, -50%) rotate(var(--scatter-rotate, 0deg)) scale(1.05);
}

.hero-dev-card:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.hero-dev-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero-dev-card-back,
.hero-dev-card-front {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  backface-visibility: hidden;
}

.hero-dev-card-back {
  background: linear-gradient(145deg, #1a1520 0%, #0f0d12 50%, #16121c 100%);
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5L35 20h15l-12 10 5 15-13-9-13 9 5-15L10 20h15L30 5z' fill='%23fff' fill-opacity='0.08'/%3E%3C/svg%3E");
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-dev-card-front {
  background: var(--bg-card) center/cover no-repeat;
  background-image: var(--card-avatar), linear-gradient(180deg, rgba(10,10,20,0.6) 0%, rgba(5,5,10,0.9) 100%);
  transform: rotateY(180deg);
}

.hero-dev-card.drawn .hero-dev-card-inner {
  transform: rotateY(180deg);
}

/* Появление разбросанных карт */
@keyframes cardScatterIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--scatter-rotate, 0deg)) scale(0.3);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--scatter-rotate, 0deg)) scale(1);
  }
}

.page-cards-deck.hero-cards-fan-out .hero-dev-card {
  animation: cardScatterIn 0.5s ease-out both;
}
.page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(1) { animation-delay: 0.05s; }
.page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(2) { animation-delay: 0.1s; }
.page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(3) { animation-delay: 0.15s; }
.page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(4) { animation-delay: 0.2s; }
.page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(5) { animation-delay: 0.25s; }
.page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(6) { animation-delay: 0.3s; }
.page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(7) { animation-delay: 0.35s; }
.page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(8) { animation-delay: 0.4s; }

/* Вытянутая карта в слоте (тот же размер, что в разбросе) */
.hero-drawn-slot .hero-dev-card {
  position: relative;
  right: auto;
  bottom: auto;
  opacity: 1;
  width: 200px;
  height: 280px;
  cursor: default;
  transform: none;
}

/* Вытянутая карта в слоте всегда лицевой стороной (аватар) */
.hero-drawn-slot .hero-dev-card .hero-dev-card-inner {
  transform: rotateY(180deg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.hero-drawn-slot .hero-dev-card .hero-dev-card-back {
  visibility: hidden;
}

.hero-drawn-slot .hero-dev-card .hero-dev-card-front {
  backface-visibility: visible;
}

/* Летящая карта (клонируется в JS, уезжает за край затем приезжает в слот) */
.hero-card-fly {
  position: fixed;
  z-index: 100;
  width: 200px;
  height: 280px;
  transition: none;
  pointer-events: none;
}
.hero-card-fly .hero-dev-card-inner {
  transform: rotateY(180deg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.hero-card-fly .hero-dev-card-back { visibility: hidden; }
.hero-card-fly .hero-dev-card-front { backface-visibility: visible; }

.hero-drawn-slot .hero-dev-card {
  animation: none;
}

/* Карта, которая сейчас в слоте — в разбросе не показываем */
.hero-dev-card.drawn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero-developer {
  display: none;
}

.hero-developer.visible {
  display: block;
}

.hero-default.hidden {
  display: none;
}

.hero-dev-bio {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .hero-row-with-cards {
    flex-wrap: wrap;
  }
  .hero-with-cards .hero-content {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .hero-drawn-slot.has-card {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    order: -1;
    justify-content: center;
  }
  .hero-dev-card {
    width: 72px;
    height: 100px;
  }
  .page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(1) { --fan-x: 0;    --fan-y: 0;   --fan-dx: 8px;  --fan-dy: -16px; }
  .page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(2) { --fan-x: -18px; --fan-y: -3px;  --fan-dx: 8px;  --fan-dy: -16px; }
  .page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(3) { --fan-x: -34px; --fan-y: -12px; --fan-dx: 10px; --fan-dy: -18px; }
  .page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(4) { --fan-x: -46px; --fan-y: -27px; --fan-dx: 10px; --fan-dy: -20px; }
  .page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(5) { --fan-x: -55px; --fan-y: -46px; --fan-dx: 8px;  --fan-dy: -20px; }
  .page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(6) { --fan-x: -58px; --fan-y: -69px; --fan-dx: 6px;  --fan-dy: -20px; }
  .page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(7) { --fan-x: -54px; --fan-y: -94px; --fan-dx: 6px;  --fan-dy: -18px; }
  .page-cards-deck.hero-cards-fan-out .hero-dev-card:nth-child(8) { --fan-x: -44px; --fan-y: -118px; --fan-dx: 4px;  --fan-dy: -16px; }
}

.hero-info-block h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero-info-block h4 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero-info-block p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.hero-info-block .btn {
  margin-top: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-note i {
  color: var(--text-secondary);
}

.hero-info-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-info-block li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.9;
  padding-left: 28px;
  position: relative;
  margin-bottom: 10px;
}

.hero-info-block li:before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* Hosting block: relative для корректного позиционирования летающего указателя (stat-fly-wrap) */
#hosting-block {
  position: relative;
}

/* Hosting specific styles */
.hosting-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.stat-card {
  padding: 24px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border);
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-family: 'Unbounded', sans-serif;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-card-players,
.stat-card-ghz {
  position: relative;
  cursor: pointer;
}

/* Намёк, что карточку можно нажать — без обводки, мягко */
.stat-card-players::after,
.stat-card-ghz::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
}

.stat-card-players:hover::after,
.stat-card-ghz:hover::after {
  opacity: 1;
}

.stat-card-players .stat-label,
.stat-card-ghz .stat-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stat-card-players .stat-label::before,
.stat-card-ghz .stat-label::before {
  content: '👆';
  font-size: 0.75em;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.stat-card-players:hover .stat-label::before,
.stat-card-ghz:hover .stat-label::before {
  opacity: 0.7;
}

/* Указатель у карточек онлайна/GHz: летает под углом (3D), поднимается, тыкает с Click/Clack/Тык/Клик; позиция относительно блока — не уплывает при скролле */
.stat-fly-wrap {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  visibility: hidden;
  perspective: 800px;
}
.stat-fly-wrap.stat-fly-visible {
  visibility: visible;
}
.stat-fly-pointer {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  margin-top: -24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.stat-fly-pointer.stat-fly-flying {
  transition-duration: 1s;
  transition-timing-function: cubic-bezier(0.34, 1.2, 0.64, 1);
}
.stat-fly-pointer.stat-fly-rising {
  transition-duration: 1.1s;
  transition-timing-function: cubic-bezier(0.33, 1.1, 0.5, 0.9);
}
.stat-fly-pointer.stat-fly-exit {
  transition-duration: 0.9s;
  transition-timing-function: cubic-bezier(0.5, 0, 0.75, 0);
}
.stat-fly-finger {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  display: block;
  animation: stat-fly-float 0.5s ease-in-out infinite alternate;
}
.stat-fly-pointer.stat-fly-tapping .stat-fly-finger {
  animation: stat-fly-tap-bounce 0.18s ease-out forwards;
}
.stat-fly-pointer.stat-fly-exit .stat-fly-finger {
  animation: none;
}
.stat-fly-click-container {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.stat-fly-click-label {
  position: absolute;
  font-family: 'DrukWideCyWeb-Bold', 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  white-space: nowrap;
  color: #fff;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 0 0 14px rgba(255, 200, 100, 0.9);
  animation: stat-fly-pop 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
}
.stat-fly-click-label span {
  display: inline-block;
  transform: rotate(-6deg);
}
.stat-fly-click-label:nth-child(even) span {
  transform: rotate(7deg);
}
@keyframes stat-fly-float {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-5px) scale(1.08); }
}
@keyframes stat-fly-tap-bounce {
  0% { transform: scale(1); }
  35% { transform: scale(0.82); }
  65% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
@keyframes stat-fly-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.stat-hover-popover {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -12px);
  padding: 16px;
  min-width: 300px;
  background: rgba(8, 8, 14, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.stat-card-players:hover .stat-hover-popover,
.stat-card-ghz:hover .stat-hover-popover {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -8px);
}

.stat-popover-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-popover-chart canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.stat-popover-console {
  min-width: 340px;
  max-width: 420px;
  padding: 0;
  overflow: hidden;
}

.console-terminal {
  background: #0d1117;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.console-header {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.console-dots::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow: 14px 0 0 #ffbd2e, 28px 0 0 #27c93f;
}

.console-output {
  margin: 0;
  padding: 14px;
  font-family: 'Consolas', 'Monaco', 'Ubuntu Mono', monospace;
  font-size: 11px;
  line-height: 1.5;
  color: #7ee787;
  background: #0d1117;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.console-output .line-prompt { color: #79c0ff; }
.console-output .line-err { color: #ff7b72; }
.console-output .line-dim { color: #8b949e; }
.console-output .line-accent { color: #d2a8ff; }
.console-output .line-system { color: #7ee787; font-style: italic; opacity: 0.9; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.pricing-card {
  padding: 32px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  opacity: 0;
  transition: var(--transition);
}

.pricing-card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-lg);
}

.pricing-card:hover::before {
  opacity: 0;
}

.pricing-card.featured {
  border-color: var(--glass-border);
  box-shadow: var(--shadow);
}

.pricing-card.featured::before {
  opacity: 0;
}

.pricing-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.pricing-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.pricing-features li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  padding-left: 24px;
  position: relative;
  margin-bottom: 10px;
}

.pricing-features li:before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--text-secondary);
  opacity: 0.6;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.advantage-item {
  padding: 24px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.advantage-item:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border);
  box-shadow: var(--shadow);
}

.advantage-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

/* Hosting tabs */
.hosting-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0;
}

.hosting-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  margin-bottom: -1px;
}

.hosting-tab:hover {
  color: var(--text-primary);
}

.hosting-tab.active {
  color: var(--text-primary);
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.hosting-tab-content {
  display: none;
}

.hosting-tab-content.active {
  display: block;
}

.hosting-tab-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* Вкладки игр: Garry's Mod / Minecraft — кнопки-картинки с фоном и глассморфизмом */
.game-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.game-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
  padding: 0;
  font-family: inherit;
}
.game-tab:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}
.game-tab-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.game-tab:hover .game-tab-bg {
  transform: scale(1.05);
}
.game-tab-bg-gmod {
  background-image: url("img/noga_gm.jpg");
  background-color: #0f3460;
}
.game-tab-bg-minecraft {
  background-image: url("img/zlwl0qbfqv681.jpg");
  background-color: #1a3d0a;
}
.game-tab-glass {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 20, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}
.game-tab.active .game-tab-glass {
  background: rgba(10, 10, 20, 0.65);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.game-tab-logo {
  position: relative;
  z-index: 1;
  font-family: 'DrukWideCyWeb-Bold', 'Unbounded', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  transition: var(--transition);
}
.game-tab.active .game-tab-logo {
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Указатель «Ткни» — летает под углом, перелетает между кнопками, тыкает с мультяшными подписями */
.tkni-pointer-wrap {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 9999;
  pointer-events: none;
  visibility: hidden;
}
.tkni-pointer-wrap.tkni-visible {
  visibility: visible;
}
.tkni-pointer {
  position: fixed;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  margin-top: -24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.tkni-pointer.tkni-flying {
  transition: transform 0.9s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.tkni-pointer.tkni-rising {
  transition: transform 1s cubic-bezier(0.33, 1.1, 0.5, 0.9);
}
.tkni-finger {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  display: block;
  animation: tkni-float 0.5s ease-in-out infinite alternate;
}
.tkni-pointer.tkni-tapping .tkni-finger {
  animation: tkni-tap-bounce 0.15s ease-out forwards;
}
.tkni-click-container {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.tkni-click-label {
  position: fixed;
  font-family: 'DrukWideCyWeb-Bold', 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  white-space: nowrap;
  color: #fff;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 0 0 12px rgba(255, 200, 100, 0.8);
  animation: tkni-pop 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
}
.tkni-click-label:nth-child(1) { --tkni-hue: 45; }
.tkni-click-label:nth-child(2) { --tkni-hue: 5; }
.tkni-click-label:nth-child(3) { --tkni-hue: 280; }
.tkni-click-label:nth-child(4) { --tkni-hue: 180; }
.tkni-click-label span {
  display: inline-block;
  transform: rotate(-8deg);
}
.tkni-click-label:nth-child(even) span {
  transform: rotate(6deg);
}
@keyframes tkni-float {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-4px) scale(1.05); }
}
@keyframes tkni-tap-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(0.85); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes tkni-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.25);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 560px) {
  .game-tabs {
    grid-template-columns: 1fr;
  }
  .game-tab {
    min-height: 100px;
  }
  .game-tab-logo {
    font-size: 1rem;
    letter-spacing: 0.1em;
  }
}

/* Панели тарифов по играм */
.game-tariffs-pane {
  display: none;
}
.game-tariffs-pane.active {
  display: block;
}

/* Две колонки: список серверов слева, карта справа */
.game-tariffs-with-map {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}
.game-tariffs-list {
  min-width: 0;
}
.game-tariffs-map-wrap {
  position: sticky;
  top: 100px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-darker);
}
.game-tariffs-map-label {
  padding: 10px 14px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}
.game-tariffs-map-label i {
  opacity: 0.8;
}
.game-tariffs-map {
  height: 320px;
  width: 100%;
  min-height: 280px;
}
/* Leaflet в блоке тарифов — тёмная тема */
.game-tariffs-map-wrap .leaflet-popup-content-wrapper {
  background: var(--bg-darker);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
}
.game-tariffs-map-wrap .leaflet-popup-tip {
  background: var(--bg-darker);
}
.game-tariffs-map-wrap .leaflet-container {
  font-family: inherit;
}
@media (max-width: 960px) {
  .game-tariffs-with-map {
    grid-template-columns: 1fr;
  }
  .game-tariffs-map-wrap {
    position: relative;
    top: 0;
    order: -1;
    max-height: 280px;
  }
  .game-tariffs-map {
    height: 260px;
  }
}

/* Игровые тарифы — компактный блок на всю ширину */
.cpu-tariff-block {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: 14px;
  transition: var(--transition);
  overflow: hidden;
}
.cpu-tariff-block:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
.cpu-tariff-block-featured {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}
.cpu-tariff-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}
.cpu-name {
  font-weight: 600;
  color: var(--text-primary);
}
.cpu-badge {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cpu-badge.cpu-intel {
  background: rgba(0, 120, 215, 0.25);
  color: #6eb5ff;
}
.cpu-badge.cpu-amd {
  background: rgba(237, 28, 36, 0.2);
  color: #ff6b6b;
}
.cpu-badge.cpu-oc {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}
.cpu-tariff-body {
  padding: 10px 20px 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.cpu-tariff-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr 120px;
  gap: 12px 20px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.cpu-tariff-row:last-child {
  border-bottom: none;
}
.cpu-tariff-row-head {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding-bottom: 8px;
  margin-bottom: 2px;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.cpu-tariff-row-head i {
  margin-right: 6px;
  opacity: 0.85;
  font-size: 0.7rem;
}
.cpu-tariff-row .col-vcore {
  font-weight: 600;
  color: var(--text-primary);
}
.cpu-tariff-row .col-price {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}
.cpu-tariff-row .col-price small {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.82em;
}
.cpu-tariff-row .col-hint {
  font-size: 0.85em;
  color: var(--text-muted);
}
/* GMod и Minecraft — колонка "Подходит для" с иконкой */
.game-tariffs-pane[data-game="gmod"] .cpu-tariff-row,
.game-tariffs-pane[data-game="minecraft"] .cpu-tariff-row {
  grid-template-columns: 50px 1fr 1fr 100px 1fr;
}
.game-tariffs-pane[data-game="gmod"] .cpu-tariff-row-head .col-hint,
.game-tariffs-pane[data-game="minecraft"] .cpu-tariff-row-head .col-hint {
  grid-column: span 1;
}
@media (max-width: 700px) {
  .cpu-tariff-row {
    grid-template-columns: 50px 1fr 90px;
  }
  .cpu-tariff-row .col-disk {
    display: none;
  }
  .cpu-tariff-row-head .col-disk {
    display: none;
  }
  .game-tariffs-pane[data-game="gmod"] .cpu-tariff-row,
  .game-tariffs-pane[data-game="minecraft"] .cpu-tariff-row {
    grid-template-columns: 50px 1fr 90px 1fr;
  }
  .game-tariffs-pane[data-game="gmod"] .cpu-tariff-row .col-hint,
  .game-tariffs-pane[data-game="minecraft"] .cpu-tariff-row .col-hint {
    grid-column: 1 / -1;
    padding-left: 0;
  }
}
/* Допы (дополнительные опции) — явное разделение с иконками */
.cpu-tariff-addons {
  padding: 12px 20px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.addon-row {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}
.addon-row i {
  width: 18px;
  text-align: center;
  color: var(--text-secondary);
  opacity: 0.9;
  flex-shrink: 0;
}
.addon-row-location i {
  color: #7eb8da;
}
.cpu-tariff-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 10px 20px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.5;
}
.cpu-tariff-footer p {
  margin: 4px 0;
}

/* Игровые тарифы — таблица (legacy) */
.tariff-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}
.tariff-table th,
.tariff-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}
.tariff-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}
.tariff-table td {
  color: var(--text-secondary);
}
.tariff-table tr:hover td {
  color: var(--text-primary);
}
.tariff-table .tariff-name {
  font-weight: 600;
  color: var(--text-primary);
}
.tariff-table .tariff-price {
  font-weight: 600;
  color: var(--text-primary);
}
/* Блок "Входит в тариф" — карточка с иконками */
.included-in-tariff {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}
.included-in-tariff-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.included-in-tariff-title i {
  color: rgba(255, 255, 255, 0.8);
}
.included-in-tariff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px 24px;
}
.included-in-tariff-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.included-in-tariff-item i {
  margin-top: 2px;
  width: 20px;
  text-align: center;
  color: var(--text-primary);
  opacity: 0.85;
  flex-shrink: 0;
}
.game-tariffs-cta {
  margin-top: 24px;
}

.included-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.included-list li {
  padding: 6px 0;
  padding-left: 22px;
  position: relative;
}
.included-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--text-primary);
  opacity: 0.7;
}

/* Конфигуратор */
.configurator-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
  margin: 24px 0;
}
@media (max-width: 900px) {
  .configurator-wrap {
    grid-template-columns: 1fr;
  }
}
.configurator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  align-items: end;
}
.configurator-form label,
.configurator-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.configurator-form select,
.configurator-field select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-darker);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
}
.configurator-form select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}
.configurator-summary {
  margin-top: 0;
  padding: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.configurator-summary-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 24px;
  min-width: 260px;
  border-top: none;
}
.configurator-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.configurator-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.configurator-summary .total {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}
.configurator-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.configurator-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-wrap: wrap;
}
.configurator-actions .btn {
  width: 100%;
  justify-content: center;
}
.btn-block {
  width: 100%;
  justify-content: center;
}

/* Готовые серверы — сетка */
.ready-servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.ready-server-card {
  padding: 24px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.ready-server-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
}
.ready-server-card-featured {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}
.ready-server-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ready-server-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}
.ready-server-card h5 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-primary);
}
.ready-server-dc {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.ready-server-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  flex: 1;
}
.ready-server-specs li {
  padding: 2px 0;
}
.ready-server-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.ready-server-card .specs {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}
.ready-server-card .specs span {
  display: block;
}
.ready-server-card .price {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.ready-server-card .btn {
  width: 100%;
  justify-content: center;
}
.ready-servers-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 20px;
}

/* Server map */
.server-map-container {
  margin-top: 32px;
  padding: 32px 0;
  background: transparent;
  border: none;
  position: relative;
  min-height: 400px;
}

.server-map {
  width: 100%;
  height: 400px;
  position: relative;
  background: var(--bg-darker);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.server-marker {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: var(--transition);
  z-index: 10;
}

.server-marker:hover {
  transform: translate(-50%, -50%) scale(1.5);
  background: rgba(255, 255, 255, 0.95);
}

.server-marker::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  opacity: 0;
  animation: pulse 2s infinite;
}

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

.server-popup {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 12px;
  padding: 16px 20px;
  background: var(--bg-darker);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  min-width: 250px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 20;
}

.server-marker:hover .server-popup {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(-4px);
}

.server-popup-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.server-popup-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.server-popup-info strong {
  color: var(--text-primary);
}

.hosting-location {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
}

.location-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  background: transparent;
  border: none;
  margin-top: 16px;
}

.location-info i {
  font-size: 1.5rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.location-text {
  flex: 1;
}

.location-text strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.location-text span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.hero-player-preview {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  max-width: 60%;
  z-index: 2;
  perspective: 1200px;
}

.hero-player-preview .preview-frame-wrap {
  border-radius: var(--radius-lg);
  overflow: visible;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--glass-border);
  background: var(--bg-dark);
  transform: perspective(1000px) rotateY(-8deg) rotateX(2deg);
  transition: var(--transition), width 0.6s ease, height 0.6s ease, top 0.6s ease, left 0.6s ease, opacity 0.6s ease;
  cursor: pointer;
  opacity: 0;
  position: relative;
}

.hero-player-preview .preview-frame-wrap.map-minimized {
  overflow: visible;
}

.hero-banner.visible .hero-player-preview .preview-frame-wrap {
  opacity: 1;
}

.hero-player-preview .preview-frame-wrap.preview-frame-hover {
  transform: perspective(1000px) scale(1.05) rotateY(-6deg) rotateX(1deg);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--glass-border);
}

.hero-player-preview .preview-frame-wrap.map-minimized {
  position: fixed !important;
  top: 120px !important;
  right: 40px !important;
  width: 600px !important;
  height: auto !important;
  z-index: 1000 !important;
  transform: perspective(1000px) rotateY(-8deg) rotateX(2deg) !important;
  margin: 0 !important;
  overflow: visible !important;
}

.hero-player-preview .preview-frame-wrap.map-minimized .map-preview-container {
  overflow: hidden;
}

.hero-player-preview .preview-frame-wrap.map-minimized .preview-frame-header {
  cursor: pointer;
  user-select: none;
}

.hero-player-preview .preview-frame-wrap.map-minimized .preview-frame-header:hover {
  background: rgba(20, 20, 35, 0.95);
}

/* Только на странице «Истребитель демонов»: плеер в правом верхнем углу, 700px */
body[data-page="demonslayer"] .hero-player-preview .preview-frame-wrap.map-minimized {
  top: 0 !important;
  right: 0 !important;
  width: 700px !important;
}

.hero-player-preview .preview-frame-header {
  padding: 14px 18px;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.hero-player-preview .preview-frame-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: var(--transition);
}

.hero-player-preview .preview-frame-header .dot:nth-child(1) { background: #ff5f57; }
.hero-player-preview .preview-frame-header .dot:nth-child(2) { background: #febc2e; }
.hero-player-preview .preview-frame-header .dot:nth-child(3) { background: #28c840; }

.hero-player-preview .preview-frame-title {
  margin-left: 8px;
  color: var(--text-secondary);
}

.map-preview-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d0e12;
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Окно загрузки карты — блок landing как на gluapack.com, стиль source-engine-loader */
.map-loading-landing {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 420px;
  z-index: 1000;
  pointer-events: none;
  padding: 0 24px;
  box-sizing: border-box;
}

.map-loading-landing .source-engine-loader {
  pointer-events: auto;
}

#landing .source-engine-loader {
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.source-engine-loader {
  text-align: left;
  user-select: none;
  width: 400px;
  height: 66px;
  border: 1px solid #232323;
  font-family: 'Tahoma', sans-serif;
  padding: 10px;
  padding-left: 9px;
  padding-right: 9px;
  background-color: #6B6E72;
  color: #DEDEDE;
  display: inline-flex;
  flex-direction: column;
  max-width: 100%;
}

.source-engine-loader > div:last-child {
  display: flex;
}

.source-engine-loader .progress {
  width: 310px;
  height: 24px;
  background-color: #4D4F52;
  padding: 4px;
  margin-right: 4px;
  overflow: hidden;
}

.source-engine-loader .progress__fill {
  height: 100%;
  width: 0%;
  transition: width 0.2s ease;
  overflow: hidden;
}

.source-engine-loader .progress div.segment {
  display: inline-block;
  width: 8px;
  height: 16px;
  background-color: #fff;
  vertical-align: top;
}

.source-engine-loader .progress div.segment:not(:last-child) {
  margin-right: 4px;
}

.source-engine-loader__text {
  font-size: 13px;
  flex: 1;
  line-height: 1.4;
  margin-bottom: 6px;
}

.source-engine-loader__text--accent {
  color: #e89b3c;
  font-weight: 600;
}

.source-engine-loader__cancel {
  height: 24px;
  padding: 0 12px;
  border: 1px solid #232323;
  background-color: #8b8d90;
  color: #232323;
  font-family: 'Tahoma', sans-serif;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.source-engine-loader__cancel:hover {
  background-color: #9a9c9f;
}

/* Map controls */
.map-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 100;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.preview-frame-wrap:hover .map-controls {
  opacity: 1;
  pointer-events: auto;
}

.preview-frame-wrap.map-minimized .map-controls {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.map-control-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

.map-control-btn:hover {
  background: var(--bg-card-hover);
  transform: scale(1.1);
  border-color: var(--glass-border);
  box-shadow: var(--shadow);
}

.map-control-btn.map-control-play {
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: var(--bg-dark);
  border-color: rgba(255, 255, 255, 0.3);
}

.map-control-btn.map-control-play:hover {
  transform: scale(1.15);
  background: var(--accent-hover);
}

.map-control-btn i {
  font-size: 1.1rem;
}

.map-control-btn.map-control-play i {
  font-size: 1.3rem;
  margin-left: 2px;
}

/* Map header */
.map-header {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.map-header-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: block;
  opacity: 1;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.map-header-minimized {
  display: none !important;
  opacity: 0;
}

.hero-player-preview .preview-frame-wrap.map-minimized .map-preview-container {
  aspect-ratio: 16 / 9;
  height: auto;
  width: 100%;
  cursor: default;
  overflow: hidden;
}

.hero-player-preview .preview-frame-wrap.map-minimized .map-preview-container canvas {
  cursor: default;
}

#map-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Navigation link active state */
.nav-links a.active {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

.map-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.map-overlay-inner {
  max-width: 520px;
  margin-inline: 16px;
  text-align: left;
  pointer-events: auto;
}

.map-overlay-title {
  font-family: 'DrukWideCyWeb-Bold', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.map-overlay-subtitle {
  font-size: 0.75rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.map-overlay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

/* Страница карты — на весь экран */
body[data-page="map"] {
  overflow: hidden;
  background: #1f2020;
}

body[data-page="map"] .map-page-main {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
}

body[data-page="map"] .map-page-canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
}

body[data-page="map"] .map-page-container {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

body[data-page="map"] #map-canvas {
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 16px;
  }

  .nav {
    padding: 12px 18px;
    flex-wrap: wrap;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-links a {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .hero-banner {
    padding: 100px 20px 80px;
  }
  
  .hero-overlay {
    flex-direction: column;
    gap: 24px;
    width: 100%;
    height: auto;
    min-height: auto;
  }

  .hero-model-slot {
    min-width: 100%;
    width: 100%;
  }
  
  .hero-content {
    width: 100%;
    max-width: 100%;
    padding: 24px 0;
  }
  
  .hero-player-preview {
    position: relative;
    width: 100%;
    max-width: 100%;
    top: auto;
    right: auto;
  }
  
  .hero-player-preview .preview-frame-wrap.map-minimized {
    position: fixed;
    top: 80px;
    right: 16px;
    left: 16px;
    width: auto;
    height: 300px;
  }
  
  .hero-player-preview .preview-frame-wrap.map-minimized .map-preview-container {
    height: 260px;
  }
  
  .hero-info-block {
    padding: 32px 24px;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-actions .btn {
    width: 100%;
  }

  .pricing-grid,
  .advantages-grid,
  .hosting-stats {
    grid-template-columns: 1fr;
  }
}

/* Legacy styles for compatibility */
.canvas-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* Слой с фоновыми чеками — на весь экран от левого края, позади основного чека */
.hero-cheque-bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.hero-cheque-bg-layer canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Контейнер основного чека — справа, центр ~60–70% от левого края */
.hero-cheque-container {
  position: fixed;
  top: 0;
  left: 30%;
  width: 70%;
  height: 100%;
  transform: none;
  z-index: 2;
  pointer-events: none;
}
.hero-cheque-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.headline-container{
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

#text-behind, #text-front, #text-behind-blur {
  font-family: 'DrukWideCyWeb-Bold', sans-serif;
  position: absolute;
  text-align: center;
  font-size: clamp(24px, 20vw, 200px);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 10px;
  line-height: 0.2;
}

#text-behind {
  color: var(--headline-color);
  z-index: 1;
}

#text-behind-blur {
  color: var(--headline-color);
  filter: blur(7.5px);
  -webkit-filter: blur(7.5px);
  z-index: 0;
}

#text-front {
  color: transparent;
  text-stroke: 2px var(--headline-color);
  -webkit-text-stroke: 2px var(--headline-color);
  z-index: 3;
}

.more-content{
  height: 500vh;
  width: 100vw;
}

.text-container{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  top: 10%;
  height: 85%;
  width: 100%;
  position: absolute;
  left: 0;
  z-index: 3;
}

.title{
  font-size: 0.5rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  font-weight: 500;
}

.socials{
}

.socials svg{
  margin: 0 5px;
  transition: all 0.5s ease-in-out;
  transform: scale(1);
}

.socials svg:hover{
  transform: scale(1.2);
  filter: drop-shadow(0px 0px 5px rgba(255, 255, 255, 1));
}

p{
  width: 300px;
  font-size: 0.75rem;
}

a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: all 0.5s ease-in-out;
  cursor: pointer;
}

a:hover{
  filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.9));
}

u {
	text-decoration: none;
}

.star {
	transform-style: preserve-3d;
	width: 1px;
	height: 1px;
	position: absolute;
	color: red;
  }
  
  .star:before {
	position: absolute;
	content: "✦";
	color: inherit;
	inset: 0;
	text-shadow: 0 0 0.8em #fff5;
  }
  
  .smalltext {
	font-size: clamp(24px, 10vw, 50px);
	letter-spacing: 0.3px;
  }

  .gradtext {
	background: linear-gradient(to right, #feac5e, #c779d0, #4bc0c8);
    background-size: 400% 400%;
    animation: Gradient 15s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

@keyframes Gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ========== Shop: hero block (compact heading above filters) ========== */
.hero-shop {
  margin-bottom: 0;
  padding: 40px 32px 10px;
}

.hero-shop .hero {
  padding-bottom: 0;
}

.hero-shop .hero-overlay-compact {
  min-height: 0;
  width: 100%;
  max-width: 1400px;
  padding: 0 1.5rem;
  margin-left: auto;
  margin-right: auto;
  align-items: flex-start;
}

.page-heading {
  width: 100%;
  text-align: left;
  padding: 1rem 0 1.25rem;
}

.page-heading-title {
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
  letter-spacing: 0.02em;
}

.page-heading-desc {
  font-size: 1.22rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* ========== Shop showcase ========== */
/* Profile page — такой же узкий баннер, как в магазине */
.hero-profile {
  margin-bottom: 0;
  padding: 40px 32px 10px;
}

.hero-profile .hero {
  padding-bottom: 0;
}

.hero-profile .hero-overlay-compact {
  min-height: 0;
  width: 100%;
  max-width: 1400px;
  padding: 0 1.5rem;
  margin-left: auto;
  margin-right: auto;
  align-items: flex-start;
}

.profile-wrap.content-wrap,
.profile-wrap {
  position: relative;
  z-index: 10;
  padding: 2rem 1.5rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

body[data-page="profile"] .profile-dashboard.profile-section {
  margin-top: 6rem;
}

.profile-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1.75rem 2rem;
  margin-top: 1.5rem;
}

.profile-h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.profile-desc {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.profile-login {
  position: relative;
}

.profile-login-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.profile-login-btn {
  min-width: 180px;
}

.profile-login-btn.is-disabled {
  pointer-events: none;
  opacity: 0.65;
}

.profile-login-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 16, 0.72);
  backdrop-filter: blur(6px);
  border-radius: inherit;
}

.profile-login-loading[hidden] {
  display: none !important;
}

.profile-login-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.profile-login-loading-inner i {
  font-size: 1.6rem;
  color: #5865f2;
}

.profile-login.is-logging-in .profile-login-buttons,
.profile-login.is-logging-in .profile-desc,
.profile-login.is-logging-in .profile-h2,
.profile-login.is-logging-in .profile-note {
  filter: blur(1px);
  opacity: 0.35;
}

.profile-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.9;
}

/* --- Hero: VALORANT variants A–F (data-hero-style) --- */
.profile-hero {
  --pher-red: #ff4655;
  --pher-bone: #ece8e1;
  --pher-muted: rgba(236, 232, 225, 0.62);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0e14;
  min-height: 220px;
  color: var(--pher-bone);
}

.pher-rail,
.pher-slash {
  pointer-events: none;
}

.pher-rail {
  display: none;
}

.pher-slash {
  display: none;
}

.pher-kicker {
  margin: 0 0 0.3rem;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pher-red);
}

.profile-hero-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, rgba(255, 70, 85, 0.18), rgba(15, 23, 42, 0.2));
  background-size: cover!important;
  background-position: center center!important;
  background-repeat: no-repeat!important;
  pointer-events: none;
}

.profile-hero-cover.has-banner {
  background-color: #07070c;
  /* Full width edge-to-edge; crop/center vertically */
  background-size: 100% auto;
  background-position: center center!important;
  background-repeat: no-repeat!important;
}

.profile-hero-cover.has-banner::after,
.profile-hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(10, 14, 20, 0.96) 0%, rgba(10, 14, 20, 0.55) 42%, rgba(10, 14, 20, 0.2) 100%);
}

.profile-hero-cover-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  display: flex;
  gap: 0.4rem;
  pointer-events: auto;
}

.profile-banner-upload {
  cursor: pointer;
  margin: 0;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.5) !important;
  border-radius: 0 !important;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.profile-banner-remove {
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.5) !important;
  border-radius: 0 !important;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.profile-banner-status {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 5;
  margin: 0;
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text-muted);
  pointer-events: none;
}

.profile-banner-status.is-ok { color: #4ade80; }
.profile-banner-status.is-wait { color: #fbbf24; }
.profile-banner-status.is-err { color: #f87171; }

.profile-hero-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem 1.15rem;
  padding: 7.5rem 1.35rem 1.25rem;
  pointer-events: none;
}

.profile-hero-body > * {
  pointer-events: auto;
}

.profile-hero-avatar-wrap {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  overflow: hidden;
  background: #050508;
  border: 2px solid rgba(255, 255, 255, 0.18);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.profile-hero-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-upload,
.profile-avatar-remove {
  position: absolute;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  transition: opacity 0.2s ease, background 0.2s ease;
}

.profile-avatar-upload {
  inset: 0;
  margin: 0;
  opacity: 0;
  font-size: 1.25rem;
}

.profile-hero-avatar-wrap:hover .profile-avatar-upload,
.profile-hero-avatar-wrap:focus-within .profile-avatar-upload {
  opacity: 1;
}

.profile-avatar-upload:hover {
  background: rgba(0, 0, 0, 0.7);
}

.profile-avatar-remove {
  top: 0.2rem;
  right: 0.2rem;
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.65rem;
  z-index: 2;
  padding: 0;
  clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
}

.profile-avatar-remove:hover {
  background: rgba(220, 38, 38, 0.85);
}

.profile-avatar-status {
  position: absolute;
  left: 50%;
  bottom: -1.4rem;
  transform: translateX(-50%);
  margin: 0;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.profile-avatar-status.is-ok { color: #4ade80; }
.profile-avatar-status.is-wait { color: #fbbf24; }
.profile-avatar-status.is-err { color: #f87171; }

.profile-hero-main {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding-bottom: 0.15rem;
}

.profile-hero-name {
  margin: 0 0 0.55rem;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.05;
  color: #fff;
}

.profile-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.profile-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.4);
  color: var(--pher-bone);
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}

.profile-hero-badge-strong {
  color: #fff;
  border-color: rgba(255, 70, 85, 0.45);
  background: rgba(255, 70, 85, 0.14);
}

.profile-hero-badge-slayer {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
}

.profile-hero-badge-demon {
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.1);
}

.profile-hero-badge-staff {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
}

.profile-hero-badge-booster {
  color: #f9a8d4;
  border-color: rgba(244, 114, 182, 0.45);
  background: rgba(244, 114, 182, 0.12);
}

.profile-hero-badge-etherium {
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.12);
}

.profile-hero-badge-dev {
  color: #ffd278;
  border-color: rgba(255, 210, 120, 0.45);
  background: rgba(255, 210, 120, 0.12);
}

.profile-hero-badge-senior {
  color: #ffaa6e;
  border-color: rgba(255, 170, 110, 0.45);
  background: rgba(255, 170, 110, 0.12);
}

.profile-hero-badge-admin {
  color: #78beff;
  border-color: rgba(120, 190, 255, 0.45);
  background: rgba(120, 190, 255, 0.12);
}

.profile-hero-badge-event {
  color: #c4b5fd;
  border-color: rgba(160, 120, 255, 0.45);
  background: rgba(160, 120, 255, 0.14);
}

.profile-hero-side {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
}

.profile-accounts-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.profile-account-pill,
.profile-account-link.btn {
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0 !important;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}

/* A · Agent Card — classic overlapping avatar + slash watermark */
.profile-hero[data-hero-style="a"] {
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}
.profile-hero[data-hero-style="a"] .pher-slash {
  display: block;
  position: absolute;
  right: 0.4rem;
  top: 0.35rem;
  z-index: 1;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.06);
  line-height: 1;
  user-select: none;
}
.profile-hero[data-hero-style="a"] .profile-hero-avatar-wrap {
  width: 112px;
  height: 112px;
  border-color: var(--pher-red);
}

/* B · Playercard — vertical red rail + dense info */
.profile-hero[data-hero-style="b"] .pher-rail {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  z-index: 3;
  background: var(--pher-red);
}
.profile-hero[data-hero-style="b"] .profile-hero-body {
  padding-left: 1.55rem;
}
.profile-hero[data-hero-style="b"] .profile-hero-avatar-wrap {
  width: 96px;
  height: 124px;
  clip-path: none;
  border: 0;
  border-bottom: 3px solid var(--pher-red);
}
.profile-hero[data-hero-style="b"] .pher-kicker {
  color: var(--pher-muted);
}
.profile-hero[data-hero-style="b"] .profile-hero-name {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
}

/* C · HUD Frame — corner brackets */
.profile-hero[data-hero-style="c"] {
  border-color: rgba(255, 70, 85, 0.35);
}
.profile-hero[data-hero-style="c"]::before,
.profile-hero[data-hero-style="c"]::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  z-index: 4;
  border: 2px solid var(--pher-red);
  pointer-events: none;
}
.profile-hero[data-hero-style="c"]::before {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
}
.profile-hero[data-hero-style="c"]::after {
  right: 10px;
  bottom: 10px;
  border-left: 0;
  border-top: 0;
}
.profile-hero[data-hero-style="c"] .profile-hero-avatar-wrap {
  clip-path: none;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.35);
}
.profile-hero[data-hero-style="c"] .profile-hero-main {
  padding: 0.55rem 0.7rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* D · Split — banner left, solid panel right */
.profile-hero[data-hero-style="d"] .profile-hero-cover {
  right: 42%;
}
.profile-hero[data-hero-style="d"] .profile-hero-cover::after {
  background: linear-gradient(90deg, transparent 60%, rgba(10, 14, 20, 0.95));
}
.profile-hero[data-hero-style="d"] .profile-hero-body {
  padding-top: 1.35rem;
  min-height: 220px;
  background: linear-gradient(90deg, transparent 52%, rgba(10, 14, 20, 0.92) 58%, #0a0e14 100%);
  align-items: center;
}
.profile-hero[data-hero-style="d"] .profile-hero-avatar-wrap {
  width: 120px;
  height: 120px;
}
.profile-hero[data-hero-style="d"] .pher-slash {
  display: block;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 70, 85, 0.12);
}

/* E · Agent Select — low bar, oversized avatar */
.profile-hero[data-hero-style="e"] {
  min-height: 250px;
}
.profile-hero[data-hero-style="e"] .profile-hero-cover::after {
  background:
    linear-gradient(to top, rgba(8, 10, 14, 0.98) 0%, rgba(8, 10, 14, 0.2) 48%, transparent 70%),
    linear-gradient(90deg, rgba(255, 70, 85, 0.18), transparent 40%);
}
.profile-hero[data-hero-style="e"] .profile-hero-body {
  padding-top: 8.5rem;
  align-items: flex-end;
}
.profile-hero[data-hero-style="e"] .profile-hero-avatar-wrap {
  width: 132px;
  height: 132px;
  border-color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transform: skewX(-4deg);
}
.profile-hero[data-hero-style="e"] .profile-hero-avatar {
  transform: skewX(4deg) scale(1.08);
}
.profile-hero[data-hero-style="e"] .profile-hero-name {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}
.profile-hero[data-hero-style="e"] .pher-rail {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 3;
  background: var(--pher-red);
}

/* F · Strike — diagonal slash band */
.profile-hero[data-hero-style="f"] .pher-rail {
  display: block;
  position: absolute;
  left: -8%;
  top: 0;
  bottom: 0;
  width: 38%;
  z-index: 1;
  background: linear-gradient(105deg, rgba(255, 70, 85, 0.28), transparent 72%);
  transform: skewX(-18deg);
  transform-origin: top left;
}
.profile-hero[data-hero-style="f"] .profile-hero-avatar-wrap {
  width: 108px;
  height: 108px;
  border: 0;
  outline: 2px solid var(--pher-red);
  outline-offset: 3px;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.profile-hero[data-hero-style="f"] .profile-hero-name {
  text-shadow: 0 0 24px rgba(255, 70, 85, 0.35);
}
.profile-hero[data-hero-style="f"] .pher-slash {
  display: block;
  position: absolute;
  right: -0.2rem;
  bottom: -0.4rem;
  z-index: 1;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.05);
  transform: skewX(-12deg);
}

@media (max-width: 720px) {
  .profile-hero-body {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 6.5rem 1rem 1.1rem;
  }
  .profile-hero-side {
    grid-column: 1 / -1;
    align-items: flex-start;
  }
  .profile-accounts-buttons {
    justify-content: flex-start;
  }
  .profile-hero[data-hero-style="d"] .profile-hero-cover {
    right: 0;
  }
  .profile-hero[data-hero-style="d"] .profile-hero-body {
    background: transparent;
    padding-top: 6.5rem;
  }
}

/* Hero style picker */
.profile-hero-style-picker {
  margin: 0 0 1.5rem;
  padding: 1rem 0 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pher-style-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.pher-style-opt {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-align: left;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.pher-style-opt:hover {
  border-color: rgba(255, 70, 85, 0.45);
  transform: translateY(-1px);
}

.pher-style-opt.is-active {
  border-color: rgba(255, 70, 85, 0.85);
  background: rgba(255, 70, 85, 0.1);
}

.pher-style-preview {
  position: relative;
  height: 72px;
  overflow: hidden;
  background: #0a0e14;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pher-style-preview-banner {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 70, 85, 0.25), transparent 50%),
    linear-gradient(160deg, #1a2430, #0a0e14);
}

.pher-style-preview-avatar {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 22px;
  height: 22px;
  background: #2a3340;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.pher-style-preview-lines {
  position: absolute;
  left: 36px;
  bottom: 10px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pher-style-preview-lines span {
  display: block;
  height: 4px;
  background: rgba(236, 232, 225, 0.35);
}

.pher-style-preview-lines span:first-child {
  width: 70%;
  height: 6px;
  background: rgba(236, 232, 225, 0.7);
}

.pher-style-preview-lines span:last-child {
  width: 42%;
}

.pher-style-opt[data-style="a"] .pher-style-preview-avatar {
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
  border-color: #ff4655;
}
.pher-style-opt[data-style="b"] .pher-style-preview::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #ff4655;
  z-index: 1;
}
.pher-style-opt[data-style="b"] .pher-style-preview-avatar {
  width: 18px;
  height: 26px;
}
.pher-style-opt[data-style="c"] .pher-style-preview {
  box-shadow: inset 0 0 0 1px rgba(255, 70, 85, 0.45);
}
.pher-style-opt[data-style="d"] .pher-style-preview-banner {
  right: 38%;
}
.pher-style-opt[data-style="d"] .pher-style-preview::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;
  background: #0a0e14;
}
.pher-style-opt[data-style="e"] .pher-style-preview-avatar {
  width: 28px;
  height: 28px;
  transform: skewX(-6deg);
  border-color: #fff;
}
.pher-style-opt[data-style="e"] .pher-style-preview::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #ff4655;
}
.pher-style-opt[data-style="f"] .pher-style-preview-banner {
  background:
    linear-gradient(105deg, rgba(255, 70, 85, 0.4), transparent 45%),
    linear-gradient(160deg, #1a2430, #0a0e14);
}
.pher-style-opt[data-style="f"] .pher-style-preview-avatar {
  outline: 1px solid #ff4655;
  outline-offset: 2px;
}

.pher-style-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pher-style-id {
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #ff4655;
}

.pher-style-name {
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.pher-style-note {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}

/* --- Top-level page tabs: Обзор / Игра / Discord --- */
.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--glass-border);
}

.profile-tab {
  appearance: none;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  border-radius: 0;
  padding: 0.85rem 1.15rem;
  margin-bottom: -1px;
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
}

.profile-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.profile-tab.is-active {
  color: var(--text-primary);
  border-bottom-color: #ff4655;
  background: linear-gradient(180deg, rgba(255, 70, 85, 0.08), transparent);
}

.profile-tab-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}

.profile-tab-panel {
  display: none;
}

.profile-tab-panel.is-active {
  display: block;
  animation: profilePanelIn 0.28s ease;
}

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

.profile-game-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

body[data-page="profile"] #profile-game-toolbar[hidden],
body[data-page="profile"] #profile-cat-nav[hidden] {
  display: none !important;
}

/* Server segmented switch */
.profile-server-switch {
  display: inline-flex;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  overflow: hidden;
}

.profile-server-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s, background 0.15s;
}

.profile-server-btn:hover {
  color: var(--text-primary);
}

.profile-server-btn.is-active {
  color: #fff;
  background: rgba(255, 70, 85, 0.22);
}

.profile-server-btn-label {
  font-weight: 500;
  opacity: 0.75;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
}

@media (max-width: 640px) {
  .profile-server-btn-label {
    display: none;
  }
}

/* Category underline nav */
.profile-cat-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.15rem;
  margin-bottom: 1.1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0;
}

.profile-cat {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.15s;
}

.profile-cat::after {
  content: '';
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0;
  height: 2px;
  background: #ff4655;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.profile-cat:hover {
  color: var(--text-primary);
}

.profile-cat.is-active {
  color: var(--text-primary);
}

.profile-cat.is-active::after {
  transform: scaleX(1);
}

.profile-cat-panel {
  display: none;
}

.profile-cat-panel.is-active {
  display: block;
  animation: profileCatIn 0.32s ease;
}

@keyframes profileCatIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}

.profile-server-body.is-ready .profile-vprogress-fill,
.profile-server-body.is-ready .profile-vratio-fill {
  animation: profileBarFill 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes profileBarFill {
  from { width: 0 !important; }
}

/* Discord subtabs */
.profile-discord-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.profile-discord-subtab {
  appearance: none;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.profile-discord-subtab:hover {
  color: var(--text-primary);
}

.profile-discord-subtab.is-active {
  color: #fff;
  border-color: rgba(88, 101, 242, 0.55);
  background: rgba(88, 101, 242, 0.22);
}

.profile-discord-subpanel {
  display: none;
}

.profile-discord-subpanel.is-active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: profilePanelIn 0.28s ease;
}

.profile-discord-shell {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.75rem;
  min-height: 280px;
}

.profile-discord-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  align-items: start;
}

.profile-discord-section,
.profile-discord-channel-block {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  background: #2b2d31;
  padding: 0;
  overflow: hidden;
}

.profile-discord-channel-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.18);
}

.profile-discord-hash {
  color: #80848e;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.profile-discord-channel-title {
  margin: 0 !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  letter-spacing: 0;
  text-transform: none;
  color: #f2f3f5 !important;
}

.profile-discord-channel-feed {
  padding: 0.35rem 0.25rem 0.65rem;
}

.profile-discord-subhead {
  margin: 0.65rem 0.75rem 0.35rem !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #949ba4 !important;
}

.profile-h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 1rem 0 0.65rem;
}

.profile-discord-sync-banner {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(88, 101, 242, 0.14);
  border: 1px solid rgba(88, 101, 242, 0.28);
  color: #dbdee1;
  font-size: 0.85rem;
}

.profile-discord-toolbar {
  display: flex;
  justify-content: flex-end;
}

.profile-discord-refresh-btn {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: #313338 !important;
  color: #dbdee1 !important;
}

.profile-discord-empty-hint {
  margin: 0.25rem 0.5rem 0.5rem;
  color: #949ba4;
}

.profile-discord-sync-note {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.profile-discord-msg-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-discord-msg-list--chat {
  gap: 0;
}

.profile-discord-msg {
  display: flex;
  gap: 0.75rem;
  border: none;
  border-radius: 0;
  padding: 0.45rem 0.85rem;
  background: transparent;
  transition: background 0.1s;
}

.profile-discord-msg:hover {
  background: rgba(0, 0, 0, 0.18);
}

.profile-discord-msg-body {
  min-width: 0;
  flex: 1;
}

.profile-discord-msg-head {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.55rem;
}

.profile-discord-msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.profile-discord-msg-avatar-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #5865f2;
  color: #fff;
}

.profile-discord-msg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.5rem;
  min-width: 0;
  margin-bottom: 0.15rem;
  line-height: 1.25;
}

.profile-discord-msg-author {
  display: inline;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f2f3f5;
}

.profile-discord-msg-time,
.profile-discord-channel {
  display: inline;
  font-size: 0.72rem;
  color: #949ba4;
  margin-right: 0;
}

.profile-discord-channel {
  color: #00a8fc;
  font-weight: 500;
}

.profile-discord-msg-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.375;
  color: #dbdee1;
}

.profile-discord-msg-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.profile-discord-msg-img-wrap {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 320px;
}

.profile-discord-msg-img-wrap img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.profile-discord-empty {
  margin: 0.75rem 0.85rem;
  color: #949ba4;
  font-size: 0.9rem;
}

.profile-accounts-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.profile-account-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--accent-success, #22c55e);
}

.profile-account-pill .fa-discord { color: #5865f2; }
.profile-account-pill .fa-steam { color: #fff; }

.profile-account-booster {
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.35);
  background: rgba(244, 114, 182, 0.12);
}

.profile-account-booster .fa-rocket { color: #f472b6; }

.profile-block-guilds-full {
  width: 100%;
  margin-top: 1rem;
}

.profile-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.profile-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  padding: 1rem 1.25rem;
}

.profile-overview-card {
  position: relative;
  margin-bottom: 1rem;
  padding: 1.15rem 1.25rem 1.35rem;
  border-radius: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.22));
  border: 1px solid var(--glass-border);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.profile-overview-kicker {
  margin: 0 0 0.35rem;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ff4655;
}

.profile-h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-h3--val {
  margin-bottom: 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-h3--val i {
  color: #ff4655;
}

.profile-desc-sm {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.profile-empty {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.profile-empty--val {
  padding: 1rem 0.25rem;
  letter-spacing: 0.02em;
}

/* --- Overview style picker (VALORANT variants A–E) --- */
body[data-page="profile"] {
  --val-abyss: #0f1923;
  --val-deep: #1a242e;
  --val-section: #212d39;
  --val-red: #ff4655;
  --val-red-deep: #d62836;
  --val-bone: #ece8e1;
  --val-bone-soft: rgba(236, 232, 225, 0.7);
  --val-muted: #9aa6b1;
  --val-border: rgba(236, 232, 225, 0.15);
  --val-display: Oswald, "Arial Narrow", Impact, sans-serif;
  --val-body: Inter, system-ui, sans-serif;
}

.profile-style-picker-head {
  margin-bottom: 1.25rem;
}

.profile-style-picker-title {
  margin: 0 0 0.4rem;
  font-family: var(--val-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--val-bone);
  line-height: 1;
}

.profile-style-picker-desc {
  margin: 0;
  max-width: 42rem;
  font-family: var(--val-body);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--val-muted);
}

.profile-style-picker-desc--sm {
  margin: 0 0 1rem;
  font-size: 0.82rem;
}

.profile-style-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.75rem;
}

.profile-style-opt {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.profile-style-opt-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.65rem;
}

.profile-style-opt-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.35rem;
  font-family: var(--val-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--val-red);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 100%, 0 100%);
}

.profile-style-opt-name {
  font-family: var(--val-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--val-bone);
}

.profile-style-opt-note {
  flex: 1 1 100%;
  font-size: 0.75rem;
  color: var(--val-muted);
}

.profile-overview-live {
  margin-top: 0.5rem;
}

.val-card {
  position: relative;
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--val-abyss);
  color: var(--val-bone);
  border: 1px solid var(--val-border);
  font-family: var(--val-body);
  overflow: hidden;
}

.val-eyebrow {
  margin: 0 0 0.45rem;
  font-family: var(--val-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--val-red);
}

.val-title {
  margin: 0 0 0.55rem;
  font-family: var(--val-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--val-bone);
  line-height: 1.1;
}

.val-title--display {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 0.92;
  margin-bottom: 0.65rem;
}

.val-body {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--val-bone-soft);
}

.val-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.val-stat {
  padding: 0.45rem 0.5rem 0.55rem;
  background: rgba(236, 232, 225, 0.04);
  border: 1px solid rgba(236, 232, 225, 0.08);
  min-width: 0;
}

.val-stat-l {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--val-muted);
  margin-bottom: 0.2rem;
}

.val-stat-v {
  display: block;
  font-family: var(--val-display);
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--val-bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.val-stat-v--muted {
  color: var(--val-muted);
  font-size: 0.95rem;
}

.val-card--stripe {
  border-radius: 0;
  border-top: 2px solid var(--val-red);
  background: var(--val-abyss);
  box-shadow: none;
}

.val-card--stripe::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--val-red);
}

.val-card--knife {
  border-radius: 0;
  border-color: rgba(255, 70, 85, 0.35);
  background:
    linear-gradient(135deg, rgba(255, 70, 85, 0.1), transparent 42%),
    var(--val-deep);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.val-card--knife::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--val-red);
}

.val-card--playercard {
  min-height: 180px;
  margin-bottom: 1rem;
  padding: 1.25rem 1.25rem 1.3rem 1.45rem;
  background:
    linear-gradient(155deg, rgba(255, 70, 85, 0.07) 0%, transparent 40%),
    rgba(6, 8, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.val-card--playercard .val-title,
.val-card--playercard .val-title--display {
  color: rgba(236, 232, 225, 0.92);
}

.val-card--playercard .val-body {
  color: rgba(236, 232, 225, 0.55);
}

.val-playercard-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #ff4655, rgba(255, 70, 85, 0.25));
}

.val-slash {
  position: absolute;
  right: -0.2rem;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center;
  font-family: var(--val-display);
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.035);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.val-playercard-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--val-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(154, 166, 177, 0.75);
}

.profile-overview-orders,
.profile-overview-guilds {
  position: relative;
}

.profile-overview-guilds .profile-guilds {
  margin-top: 0.35rem;
  position: relative;
  z-index: 1;
}

.val-card--hud {
  background: rgba(15, 25, 35, 0.92);
  border-color: transparent;
  padding: 1.35rem 1.3rem 1.4rem;
}

.val-hud-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--val-red);
  border-style: solid;
  pointer-events: none;
}

.val-hud-corner--tl { top: 0; left: 0; border-width: 2px 0 0 2px; }
.val-hud-corner--tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.val-hud-corner--bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.val-hud-corner--br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.val-hud-ticks {
  height: 1px;
  margin: 0 0 0.85rem;
  background: repeating-linear-gradient(
    90deg,
    rgba(236, 232, 225, 0.35) 0 6px,
    transparent 6px 12px
  );
}

.val-card--faceoff {
  background: var(--val-section);
  border-color: rgba(236, 232, 225, 0.12);
}

.val-faceoff-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.9rem -0.15rem;
}

.val-faceoff-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem 0.4rem;
  font-family: var(--val-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--val-red);
  transform: skewX(-6deg);
}

.val-faceoff-tag--alt {
  background: var(--val-bone);
  color: var(--val-abyss);
}

.val-faceoff-vs {
  font-family: var(--val-display);
  font-weight: 800;
  color: var(--val-muted);
  letter-spacing: 0.08em;
}

.val-cta {
  appearance: none;
  border: none;
  margin-top: 0.25rem;
  padding: 0.7rem 1.25rem;
  font-family: var(--val-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: var(--val-red);
  cursor: default;
  transform: skewX(-6deg);
  transition: background 0.15s;
}

.val-cta:hover {
  background: var(--val-red-deep);
}

@media (max-width: 640px) {
  .val-stat-row {
    grid-template-columns: 1fr;
  }
  .val-slash {
    font-size: 2.4rem;
    right: -0.5rem;
  }
}

/* --- Game tab · CHARACTER overview style gallery --- */
.profile-style-picker-head--game {
  margin-bottom: 1rem;
}

.gchar-gallery.profile-char-style-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 1100px) {
  .gchar-gallery.profile-char-style-gallery {
    grid-template-columns: 1fr 1fr;
  }
  .gchar-gallery .profile-style-opt[data-style="char-f"] {
    grid-column: 1 / -1;
  }
}

.gchar-card {
  position: relative;
  padding: 1.15rem 1.2rem 1.2rem;
  background: rgba(6, 8, 14, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(236, 232, 225, 0.9);
  font-family: Inter, system-ui, sans-serif;
  overflow: hidden;
}

.gchar-card-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 0.85rem;
}

.gchar-kicker {
  margin: 0 0 0.35rem;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ff4655;
}

.gchar-name {
  margin: 0 0 0.35rem;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.05;
  color: rgba(236, 232, 225, 0.95);
}

.gchar-name--display {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  letter-spacing: 0.02em;
  line-height: 0.95;
}

.gchar-sub {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(236, 232, 225, 0.55);
}

.gchar-cat {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(154, 166, 177, 0.7);
}

.gchar-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-top: 0.65rem;
}

.gchar-meta {
  font-family: Oswald, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(236, 232, 225, 0.7);
}

.gchar-meta--muted {
  color: rgba(154, 166, 177, 0.55);
  font-weight: 500;
}

.gchar-rank {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  flex-shrink: 0;
}

.gchar-rank-l {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(154, 166, 177, 0.75);
}

.gchar-rank-v {
  font-family: Oswald, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.gchar-rank--slayer .gchar-rank-v { color: #7dd3fc; }
.gchar-rank--demon .gchar-rank-v { color: #d8b4fe; }
.gchar-rank--neutral .gchar-rank-v { color: #ff4655; }

.gchar-rank--lg .gchar-rank-v {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.gchar-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.gchar-stat {
  padding: 0.45rem 0.5rem 0.55rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 0;
}

.gchar-stat-l {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(154, 166, 177, 0.7);
  margin-bottom: 0.2rem;
}

.gchar-stat-v {
  display: block;
  font-family: Oswald, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(236, 232, 225, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A STRIPE */
.gchar-card--stripe {
  border-radius: 0;
  border-top: 2px solid #ff4655;
  background: rgba(6, 8, 14, 0.82);
}

.gchar-card--stripe::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: #ff4655;
}

/* B KNIFE */
.gchar-card--knife {
  border-color: rgba(255, 70, 85, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 70, 85, 0.08), transparent 45%),
    rgba(6, 8, 14, 0.85);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.gchar-card--knife::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #ff4655;
}

/* C PLAYERCARD */
.gchar-card--playercard {
  min-height: 190px;
  padding-left: 1.4rem;
  background:
    linear-gradient(155deg, rgba(255, 70, 85, 0.07) 0%, transparent 42%),
    rgba(6, 8, 14, 0.82);
}

.gchar-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #ff4655, rgba(255, 70, 85, 0.2));
}

.gchar-slash {
  position: absolute;
  right: -0.35rem;
  top: 52%;
  transform: translateY(-50%) rotate(-90deg);
  font-family: Oswald, sans-serif;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.035);
  pointer-events: none;
  white-space: nowrap;
}

.gchar-playercard-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
  margin-top: 1.15rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: Oswald, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(154, 166, 177, 0.7);
}

/* D HUD */
.gchar-card--hud {
  border-color: transparent;
  background: rgba(4, 6, 10, 0.88);
  padding: 1.3rem 1.25rem;
}

.gchar-hud-c {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #ff4655;
  border-style: solid;
  pointer-events: none;
}

.gchar-hud-c--tl { top: 0; left: 0; border-width: 2px 0 0 2px; }
.gchar-hud-c--tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.gchar-hud-c--bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.gchar-hud-c--br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.gchar-hud-ticks {
  height: 1px;
  margin: 0 0 0.75rem;
  background: repeating-linear-gradient(
    90deg,
    rgba(236, 232, 225, 0.28) 0 5px,
    transparent 5px 11px
  );
}

/* E FACEOFF */
.gchar-card--faceoff {
  background: rgba(8, 10, 16, 0.9);
}

.gchar-faceoff-banner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
}

.gchar-faceoff-tag {
  display: inline-block;
  padding: 0.32rem 0.75rem 0.36rem;
  font-family: Oswald, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: #ff4655;
  transform: skewX(-6deg);
}

.gchar-faceoff-tag--alt {
  background: rgba(236, 232, 225, 0.88);
  color: #0a0c12;
}

.gchar-faceoff-vs {
  font-family: Oswald, sans-serif;
  font-weight: 800;
  color: rgba(154, 166, 177, 0.55);
}

/* F SPLIT */
.gchar-card--split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
  overflow: visible;
}

.gchar-split-left,
.gchar-split-right {
  position: relative;
  padding: 1.15rem 1.2rem;
  background: rgba(6, 8, 14, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.gchar-split-left {
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 100%, 0 100%);
  border-right: none;
  background:
    linear-gradient(120deg, rgba(255, 70, 85, 0.08), transparent 50%),
    rgba(6, 8, 14, 0.88);
  overflow: hidden;
}

.gchar-level-bg {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: clamp(4.5rem, 12vw, 8rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.045);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.gchar-split-left .gchar-core {
  position: relative;
  z-index: 1;
}

.gchar-split-right {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 22px 100%);
  margin-left: -18px;
  padding-left: 1.6rem;
  background: rgba(0, 0, 0, 0.55);
}

.gchar-split-right .gchar-rank {
  margin-bottom: 0.75rem;
  align-items: flex-start;
  max-width: 100%;
}

.gchar-rank--job .gchar-rank-v {
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  white-space: normal;
  word-break: break-word;
  text-align: left;
  line-height: 1.15;
}

.gchar-split-right .gchar-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gchar-card--slayer .gchar-kicker { color: #38bdf8; }
.gchar-card--demon .gchar-kicker { color: #c084fc; }

.gchar-bio-block {
  margin-top: 0.5rem;
  padding: 1rem 1.15rem;
  background: rgba(6, 8, 14, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.gchar-bio-block .profile-game-bio {
  margin: 0.35rem 0 0;
  color: rgba(236, 232, 225, 0.7);
}

@media (max-width: 720px) {
  .gchar-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gchar-card--split {
    grid-template-columns: 1fr;
  }
  .gchar-split-left,
  .gchar-split-right {
    clip-path: none;
    margin-left: 0;
    padding-left: 1.15rem;
  }
  .gchar-split-right {
    border-top: none;
  }
}

.profile-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-account-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.profile-account-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.profile-account-item .profile-account-icon .fa-discord { color: #5865f2; }
.profile-account-item .profile-account-icon .fa-steam { color: #fff; }

.profile-account-label {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
}

.profile-account-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-account-linked {
  color: var(--accent-success, #22c55e);
}

.profile-guilds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.profile-guild-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0.95rem 0.9rem 1.05rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}

.profile-guild-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.55);
}

.profile-guild-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.profile-guild-card.profile-guild-joined {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.5);
}

.profile-guild-card.profile-guild-joined .profile-guild-accent {
  background: rgba(74, 222, 128, 0.7);
  box-shadow: none;
}

.profile-guild-card.profile-guild-away {
  opacity: 0.72;
}

.profile-guild-card.profile-guild-away .profile-guild-accent {
  background: rgba(255, 255, 255, 0.12);
}

.profile-guild-icon-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: #0a0c12;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-guild-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-guild-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.25rem;
  color: #5865f2;
  background: #12151c;
}

.profile-guild-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.profile-guild-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.65rem;
}

.profile-guild-name {
  font-family: var(--val-display, Oswald, sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(236, 232, 225, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.profile-guild-status {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(74, 222, 128, 0.9);
  padding: 0;
  border: none;
  background: none;
}

.profile-guild-status--booster {
  color: rgba(244, 114, 182, 0.95);
}

.profile-guild-status--away {
  color: rgba(154, 166, 177, 0.75);
}

.profile-guild-badge,
.profile-guild-booster,
.profile-guild-not {
  /* legacy — status is text-only now */
  display: none;
}

.profile-guild-roles {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-guild-roles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.profile-guild-role {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--role-color, #99aab5) 28%, transparent);
  background: color-mix(in srgb, var(--role-color, #99aab5) 8%, transparent);
  color: rgba(236, 232, 225, 0.78);
}

.profile-guild-role-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-guild-role-emoji {
  font-size: 0.8rem;
  line-height: 1;
}

.profile-guild-role-name {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}

/* --- Game profile (sync from GMod servers) --- */
.profile-block-game {
  margin-top: 1.5rem;
}

.profile-game-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.profile-game-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.profile-game-sync-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-game-sync-status.is-ok { color: #4ade80; }
.profile-game-sync-status.is-wait { color: #fbbf24; }
.profile-game-sync-status.is-err { color: #f87171; }

.profile-game-loading {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.profile-game-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.08), rgba(0, 0, 0, 0.2));
}

.profile-game-rpname {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.profile-game-subline {
  margin: 0;
  color: var(--text-muted);
}

.profile-game-category {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-game-hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.profile-game-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.profile-game-badge-staff {
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

.profile-game-badge-sm {
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(124, 108, 255, 0.2);
  margin-left: 0.35rem;
}

.profile-game-synced {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-game-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.profile-game-flag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
}

.profile-game-card {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 0;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.profile-vcard {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.22));
}

.profile-game-card-title {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
}

.profile-game-card-title i {
  opacity: 0.75;
  width: 1rem;
  text-align: center;
  color: #ff4655;
}

.profile-game-hero--v {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(120deg, rgba(255, 70, 85, 0.08), transparent 42%),
    rgba(0, 0, 0, 0.28);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.profile-game-hero--slayer {
  background:
    linear-gradient(120deg, rgba(56, 189, 248, 0.14), transparent 45%),
    rgba(0, 0, 0, 0.28);
}

.profile-game-hero--demon {
  background:
    linear-gradient(120deg, rgba(168, 85, 247, 0.16), transparent 45%),
    rgba(0, 0, 0, 0.28);
}

.profile-game-kicker {
  margin: 0 0 0.35rem;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ff4655;
}

.profile-rank-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  margin-bottom: 0.5rem;
}

.profile-rank-badge-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-rank-badge-value {
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.profile-rank-badge--slayer .profile-rank-badge-value { color: #38bdf8; }
.profile-rank-badge--demon .profile-rank-badge-value { color: #c084fc; }
.profile-rank-badge--neutral .profile-rank-badge-value { color: #ff4655; }

.profile-v-overview-strip {
  margin-bottom: 0.5rem;
}

/* Valorant-style stat tiles */
.profile-vstat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.7rem;
}

.profile-vstat-grid--wide {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.profile-vstat-grid--wide .profile-vstat-value {
  font-size: clamp(1rem, 1.4vw + 0.55rem, 1.65rem);
  text-overflow: clip;
}

.profile-vstat {
  position: relative;
  padding: 0.75rem 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  overflow: hidden;
  min-width: 0;
}

.profile-vstat-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.profile-vstat-value {
  display: block;
  font-size: clamp(0.95rem, 1.8vw + 0.4rem, 1.45rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.profile-vstat--lg .profile-vstat-value {
  font-size: clamp(1.05rem, 2vw + 0.45rem, 1.85rem);
}

.profile-vstat-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 70, 85, 0.85);
}

.profile-vstat--slayer .profile-vstat-bar { background: #38bdf8; }
.profile-vstat--demon .profile-vstat-bar { background: #c084fc; }
.profile-vstat--gold .profile-vstat-bar { background: #fbbf24; }
.profile-vstat--gold .profile-vstat-value { color: #fbbf24; }
.profile-vstat--slayer .profile-vstat-value { color: #7dd3fc; }
.profile-vstat--demon .profile-vstat-value { color: #d8b4fe; }

.profile-vprogress,
.profile-vratio {
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.8rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-vprogress-head,
.profile-vratio-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.profile-vprogress-label,
.profile-vratio-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-vprogress-meta {
  display: flex;
  gap: 0.65rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 600;
}

.profile-vprogress-level {
  color: var(--text-primary);
}

.profile-vprogress-xp {
  color: var(--text-muted);
}

.profile-vprogress-track,
.profile-vratio-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 4px 100%);
}

.profile-vprogress-fill,
.profile-vratio-fill {
  height: 100%;
  width: var(--fill, 0%);
  background: linear-gradient(90deg, #ff4655, #ff8a94);
  box-shadow: 0 0 10px rgba(255, 70, 85, 0.35);
}

.profile-vprogress--slayer .profile-vprogress-fill {
  background: linear-gradient(90deg, #0ea5e9, #7dd3fc);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.35);
}

.profile-vprogress--demon .profile-vprogress-fill {
  background: linear-gradient(90deg, #9333ea, #d8b4fe);
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.35);
}

.profile-vprogress--bp .profile-vprogress-fill {
  background: linear-gradient(90deg, #f59e0b, #fde68a);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.profile-vprogress--inv .profile-vprogress-fill {
  background: linear-gradient(90deg, #22c55e, #86efac);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.profile-vratio-pct {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ff4655;
}

.profile-vratio--slayer .profile-vratio-pct { color: #38bdf8; }
.profile-vratio--demon .profile-vratio-pct { color: #c084fc; }

.profile-vratio--slayer .profile-vratio-fill {
  background: linear-gradient(90deg, #0ea5e9, #7dd3fc);
}

.profile-vratio--demon .profile-vratio-fill {
  background: linear-gradient(90deg, #9333ea, #d8b4fe);
}

.profile-vratio-sub {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Legacy grid kept for any leftover markup */
.profile-game-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

.profile-game-stat {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-game-stat-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.profile-game-stat-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-word;
}

.profile-game-bio {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
  color: var(--text-secondary, var(--text-primary));
}

.profile-game-list {
  margin: 0;
  padding-left: 1.1rem;
}

.profile-game-list li {
  margin-bottom: 0.35rem;
}

.profile-game-muted {
  color: var(--text-muted);
  font-size: 0.85em;
}

.profile-game-empty-server {
  padding: 1.5rem;
  text-align: center;
}

@media (max-width: 640px) {
  .profile-game-hero-side {
    align-items: flex-start;
  }
  .profile-vstat-grid:not(.profile-vstat-grid--wide),
  .profile-game-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-vstat-grid--wide {
    grid-template-columns: 1fr;
  }
  .profile-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}

/* --- Inventory / houses: Valorant loadout panels --- */
.vinv-lead {
  margin: -0.35rem 0 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.vinv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.vinv-grid--storage {
  margin-top: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.55rem;
}

.vinv-item {
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(160deg, rgba(255, 70, 85, 0.08), transparent 42%),
    rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.07);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.vinv-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 70, 85, 0.35);
  background:
    linear-gradient(160deg, rgba(255, 70, 85, 0.14), transparent 48%),
    rgba(0, 0, 0, 0.42);
}

.vinv-item-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.06), transparent 62%),
    #07070c;
  overflow: hidden;
}

.vinv-item-media--noimg {
  background:
    linear-gradient(145deg, rgba(255, 70, 85, 0.12), transparent 55%),
    #0a0a12;
}

.vinv-item-media--noimg::after {
  content: '';
  position: absolute;
  inset: 28% 30%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%);
  opacity: 0.55;
}

.vinv-item-img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
  transition: transform 0.22s ease;
}

.vinv-item:hover .vinv-item-img {
  transform: scale(1.05);
}

.vinv-item-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
}

.vinv-item-count {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  min-width: 1.55rem;
  padding: 0.12rem 0.38rem;
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(255, 70, 85, 0.92);
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}

.vinv-item-foot {
  position: relative;
  padding: 0.45rem 0.55rem 0.55rem;
  min-height: 2.35rem;
  display: flex;
  align-items: flex-end;
}

.vinv-item-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.88);
}

.vinv-item-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #ff4655;
  transform-origin: left center;
  transform: scaleX(0.35);
  transition: transform 0.2s ease;
}

.vinv-item:hover .vinv-item-bar {
  transform: scaleX(1);
}

.vinv-item--compact .vinv-item-foot {
  min-height: 2rem;
  padding: 0.35rem 0.45rem 0.45rem;
}

.vinv-item--compact .vinv-item-name {
  font-size: 0.64rem;
  -webkit-line-clamp: 1;
}

.vinv-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 5px;
  margin-top: 1rem;
}

.vinv-slot {
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
}

.vinv-slot.is-filled {
  background: linear-gradient(145deg, rgba(255, 70, 85, 0.22), rgba(255, 70, 85, 0.05));
  border-color: rgba(255, 70, 85, 0.35);
}

.profile-inv-note {
  margin: 0.75rem 0 0;
  opacity: 0.75;
}

/* Houses / property panels */
.vhouse-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.35rem;
}

.vhouse {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(120deg, hsla(var(--vhouse-hue, 28), 70%, 48%, 0.1), transparent 46%),
    rgba(0, 0, 0, 0.28);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  overflow: hidden;
}

.vhouse-top {
  display: grid;
  grid-template-columns: minmax(140px, 240px) minmax(0, 1fr);
  gap: 0;
  min-height: 168px;
}

.vhouse-media {
  position: relative;
  min-height: 168px;
  background: #07070c;
  overflow: hidden;
}

.vhouse-media--noimg {
  background:
    linear-gradient(145deg, hsla(var(--vhouse-hue, 28), 55%, 28%, 0.35), #090912 70%);
}

.vhouse-media--noimg::before {
  content: '\f015';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: rgba(255, 255, 255, 0.18);
  z-index: 1;
}

.vhouse-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vhouse-media-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 55%, rgba(0, 0, 0, 0.55)),
    linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 42%);
}

.vhouse-info {
  position: relative;
  padding: 1rem 1.1rem 1.05rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
}

.vhouse-kicker {
  margin: 0;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ff4655;
}

.vhouse-name {
  margin: 0;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.1;
  color: #fff;
}

.vhouse-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.vhouse-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}

.vhouse-badge--perm {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
}

.vhouse-badge--muted {
  color: var(--text-muted);
  font-weight: 600;
}

.vhouse-statline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.vhouse-stat {
  padding: 0.45rem 0.55rem 0.55rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.vhouse-stat-l {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.vhouse-stat-v {
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #fff;
}

.vhouse-storage {
  padding: 0.85rem 1rem 1.05rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}

.vhouse-storage--empty {
  padding-bottom: 1rem;
}

.vhouse-storage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.15rem;
}

.vhouse-storage-kicker {
  margin: 0;
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vhouse-storage-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .vhouse-top {
    grid-template-columns: 1fr;
  }
  .vhouse-media {
    min-height: 150px;
  }
  .vinv-grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }
}

.users-admin-toolbar {
  margin-bottom: 1rem;
}

.users-admin-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.users-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.users-admin-table th,
.users-admin-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.users-admin-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.users-admin-table .users-admin-id {
  font-family: monospace;
  font-size: 0.85em;
}

.shop-wrap {
  position: relative;
  z-index: 10;
  padding: 0 1.5rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.shop-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.shop-sidebar {
  flex-shrink: 0;
  width: 220px;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  position: sticky;
  top: 120px;
}

.shop-sidebar-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.shop-categories-nav {
  margin-bottom: 1.5rem;
}

.shop-categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.shop-cat-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.shop-cat-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.shop-cat-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.shop-filter-block {
  margin-bottom: 1.25rem;
}

.shop-filter-block .shop-sidebar-label {
  margin-bottom: 0.5rem;
}

.shop-filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.shop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.shop-tag {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.shop-tag:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.1);
}

.shop-tag.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.14);
}

.shop-main {
  flex: 1;
  min-width: 0;
}

.shop-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.shop-toolbar-spacer {
  flex: 1;
  min-width: 0.5rem;
}

.shop-toolbar-sort-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.shop-sort {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.shop-toolbar-search-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.shop-toolbar-search-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.shop-toolbar-search {
  width: 12rem;
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.shop-toolbar-search::placeholder {
  color: var(--text-muted);
}

.shop-toolbar-search:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.25);
}

/* Кнопки админа в тулбаре: Добавить + Настройки */
.shop-toolbar-admin {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shop-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.shop-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.shop-toolbar-btn i {
  font-size: 0.9rem;
}

.shop-toolbar-dropdown-wrap {
  position: relative;
}

.shop-toolbar-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.25rem;
  min-width: 180px;
  padding: 0.25rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.shop-toolbar-dropdown[hidden] {
  display: none !important;
}

.shop-toolbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.shop-toolbar-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.shop-toolbar-dropdown-item i {
  width: 1.1em;
  opacity: 0.9;
}

.shop-grid-section {
  min-height: 200px;
}

@media (max-width: 768px) {
  .shop-layout {
    flex-direction: column;
  }
  .shop-sidebar {
    width: 100%;
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .shop-categories-nav {
    margin-bottom: 0;
  }
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
  }
}

.shop-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.shop-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow);
}

.shop-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.shop-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.shop-card:hover .shop-card-image img {
  transform: scale(1.03);
}

.shop-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.shop-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-card-price {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Лейблы и скидка — в левом нижнем углу поверх картинки, как роли в Discord */
.shop-card-badges {
  position: absolute;
  left: 0.4rem;
  bottom: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 1;
  pointer-events: none;
  max-width: calc(100% - 0.8rem);
}
.shop-card-label,
.shop-card-discount {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  align-self: flex-start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.shop-card-label {
  background: rgba(100, 180, 255, 0.92);
  color: #0a0a0a;
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.shop-card-label[data-color] {
  border-color: rgba(0, 0, 0, 0.2);
}
.shop-card-discount {
  background: rgba(220, 80, 80, 0.92);
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.shop-card-badges + img {
  display: block;
}

/* Скрытая карточка (видна только админу) */
.shop-card--hidden {
  opacity: 0.7;
  border-style: dashed;
}
.shop-card--hidden .shop-card-image::after {
  content: 'Скрыто';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

/* Кнопки админа на карточке */
.shop-card-admin-actions {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  display: flex;
  gap: 0.25rem;
  z-index: 2;
}
.shop-card-admin-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-xs);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}
.shop-card-admin-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.05);
}
.shop-card-admin-btn.shop-card-admin-delete:hover {
  background: rgba(180, 60, 60, 0.9);
}
.shop-card-admin-btn i {
  font-size: 0.85rem;
}
.shop-card-admin-btn-loading i {
  font-size: 0.9rem;
}

/* Кружок загрузки на сетке при обновлении данных */
.shop-grid-loading {
  position: relative;
  pointer-events: none;
}
.shop-grid-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.5);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.shop-grid-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: shop-grid-spin 0.8s linear infinite;
  z-index: 2;
}
@keyframes shop-grid-spin {
  to { transform: rotate(360deg); }
}

.shop-price-rows {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.shop-price-row {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.shop-price-row .shop-price-mes::before {
  content: 'В месяц: ';
  color: var(--text-muted);
  opacity: 0.9;
}

.shop-price-row .shop-price-nav::before {
  content: 'Навсегда: ';
  color: var(--text-muted);
  opacity: 0.9;
}

.shop-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.shop-empty p {
  margin: 0;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* Shop modal */
.shop-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.shop-modal[data-open="true"] {
  opacity: 1;
  visibility: visible;
}

.shop-modal[data-open="true"] .shop-modal-dialog {
  transform: scale(1);
}

.shop-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.shop-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--bg-darker);
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.shop-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-xs);
  z-index: 2;
  transition: var(--transition);
}

.shop-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
}

.shop-modal-content {
  padding: 2rem 1.5rem 1.5rem;
  position: relative;
}

.shop-modal-back {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.shop-modal-back:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
}

.shop-modal-title {
  margin: 0 0 0.25rem;
  padding-right: 2.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.shop-modal-price {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.shop-modal-price .shop-price-rows {
  gap: 0.35rem;
}

.shop-modal-price .shop-price-row {
  font-size: 0.95rem;
}

.shop-modal-gallery {
  position: relative;
  width: 100%;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.shop-modal-image-wrap {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.shop-modal-image-wrap img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: pointer;
}

.shop-modal-gallery-prev,
.shop-modal-gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.shop-modal-gallery-prev { left: 0.5rem; }
.shop-modal-gallery-next { right: 0.5rem; }

.shop-modal-gallery-prev:hover,
.shop-modal-gallery-next:hover {
  background: rgba(0, 0, 0, 0.75);
}

.shop-modal-counter {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.shop-modal-link {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  margin-bottom: 1rem;
}

.shop-modal-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

.shop-modal-link--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.shop-modal-link--disabled:hover {
  background: rgba(255, 255, 255, 0.12);
}

.shop-modal-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.shop-modal-note a {
  color: var(--text-secondary);
  text-decoration: underline;
}

.shop-modal-note a:hover {
  color: var(--text-primary);
}

/* --- Shop admin panel --- */
.shop-admin-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 12, 0.97);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 70vh;
  overflow: auto;
}

.shop-admin-wrap[hidden] {
  display: none !important;
}

.shop-admin-inner {
  padding: 1rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.shop-admin-label {
  margin-right: 0.75rem;
  color: var(--text-secondary);
}

.shop-admin-login {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.shop-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font: inherit;
  transition: var(--transition);
}

.shop-admin-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.shop-admin-btn-logout {
  background: rgba(200, 80, 80, 0.3);
}

.shop-admin-btn-logout:hover {
  background: rgba(200, 80, 80, 0.5);
}

.shop-admin-btn-add {
  margin-top: 0.5rem;
}

.shop-admin-msg {
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.shop-admin-msg-error {
  color: #e88;
}

.shop-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.shop-admin-user {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.shop-admin-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.shop-admin-section {
  margin-bottom: 0.5rem;
}

.shop-admin-h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.shop-admin-catalog-row,
.shop-admin-item-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-admin-catalog-row span,
.shop-admin-item-row span {
  flex: 1;
  font-size: 0.9rem;
}

.shop-admin-panel small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.shop-admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.shop-admin-modal[hidden] {
  display: none !important;
}

.shop-admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.shop-admin-modal-dialog {
  position: relative;
  background: var(--bg-card, #1a1a1e);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
}

/* Редактирование товара: превью слева, форма справа */
.shop-admin-edit-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.shop-admin-modal-dialog:has(.shop-admin-edit-layout) {
  max-width: 680px;
}
.shop-admin-edit-preview {
  flex-shrink: 0;
  width: 200px;
}
.shop-admin-preview-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.shop-admin-preview-slot {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.shop-admin-preview-slot .shop-admin-preview-card,
.shop-admin-preview-slot .shop-card {
  margin: 0;
  pointer-events: none;
  width: 100%;
}
.shop-admin-edit-form-wrap {
  flex: 1;
  min-width: 0;
}

.shop-admin-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.shop-admin-modal-close:hover {
  color: var(--text-primary);
}

.shop-admin-form label {
  display: block;
  margin-top: 0.75rem;
}
.shop-admin-form label.shop-admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.shop-admin-form input[type="text"],
.shop-admin-form input[type="number"],
.shop-admin-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  font: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shop-admin-form input[type="text"]:focus,
.shop-admin-form input[type="number"]:focus,
.shop-admin-form textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.shop-admin-form textarea {
  min-height: 80px;
  resize: vertical;
}

/* Блок цены: два поля «на месяц» / «навсегда» */
.shop-admin-price-block {
  margin-bottom: 1rem;
}

.shop-admin-price-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.shop-admin-discount-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.shop-admin-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.shop-admin-input-wrap--wide {
  grid-column: 1 / -1;
}

.shop-admin-input-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

.shop-admin-input {
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shop-admin-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.shop-admin-input--price {
  font-variant-numeric: tabular-nums;
}

.shop-admin-input--discount {
  min-width: 0;
}

.shop-admin-price-hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.shop-admin-computed {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.shop-admin-discount-block {
  margin-top: 1rem;
}

.shop-admin-discount-block label {
  margin-top: 0;
}

@media (max-width: 420px) {
  .shop-admin-price-fields {
    grid-template-columns: 1fr;
  }
  .shop-admin-discount-fields {
    grid-template-columns: 1fr;
  }
}

.shop-admin-form .shop-admin-form-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.5rem;
}

.shop-admin-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 0.35rem;
}

/* Тогглы без галочек: скрытый чекбокс + кнопка-чип */
.shop-admin-toggle-wrap input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.shop-admin-form label.shop-admin-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  cursor: pointer;
}

.shop-admin-form label.shop-admin-label-option {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-top: 0;
}

/* Кнопка-чип лейбла */
.shop-admin-label-chip {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--text-secondary);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.shop-admin-toggle-wrap input:not(:checked) + .shop-admin-label-chip {
  background: transparent !important;
}

.shop-admin-toggle-wrap input:checked + .shop-admin-label-chip {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.shop-admin-toggle-wrap input:checked + .shop-admin-label-chip[style*="background"] {
  color: #0a0a0a;
}

.shop-admin-toggle-wrap:hover .shop-admin-label-chip {
  border-color: rgba(255, 255, 255, 0.45);
}

/* Кнопка-чип тега */
.shop-admin-tag-chip {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--text-secondary);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.shop-admin-toggle-wrap input:checked + .shop-admin-tag-chip {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--text-primary);
}

.shop-admin-toggle-wrap:hover .shop-admin-tag-chip {
  border-color: rgba(255, 255, 255, 0.4);
}

.shop-admin-tag-group {
  margin-bottom: 0.75rem;
}

.shop-admin-tag-group-title {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.shop-admin-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}

.shop-admin-settings-block {
  margin-bottom: 1.25rem;
}

.shop-admin-settings-block strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.shop-admin-settings-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shop-admin-settings-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-admin-settings-list li span {
  flex: 1;
  font-size: 0.9rem;
}

.shop-admin-btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.shop-admin-btn-danger {
  background: var(--danger, #c53030);
  color: #fff;
}
.shop-admin-btn-danger:hover {
  filter: brightness(1.1);
}

.shop-admin-backup-file-input {
  display: block;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.shop-admin-empty-list {
  margin: 0;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Вкладки в настройках */
.shop-admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}
.shop-admin-tab {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -1px;
}
.shop-admin-tab:hover {
  color: var(--text-secondary);
}
.shop-admin-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}
.shop-admin-tab-panel {
  margin-bottom: 1rem;
}

/* Добавление элемента в настройках */
.shop-admin-settings-add {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.shop-admin-settings-add-input {
  flex: 1;
  min-width: 120px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
}
.shop-admin-labels-add .shop-admin-settings-add-input {
  min-width: 100px;
}
.shop-admin-label-color-input {
  max-width: 8rem;
}
.shop-admin-labels-list .shop-admin-label-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

/* ==========================================================================
   Пополнение счёта (topup.html)
   ========================================================================== */
.topup-page {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 160px 32px 120px;
  display: flex;
  justify-content: center;
}

.topup-wrap {
  width: 100%;
  max-width: 480px;
}

.topup-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--text-primary);
  margin: 0 0 8px;
}

.topup-subtitle {
  color: var(--text-muted);
  margin: 0 0 32px;
  font-size: 0.95rem;
}

.topup-form {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topup-page [hidden] {
  display: none !important;
}

.topup-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topup-field label,
.topup-field-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.topup-servers {
  display: flex;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  overflow: hidden;
}

.topup-server-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7rem 0.7rem;
  cursor: pointer;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: color 0.15s, background 0.15s;
  min-width: 0;
}

.topup-server-btn:hover {
  color: var(--text-primary);
}

.topup-server-btn.is-active {
  color: #fff;
  background: rgba(255, 70, 85, 0.22);
}

.topup-server-btn-label {
  font-weight: 500;
  opacity: 0.75;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
}

@media (max-width: 560px) {
  .topup-server-btn-label {
    display: none;
  }
}

.topup-field input {
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  font: inherit;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topup-field input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.topup-summary {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topup-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.topup-summary-row strong {
  color: var(--text-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.topup-summary-total {
  padding-top: 10px;
  border-top: 1px solid var(--glass-border);
  font-size: 1rem;
}

.topup-summary-total strong {
  font-size: 1.1rem;
}

.topup-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.4;
}

.topup-checkbox input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.topup-checkbox a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--glass-border);
}

.topup-checkbox a:hover {
  text-decoration-color: var(--text-primary);
}

.topup-pay-btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.topup-pay-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.topup-pay-status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
  margin: 16px 0 0;
  width: 100%;
  max-width: 480px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
  min-height: 1.1em;
}

.topup-balance {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  background: rgba(255, 196, 72, 0.08);
  border: 1px solid rgba(255, 196, 72, 0.22);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.topup-balance-title {
  font-weight: 600;
}

.topup-balance-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topup-balance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topup-balance-item strong {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.topup-seed-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topup-error {
  margin: 0;
  color: #f87171;
  font-size: 0.85rem;
  text-align: center;
}

.topup-pay-status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

@media (max-width: 560px) {
  .topup-page {
    padding: 130px 20px 80px;
  }
}

/* ==========================================================================
   Главная — новый лендинг (hero-видео, about, howto, карусель, футер)
   ========================================================================== */

.main-page-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  overflow: visible;
}

/* --- Hero видео --- */
.hero-video-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Растворяем видео в #08080f по всем краям */
.hero-video-fade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 35%, #08080f 92%),
    linear-gradient(to bottom, #08080f 0%, transparent 18%, transparent 82%, #08080f 100%),
    linear-gradient(to right, #08080f 0%, transparent 12%, transparent 88%, #08080f 100%);
}

.hero-video-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero-video-eyebrow {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  max-width: 520px;
}

.hero-video-title {
  margin: 0;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.1;
  color: var(--text-primary);
}

.hero-video-cta {
  margin-top: 8px;
}

.hero-video-note {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero-video-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  animation: hero-scroll-bounce 2s ease-in-out infinite;
}

.hero-video-scroll-hint:hover {
  color: var(--text-primary);
}

@keyframes hero-scroll-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* --- О проекте --- */
.landing-about {
  position: relative;
  z-index: 1;
  padding: 80px 32px 60px;
  background: transparent;
}

.landing-about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  background:
    linear-gradient(to bottom, #08080f 0%, transparent 100%),
    linear-gradient(to right, #08080f 0%, transparent 12%, transparent 88%, #08080f 100%);
  pointer-events: none;
  z-index: 0;
}

.landing-about-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-section-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  color: var(--text-primary);
  margin: 0 0 20px;
  text-align: left;
}

.landing-about-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 380px;
}

.landing-about-left {
  position: relative;
  z-index: 3;
  width: 45%;
  max-width: 45%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.landing-about-text {
  text-align: left;
}

.landing-about-desc {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
  width: 100%;
}

.landing-about-desc strong {
  color: var(--text-primary);
}

/* 3D-окно видео — как «Карта сервера» на demonslayer */
.landing-video-preview {
  position: absolute;
  top: 50%;
  right: 0;
  width: 68%;
  max-width: 748px;
  z-index: 2;
  perspective: 1200px;
  transform: translate(10%, -50%);
  pointer-events: auto;
}

.landing-video-preview .landing-video-frame-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--glass-border);
  background: var(--bg-dark);
  transform: perspective(1000px) rotateY(-8deg) rotateX(2deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.landing-video-preview .landing-video-frame-wrap:hover {
  transform: perspective(1000px) scale(1.02) rotateY(-6deg) rotateX(1deg);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--glass-border);
}

.landing-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d0e12;
  overflow: hidden;
  border-radius: 6px;
}

.landing-video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.guide-video-loading {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, #12131a 8%, #1a1b24 18%, #12131a 33%);
  background-size: 200% 100%;
  animation: guide-video-shimmer 1.4s ease-in-out infinite;
}

@keyframes guide-video-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.guide-video-preview-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background-color: #0d0e12;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.guide-video-preview-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.25);
  transition: background 0.2s ease;
}

.guide-video-preview-btn:hover::before {
  background: rgba(5, 5, 8, 0.12);
}

.guide-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 1.35rem;
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.guide-video-play i {
  margin-left: 4px;
}

.guide-video-preview-btn:hover .guide-video-play {
  transform: translate(-50%, -50%) scale(1.06);
  background: rgba(255, 255, 255, 0.22);
}

.guide-video-local {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: contain;
}

@media (max-width: 900px) {
  .landing-about-row {
    flex-direction: column;
    min-height: 0;
    gap: 32px;
  }
  .landing-about-left {
    width: 100%;
    max-width: 100%;
  }
  .landing-video-preview {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    transform: none;
  }
  .landing-video-preview .landing-video-frame-wrap {
    transform: perspective(1000px) rotateY(-4deg) rotateX(1deg);
  }
}

/* --- Как начать играть (внутри блока «О проекте») --- */
.landing-about .landing-howto {
  position: relative;
  z-index: 1;
  padding: 0;
  background: transparent;
  width: 90%;
}

.landing-about .landing-howto-heading {
  margin: 0 0 14px;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.landing-howto-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-howto-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.landing-howto-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.landing-howto-icon {
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  font-size: 1rem;
  color: var(--text-secondary);
}

.landing-howto-label {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
}

.landing-howto-connect {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

/* --- Соцсети --- */
.landing-social {
  position: relative;
  z-index: 1;
  padding: 8px 32px 48px;
  background: transparent;
}

.landing-social-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.landing-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.landing-social-link:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.landing-social-link i {
  font-size: 1rem;
}

/* --- Карусель фич --- */
.feature-carousel-section {
  position: relative;
  z-index: 1;
  padding: 40px 0 60px;
  background: transparent;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: hidden;
}

.carousel-viewport > .feature-carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
}

.carousel-viewport > .feature-carousel-arrow-prev,
.carousel-viewport > .wiki-news-arrow-prev {
  left: 20px;
}

.carousel-viewport > .feature-carousel-arrow-next,
.carousel-viewport > .wiki-news-arrow-next {
  right: 20px;
}

.feature-carousel {
  display: flex;
  gap: 20px;
  width: max-content;
  will-change: transform;
  transition: transform 0.75s cubic-bezier(0.3, 1.4, 0.55, 1);
}

.feature-slide {
  position: relative;
  flex: 0 0 auto;
  width: min(700px, 90vw);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transform: scale(0.86);
  opacity: 0.4;
  will-change: transform, opacity;
  transition: transform 0.75s cubic-bezier(0.3, 1.4, 0.55, 1), opacity 0.6s ease;
}

.feature-slide.carousel-slide--active {
  transform: scale(1);
  opacity: 1;
}

.feature-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 5, 8, 0.92) 0%, rgba(5, 5, 8, 0.35) 45%, transparent 75%);
}

.feature-slide-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-slide-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  backdrop-filter: blur(4px);
}

.feature-slide-title {
  margin: 0;
  font-family: 'Unbounded', sans-serif;
  font-size: 1.3rem;
  color: var(--text-primary);
  line-height: 1.25;
}

.feature-slide-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.feature-carousel-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(14, 13, 22, 0.88);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.feature-carousel-arrow:hover {
  background: var(--bg-card-hover);
}

/* --- Новости из вики --- */
.wiki-news-section {
  position: relative;
  z-index: 1;
  padding: 24px 0 32px;
  background: transparent;
}

.wiki-news-header {
  max-width: 1400px;
  margin: 0 auto 28px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wiki-news-title {
  margin: 0;
}

.wiki-news-more {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.wiki-news-more:hover {
  color: var(--text-primary);
}

.wiki-news-carousel {
  display: flex;
  gap: 20px;
  width: max-content;
  will-change: transform;
  transition: transform 0.75s cubic-bezier(0.3, 1.4, 0.55, 1);
}

.wiki-news-slide {
  display: block;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
  width: min(520px, 85vw);
  aspect-ratio: 32 / 9;
}

.wiki-news-slide:hover {
  filter: brightness(1.1);
}

.wiki-news-slide:not([style*="background-image"]) {
  background: linear-gradient(135deg, rgba(30, 30, 45, 0.95), rgba(12, 12, 20, 0.98));
}

.wiki-news-slide-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.wiki-news-slide-title {
  font-size: 1rem;
  line-height: 1.2;
}

.wiki-news-slide-text {
  padding: 14px 16px;
  gap: 4px;
}

.wiki-news-slide-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.78rem;
}


/* --- Футер --- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--glass-border);
  padding: 48px 32px;
}

.site-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.site-footer-logo {
  font-size: 1.3rem;
}

.site-footer-info {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  align-items: flex-start;
}

.site-footer-disclaimer {
  flex: 1 1 260px;
  max-width: 420px;
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.site-footer-legal {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-footer-legal p {
  margin: 0;
  font-size: 0.66rem;
  color: var(--text-muted);
}

.site-footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer-legal a:hover {
  color: var(--text-primary);
}

.site-footer-links {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

.site-footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer-col h4 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
}

.site-footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-footer-col a i {
  width: 1rem;
  text-align: center;
}

.site-footer-col a:hover {
  color: var(--text-primary);
}

@media (max-width: 560px) {
  .landing-howto-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .landing-howto-connect {
    width: 100%;
  }
  .landing-howto-connect .btn {
    flex: 1;
    justify-content: center;
  }
  .carousel-viewport > .feature-carousel-arrow {
    width: 38px;
    height: 38px;
  }
  .carousel-viewport > .feature-carousel-arrow-prev,
  .carousel-viewport > .wiki-news-arrow-prev {
    left: 10px;
  }
  .carousel-viewport > .feature-carousel-arrow-next,
  .carousel-viewport > .wiki-news-arrow-next {
    right: 10px;
  }
  .site-footer-inner {
    flex-direction: column;
  }
}

/* --- Маркетплейс (аукцион) --- */
.market-wrap {
  position: relative;
  z-index: 10;
  padding: 0 1.5rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

body[data-page="market"] .market-wrap {
  padding-top: 110px;
}

.market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.market-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.market-tab:hover,
.market-tab.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.market-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.market-sidebar {
  flex-shrink: 0;
  width: 220px;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  position: sticky;
  top: 120px;
}

.market-sidebar-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.market-categories-list,
.market-filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.market-filter-block {
  margin-top: 1.25rem;
}

.market-cat-btn,
.market-filter-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.market-cat-btn:hover,
.market-filter-btn:hover,
.market-cat-btn.active,
.market-filter-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.market-main {
  flex: 1;
  min-width: 0;
}

.market-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
}

.market-toolbar-sort-label,
.market-toolbar-search-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.market-sort,
.market-toolbar-search {
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
  border-radius: var(--radius-xs);
  padding: 0.45rem 0.65rem;
  font-family: inherit;
  font-size: 0.85rem;
}

.market-toolbar-search {
  min-width: 200px;
}

.market-toolbar-spacer {
  flex: 1;
}

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

.market-refresh-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.market-refresh-btn:hover:not(:disabled) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.market-loading,
.market-error {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.market-loading {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.market-error {
  border: 1px solid rgba(255, 100, 100, 0.35);
  background: rgba(120, 20, 20, 0.25);
  color: #ffb4b4;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

.market-card {
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.market-card:hover,
.market-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  outline: none;
}

.market-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0a0a10;
}

.market-card-media--noimg {
  background: linear-gradient(145deg, hsl(var(--market-hue, 220) 30% 14%), hsl(var(--market-hue, 220) 22% 8%));
}

.market-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.market-card-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 38%, hsl(var(--market-hue, 220) 32% 7% / 0.94) 96%),
    linear-gradient(to top, hsl(var(--market-hue, 220) 28% 5% / 0.97) 0%, transparent 48%),
    linear-gradient(to bottom, hsl(var(--market-hue, 220) 28% 5% / 0.4) 0%, transparent 24%),
    linear-gradient(to right, hsl(var(--market-hue, 220) 28% 5% / 0.65) 0%, transparent 14%, transparent 86%, hsl(var(--market-hue, 220) 28% 5% / 0.65) 100%);
}

.market-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 8px 9px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.market-card-price {
  font-size: 0.72rem;
  font-weight: 700;
  color: #b8ffc8;
  letter-spacing: 0.01em;
}

.market-card-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.market-card-meta {
  font-size: 0.64rem;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.market-houses-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.market-house-card {
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  overflow: hidden;
  padding: 0;
}

.market-house-media {
  position: relative;
  width: 100%;
  aspect-ratio: 512 / 256;
  overflow: hidden;
  background: #0a0a10;
}

.market-house-media--noimg {
  background: linear-gradient(145deg, hsl(var(--market-hue, 28) 30% 14%), hsl(var(--market-hue, 28) 22% 8%));
}

.market-house-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.market-house-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 42%, hsl(var(--market-hue, 28) 32% 7% / 0.92) 98%),
    linear-gradient(to top, hsl(var(--market-hue, 28) 28% 5% / 0.96) 0%, transparent 50%),
    linear-gradient(to bottom, hsl(var(--market-hue, 28) 28% 5% / 0.35) 0%, transparent 22%),
    linear-gradient(to right, #08080f 0%, transparent 10%, transparent 90%, #08080f 100%);
}

.market-house-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 10px 12px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}

.market-house-price {
  font-size: 0.78rem;
  font-weight: 700;
  color: #b8ffc8;
}

.market-house-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.market-house-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.market-history-table-wrap,
.market-offers-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
}

.market-history-table,
.market-offers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.market-history-table th,
.market-history-table td,
.market-offers-table th,
.market-offers-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--glass-border);
  text-align: left;
  vertical-align: top;
}

.market-history-table th,
.market-offers-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
}

.market-history-class {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.market-empty {
  margin-top: 1rem;
  text-align: center;
  color: var(--text-secondary);
}

body.market-modal-open {
  overflow: hidden;
}

.market-modal[hidden] {
  display: none !important;
}

.market-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.market-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 8, 0.75);
  backdrop-filter: blur(6px);
}

.market-modal-dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: #12131a;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.market-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
}

.market-modal-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 1rem;
  padding-right: 40px;
}

.market-modal-icon {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0a0a10;
}

.market-modal-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.market-modal-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 35%, hsl(var(--market-hue, 220) 32% 7% / 0.9) 96%),
    linear-gradient(to top, hsl(var(--market-hue, 220) 28% 5% / 0.85) 0%, transparent 50%);
}

.market-modal-icon--fallback {
  background: linear-gradient(135deg, hsl(var(--market-hue, 220) 35% 18%), hsl(var(--market-hue, 220) 25% 10%));
}

.market-modal-title {
  margin: 0;
  font-size: 1.2rem;
}

.market-modal-meta {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.market-modal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 1rem;
}

.market-modal-stat {
  padding: 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}

.market-modal-stat span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.market-modal-section {
  margin-top: 1rem;
}

.market-modal-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.market-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 140px;
  padding: 12px 8px 0;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  overflow-x: auto;
}

.market-chart-bar {
  flex: 1 0 28px;
  min-width: 28px;
  position: relative;
  background: linear-gradient(to top, rgba(120, 220, 150, 0.85), rgba(120, 220, 150, 0.35));
  border-radius: 4px 4px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.market-chart-bar-value {
  position: absolute;
  top: -18px;
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.market-chart-bar-label {
  position: absolute;
  bottom: -22px;
  font-size: 0.62rem;
  color: var(--text-muted);
  white-space: nowrap;
  transform: rotate(-35deg);
  transform-origin: top left;
}

.market-chart-empty {
  margin: 0;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .market-houses-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .market-layout {
    flex-direction: column;
  }
  .market-sidebar {
    width: 100%;
    position: static;
  }
  .market-categories-list,
  .market-filter-row {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .market-cat-btn,
  .market-filter-btn {
    width: auto;
  }
  .market-modal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .market-wrap {
    padding: 0 1rem 3rem;
  }
  .market-toolbar-search {
    min-width: 0;
    width: 100%;
  }
  .market-modal-summary {
    grid-template-columns: 1fr;
  }
}

/* --- Угощение печеньем (левый нижний угол) --- */
.cookie-treat {
  position: fixed;
  left: 15px;
  bottom: 15px;
  z-index: 9500;
  display: flex;
  align-items: center;
  max-width: min(720px, calc(100vw - 40px));
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  pointer-events: none;
  overflow: visible;
}

.cookie-treat--visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-treat-cookie-wrap {
  position: relative;
  z-index: 4;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  margin-right: -39px;
}

.cookie-treat-cookie {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.38) 0%, transparent 20%),
    radial-gradient(circle at 72% 80%, rgba(0, 0, 0, 0.2) 0%, transparent 24%),
    radial-gradient(ellipse at 42% 36%, #f2cc82 0%, #d9a85a 40%, #b87b38 72%, #8f5a28 100%);
  box-shadow:
    inset 0 -5px 9px rgba(0, 0, 0, 0.24),
    inset 0 4px 8px rgba(255, 255, 255, 0.22),
    0 5px 14px rgba(0, 0, 0, 0.38);
  transition: transform 0.35s ease, opacity 0.4s ease, clip-path 0.5s ease;
}

.cookie-treat-chip {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6b4a35, #3d2418 75%);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.cookie-treat-panel {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 69px;
  min-width: 420px;
  padding: 0 14px 0 51px;
  background: rgba(14, 13, 22, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  box-shadow: 0 8px 27px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.cookie-treat-bite-marks {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.cookie-treat-bite {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #08070f;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

.cookie-treat--eating .cookie-treat-bite {
  animation: cookie-treat-bite-in 0.42s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
  animation-delay: var(--d);
}

@keyframes cookie-treat-bite-in {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  55% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.cookie-treat-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.cookie-treat-title {
  margin: 0;
  font-family: 'Unbounded', sans-serif;
  font-size: 0.71rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.cookie-treat-text {
  margin: 0;
  font-size: 0.49rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.cookie-treat-btn {
  flex-shrink: 0;
  padding: 6px 11px;
  font-size: 0.59rem;
  white-space: nowrap;
}

.cookie-treat-crumbs {
  position: absolute;
  left: 48px;
  top: 48px;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 6;
}

.cookie-treat-crumb {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 40% 60% 55% 45%;
  background: radial-gradient(circle at 30% 25%, #e8b86d, #a66f32);
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.25);
  animation: cookie-treat-crumb-fly 0.75s ease-out forwards;
}

@keyframes cookie-treat-crumb-fly {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.2);
    opacity: 0;
  }
}

.cookie-treat--eating {
  transition: none;
  animation: cookie-treat-wobble 0.55s ease-in-out 0.1s;
}

.cookie-treat--eating .cookie-treat-cookie {
  animation: cookie-treat-cookie-eaten 1.9s ease-in-out forwards;
}

.cookie-treat--eating .cookie-treat-chip:nth-child(1) { animation: cookie-treat-chip-fall 0.5s ease-out 0.15s forwards; }
.cookie-treat--eating .cookie-treat-chip:nth-child(2) { animation: cookie-treat-chip-fall 0.5s ease-out 0.35s forwards; }
.cookie-treat--eating .cookie-treat-chip:nth-child(3) { animation: cookie-treat-chip-fall 0.5s ease-out 0.55s forwards; }
.cookie-treat--eating .cookie-treat-chip:nth-child(4) { animation: cookie-treat-chip-fall 0.5s ease-out 0.75s forwards; }
.cookie-treat--eating .cookie-treat-chip:nth-child(5) { animation: cookie-treat-chip-fall 0.5s ease-out 0.95s forwards; }
.cookie-treat--eating .cookie-treat-chip:nth-child(6) { animation: cookie-treat-chip-fall 0.5s ease-out 1.15s forwards; }

@keyframes cookie-treat-wobble {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  20% { transform: translateY(0) rotate(-1.2deg); }
  40% { transform: translateY(0) rotate(1deg); }
  60% { transform: translateY(0) rotate(-0.8deg); }
  80% { transform: translateY(0) rotate(0.5deg); }
}

@keyframes cookie-treat-cookie-eaten {
  0% {
    clip-path: circle(100% at 50% 50%);
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  25% {
    clip-path: polygon(0 0, 100% 0, 100% 55%, 72% 68%, 58% 100%, 0 100%);
  }
  50% {
    clip-path: polygon(18% 0, 100% 0, 100% 38%, 82% 58%, 100% 100%, 0 100%, 0 42%);
    transform: scale(0.92) rotate(-6deg);
  }
  75% {
    clip-path: polygon(38% 22%, 72% 0, 100% 28%, 88% 62%, 100% 100%, 22% 100%, 0 68%, 0 38%);
    transform: scale(0.7) rotate(8deg);
    opacity: 0.7;
  }
  100% {
    clip-path: polygon(50% 50%, 50% 50%, 50% 50%);
    transform: scale(0.2) rotate(15deg);
    opacity: 0;
  }
}

@keyframes cookie-treat-chip-fall {
  to {
    transform: translate(-50%, calc(-50% + 21px)) rotate(120deg);
    opacity: 0;
  }
}

.cookie-treat--eating .cookie-treat-title {
  animation: cookie-treat-text-bite 0.55s ease-out 0.9s forwards;
}

.cookie-treat--eating .cookie-treat-text {
  animation: cookie-treat-text-bite 0.55s ease-out 1.15s forwards;
}

.cookie-treat--eating .cookie-treat-btn {
  animation: cookie-treat-text-bite 0.45s ease-out 1.35s forwards;
}

@keyframes cookie-treat-text-bite {
  0% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateX(0);
  }
  40% {
    clip-path: inset(0 28% 0 0);
    transform: translateX(4px);
  }
  100% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
    transform: translateX(8px);
  }
}

.cookie-treat--gone {
  animation: cookie-treat-vanish 0.65s ease-in forwards !important;
  pointer-events: none;
}

@keyframes cookie-treat-vanish {
  0% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
    transform: scale(1);
  }
  35% {
    clip-path: polygon(0 8%, 88% 0, 100% 72%, 64% 100%, 0 92%);
    transform: scale(0.96);
  }
  70% {
    clip-path: polygon(22% 18%, 78% 12%, 92% 58%, 48% 100%, 8% 82%);
    opacity: 0.45;
    transform: scale(0.82);
  }
  100% {
    clip-path: polygon(50% 50%, 50% 50%, 50% 50%);
    opacity: 0;
    transform: scale(0.55) translateY(12px);
  }
}

@media (max-width: 640px) {
  .cookie-treat {
    left: 9px;
    right: 9px;
    bottom: 9px;
    max-width: none;
  }

  .cookie-treat-cookie-wrap {
    width: 72px;
    height: 72px;
    margin-right: -30px;
  }

  .cookie-treat-cookie {
    width: 72px;
    height: 72px;
  }

  .cookie-treat-panel {
    min-width: 0;
    height: 60px;
    padding: 0 9px 0 39px;
    gap: 8px;
  }

  .cookie-treat-title {
    font-size: 0.62rem;
  }

  .cookie-treat-text {
    font-size: 0.45rem;
  }

  .cookie-treat-btn {
    padding: 5px 8px;
    font-size: 0.54rem;
  }

  .cookie-treat-crumbs {
    left: 36px;
    top: 36px;
  }
}

/* --- Discord channel ACL (/letsconfigureadiscord) --- */
.discord-acl-wrap {
  max-width: 1400px;
}

.discord-acl-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.35rem;
}

.discord-acl-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.discord-acl-tab:hover {
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
}

.discord-acl-tab.is-active {
  color: inherit;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.35);
}

.discord-acl-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.discord-acl-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.discord-acl-toolbar-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.discord-acl-roles-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: min(70vh, 720px);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.discord-acl-role {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.discord-acl-role:hover {
  background: rgba(255, 255, 255, 0.04);
}

.discord-acl-role.is-active {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--glass-border);
}

.discord-acl-role-name {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.25;
}

.discord-acl-role-pos {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.discord-acl-channel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.85rem;
}

.discord-acl-selected-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.discord-acl-selected-meta {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.discord-acl-hint {
  margin: 0;
  max-width: 28rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.discord-acl-hint-block {
  max-width: none;
  margin-bottom: 0.85rem;
}

.discord-acl-savebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(134, 239, 172, 0.28);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.08);
}

.discord-acl-savebar-count {
  font-size: 0.85rem;
  font-weight: 600;
}

.discord-acl-savebar-actions {
  display: flex;
  gap: 0.45rem;
}

.discord-acl-perm.is-dirty {
  outline: 1px solid rgba(250, 204, 21, 0.7);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.25);
}

.discord-acl-status {
  margin-bottom: 0.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  white-space: pre-wrap;
  line-height: 1.4;
  max-width: 100%;
}

.discord-acl-status--ok {
  color: #86efac;
}

.discord-acl-status--error {
  color: #fca5a5;
}

.discord-acl-status--pending {
  color: var(--text-muted);
}

.discord-acl-table-wrap {
  overflow: auto;
  max-height: min(72vh, 780px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}

.discord-acl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  white-space: nowrap;
}

.discord-acl-table th,
.discord-acl-table td {
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid var(--glass-border);
  text-align: center;
  vertical-align: middle;
}

.discord-acl-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(18, 18, 22, 0.96);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}

.discord-acl-col-channel {
  text-align: left !important;
  min-width: 200px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(18, 18, 22, 0.96);
}

.discord-acl-table thead .discord-acl-col-channel {
  z-index: 3;
}

.discord-acl-row--category .discord-acl-col-channel,
.discord-acl-row--category td {
  background: rgba(255, 255, 255, 0.03);
}

.discord-acl-ch-icon {
  margin-right: 0.4rem;
  opacity: 0.7;
  width: 0.9rem;
  text-align: center;
}

.discord-acl-ch-name.is-category {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

.discord-acl-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  margin-right: 0.2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
}

.discord-acl-perm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border-radius: 5px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.discord-acl-perm:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.discord-acl-perm:disabled {
  opacity: 0.5;
  cursor: wait;
}

.discord-acl-perm--allow {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.35);
  background: rgba(34, 197, 94, 0.12);
}

.discord-acl-perm--deny {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.35);
  background: rgba(239, 68, 68, 0.12);
}

.discord-acl-cell--na {
  color: var(--text-muted);
  opacity: 0.35;
}

.discord-acl-history-wrap {
  overflow: auto;
  max-height: min(72vh, 780px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}

.discord-acl-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.discord-acl-history-table th,
.discord-acl-history-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--glass-border);
  text-align: left;
  vertical-align: top;
}

.discord-acl-history-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(18, 18, 22, 0.96);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
}

.discord-acl-history-when {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.discord-acl-history-what {
  line-height: 1.35;
  max-width: 42rem;
}

.discord-acl-history-error {
  margin-top: 0.25rem;
  color: #fca5a5;
  font-size: 0.78rem;
}

.discord-acl-history-row.is-error td {
  background: rgba(239, 68, 68, 0.06);
}

/* Thin scrollbars (ACL page) */
.discord-acl-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.discord-acl-scroll::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.discord-acl-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.discord-acl-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.discord-acl-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.38);
}

.discord-acl-scroll::-webkit-scrollbar-corner {
  background: transparent;
}

@media (max-width: 900px) {
  .discord-acl-layout {
    grid-template-columns: 1fr;
  }

  .discord-acl-roles-list {
    max-height: 220px;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .discord-acl-role {
    width: auto;
    min-width: 140px;
  }

  .discord-acl-tabs {
    overflow-x: auto;
  }
}
