:root {
  --brand: #1a4d2e;
  --brand-2: #2d6a4f;
  --accent: #f5a524;
  --bg: #0f1e13;
  --surface: #1a2e1f;
  --surface-2: #243329;
  --text: #e8f5e9;
  --muted: #9caf9f;
  --border: #2d4a35;
  --grad: linear-gradient(135deg, #1a4d2e 0%, #0f1e13 100%);
  --shadow-neon: 0 0 20px rgba(245,165,36,0.4);
  --ease-bounce: cubic-bezier(0.68,-0.55,0.27,1.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
.bg-forest {
  background: radial-gradient(circle at 20% 30%, rgba(45,106,79,0.15), transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(245,165,36,0.08), transparent 50%),
              var(--bg);
  background-attachment: fixed;
}
.no-scroll { overflow: hidden; }

.container { max-width: var(--container, 1200px); margin: 0 auto; padding: 0 var(--space-4, 1.5rem); }
.narrow { max-width: 860px; }
.section { padding: var(--space-8, 4rem) 0; }

.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3, 1rem); align-items: center; }
.stack { display: flex; flex-direction: column; gap: var(--space-4, 1.5rem); }

/* ═══ Типографика ═══ */
.mega-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3, 1rem);
  background: linear-gradient(135deg, var(--accent), #ffd966);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 12px rgba(245,165,36,0.3);
}
.page-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-3, 1rem);
  color: var(--accent);
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: var(--space-5, 2rem);
  color: var(--text);
}
.section-subtitle {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: var(--space-4, 1.5rem);
  color: var(--accent);
}
.page-sub, .hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: var(--space-4, 1.5rem);
}
.muted { color: var(--muted); }

/* ═══ Кнопки ═══ */
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 150ms var(--ease-out, ease), box-shadow 150ms;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent);
  color: #0f1e13;
  box-shadow: 0 4px 12px rgba(245,165,36,0.3);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(245,165,36,0.5); }
.btn-secondary {
  background: var(--brand-2);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(45,106,79,0.3);
}
.btn-secondary:hover { box-shadow: 0 8px 20px rgba(45,106,79,0.5); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(245,165,36,0.08); }
.btn-sm { padding: 0.6rem 1.4rem; font-size: 0.9rem; }
.btn-disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.glow { box-shadow: 0 0 24px rgba(245,165,36,0.5); }
.glow:hover { box-shadow: 0 0 36px rgba(245,165,36,0.7); }

.input-field, .code-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  font-weight: 300;
  transition: border-color 150ms, box-shadow 150ms;
}
.input-field:focus, .code-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,165,36,0.15);
}

/* ═══ Карточки ═══ */
.card, .surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-5, 2rem);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-3, 1rem);
  color: var(--accent);
}

/* ═══ Шапка ═══ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.glass {
  background: rgba(15,30,19,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4, 1.5rem);
}
.logo-link {
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
  transition: transform 150ms;
}
.logo-link:hover { transform: scale(1.05); }
.main-nav {
  display: flex;
  gap: var(--space-4, 1.5rem);
  flex: 1;
  justify-content: center;
}
.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 400;
  transition: color 150ms;
}
.main-nav a:hover { color: var(--text); }
.player-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.badge-nick {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
}
.badge-edit {
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms;
}
.badge-edit:hover { color: var(--accent); }

/* ═══ Главный герой (диагональ + перекрытие) ═══ */
.hero-diagonal {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7, 3rem);
  align-items: center;
  min-height: 70vh;
  padding: var(--space-8, 4rem) var(--container-padding, var(--space-4, 1.5rem));
  overflow: hidden;
  background: linear-gradient(135deg, #0f1e13 0%, #1a2e1f 100%);
  border-bottom: 1px solid var(--border);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 60px), 0 100%);
}
.hero-content {
  z-index: 2;
  max-width: 620px;
}
.hero-actions { margin-top: var(--space-5, 2rem); }
.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}
.floating-element {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: float 6s ease-in-out infinite;
}
.hero-image-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-bear-img {
  width: clamp(220px, 28vw, 380px);
  height: auto;
  filter: drop-shadow(0 8px 32px rgba(245,165,36,0.35));
  animation: float 5s ease-in-out infinite;animation-delay: 1s;
}
.floating-element.hive { top: 15%; right: 20%; animation-delay: 0s; }
.floating-element.honey { bottom: 20%; left: 15%; animation-delay: 2s; }
.floating-element.paw { top: 50%; right: 10%; animation-delay: 4s; }
.floating-element.hive::before { content: '🍯'; }
.floating-element.honey::before { content: '🐝'; }
.floating-element.paw::before { content: '🐾'; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* ═══ Инфо-полоса (статистика) ═══ */
.info-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-6, 2.5rem) 0;
}
.stats-trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-5, 2rem);
}
.stat-card {
  text-align: center;
  padding: var(--space-4, 1.5rem);
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.stat-number {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ═══ Правила игры ═══ */
.rules-section { background: var(--bg); }
.rules-list { max-width: 700px; margin: 0 auto; }
.rule-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3, 1rem);
  padding: var(--space-4, 1.5rem);
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 150ms, box-shadow 150ms;
}
.rule-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.rule-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

/* ═══ Лобби ═══ */
.lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-5, 2rem);
  margin-bottom: var(--space-7, 3rem);
}
.lobby-card { min-height: 280px; }
.form-lobby .field { margin-bottom: var(--space-3, 1rem); }
.form-lobby label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.rooms-section { margin-top: var(--space-7, 3rem); }
.rooms-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-4, 1.5rem);
}
.room-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 1rem);
  padding: var(--space-3, 1rem);
  border-bottom: 1px solid var(--border);
  transition: background 150ms;
}
.room-row:last-child { border-bottom: none; }
.room-row:hover { background: var(--surface-2); }
.room-info { flex: 1; }
.room-name {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  display: block;
}
.room-code {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}
.room-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2, 0.75rem);
}
.room-players {
  font-size: 0.95rem;
  color: var(--muted);
}
.room-dots {
  display: flex;
  gap: 4px;
}
.rdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.rdot.filled { background: var(--accent); }

.room-header {
  text-align: center;
  margin-bottom: var(--space-6, 2.5rem);
}
.room-code-display, .room-level-display {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted);
}
.room-code-display strong, .room-level-display strong {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
}

.players-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-5, 2rem);
  margin-bottom: var(--space-5, 2rem);
}
.player-row {
  display: flex;
  align-items: center;
  gap: var(--space-3, 1rem);
  padding: var(--space-3, 1rem);
  border-bottom: 1px solid var(--border);
}
.player-row:last-child { border-bottom: none; }
.player-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}
.player-name {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
}
.host-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(245,165,36,0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.player-status {
  font-size: 0.9rem;
  font-weight: 500;
}
.status-ready { color: #3fbf6f; }
.status-waiting { color: var(--muted); }
.room-actions {
  justify-content: center;
  margin-top: var(--space-5, 2rem);
}

/* ═══ Уровни ═══ */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5, 2rem);
}
.level-card {
  position: relative;
  text-align: center;
  padding: var(--space-5, 2rem);
  transition: transform 150ms, box-shadow 150ms;
  overflow: hidden;
}
.level-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--lvl-color, var(--accent));
}
.level-card:hover:not(.locked) {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.level-card.locked {
  opacity: 0.5;
  pointer-events: none;
}
.level-icon {
  font-size: 3rem;
  margin-bottom: var(--space-2, 0.75rem);
}
.level-number {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.level-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.5rem 0;
}
.level-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin: var(--space-3, 1rem) 0;
  line-height: 1.5;
}
.level-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: var(--space-3, 1rem) 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.level-diff {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin: var(--space-3, 1rem) 0;
}
.diff-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.diff-dot.on { background: var(--lvl-color, var(--accent)); }
.level-best {
  font-size: 0.9rem;
  color: var(--muted);
  margin: var(--space-2, 0.75rem) 0;
}
.level-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(63,191,111,0.2);
  color: #3fbf6f;
  font-size: 0.85rem;
  font-weight: 600;
  margin: var(--space-2, 0.75rem) 0;
}
.level-action { margin-top: var(--space-3, 1rem); }

/* ═══ Лидерборд ═══ */
.my-rank-banner {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: var(--space-4, 1.5rem);
  text-align: center;
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: var(--space-5, 2rem);
  box-shadow: 0 0 20px rgba(245,165,36,0.3);
}
.lb-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: var(--space-5, 2rem);
}
.lb-table {
  width: 100%;
  border-collapse: collapse;
}
.lb-table thead {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.lb-table th {
  padding: var(--space-3, 1rem);
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.lb-table td {
  padding: var(--space-3, 1rem);
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}
.lb-row:last-child td { border-bottom: none; }
.lb-row:hover { background: var(--surface-2); }
.lb-me {
  background: rgba(245,165,36,0.1);
  border-left: 3px solid var(--accent);
}
.lb-top1, .lb-top2, .lb-top3 { font-weight: 500; }
.lb-rank {
  width: 60px;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}
.lb-nick {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.you-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(245,165,36,0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
}
.lb-score {
  font-weight: 600;
  color: var(--accent);
  font-size: 1.1rem;
}
.lb-level, .lb-games {
  color: var(--muted);
  font-size: 0.95rem;
}
.lb-empty {
  text-align: center;
  padding: var(--space-7, 3rem);
  color: var(--muted);
}
.lb-actions { justify-content: center; }

/* ═══ Игровой экран ═══ */
.game-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: 1fr 280px;
  height: 100vh;
  overflow: hidden;
}
.game-hud {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4, 1.5rem);
  padding: var(--space-3, 1rem) var(--space-4, 1.5rem);
  background: rgba(15,30,19,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.hud-left, .hud-center, .hud-right {
  display: flex;
  align-items: center;
  gap: var(--space-3, 1rem);
}
.hud-center { flex: 1; justify-content: center; }
.hud-player {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
}
.hud-player-name { font-weight: 500; }
.hud-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hud-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hud-stat strong {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 700;
}

.canvas-wrap {
  position: relative;
  background: #0a1a0e;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#gameCanvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border: 1px solid var(--border);
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}
.online-badge {
  position: absolute;
  top: var(--space-3, 1rem);
  right: var(--space-3, 1rem);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: rgba(15,30,19,0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3fbf6f;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.touch-controls {
  position: absolute;
  bottom: var(--space-4, 1.5rem);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: var(--space-2, 0.75rem);
}
.touch-controls button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(15,30,19,0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 100ms, box-shadow 100ms;
}
.touch-controls button:active {
  transform: scale(0.95);
  box-shadow: 0 0 16px rgba(245,165,36,0.5);
}
.touch-controls .jump { background: rgba(245,165,36,0.2); }
@media (max-width: 768px) {
  .touch-controls { display: flex; }
}

.game-sidebar {
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: var(--space-4, 1.5rem);
  overflow-y: auto;
  position: relative;
}
.side-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-3, 1rem);
}
.players-live {
  list-style: none;
}
.players-live li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: var(--space-2, 0.75rem);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: var(--surface-2);
  transition: background 150ms;
}
.players-live li:hover { background: var(--border); }
.players-live .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.players-live .pname {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text);
}
.players-live .pscore {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.game-over-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,30,19,0.95);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.overlay-box {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: var(--space-6, 2.5rem);
  text-align: center;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6);
  max-width: 400px;
}
.overlay-box h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-4, 1.5rem);
}
.overlay-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.75rem);
  margin-bottom: var(--space-5, 2rem);
}
.ost {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2, 0.75rem);
  background: var(--surface-2);
  border-radius: 8px;
}
.ost span { color: var(--muted); font-size: 0.95rem; }
.ost strong { color: var(--accent); font-size: 1.3rem; font-weight: 700; }

/* ═══ Подвал ═══ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-5, 2rem) 0;
  text-align: center;
}
.footer-copy {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ═══ Модальное окно ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,30,19,0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: var(--space-6, 2.5rem);
  max-width: 420px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6);
}
.modal-box h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-4, 1.5rem);
}
.modal-box form { display: flex; flex-direction: column; gap: var(--space-4, 1.5rem); }

.alert-error {
  background: rgba(231,76,60,0.15);
  color: #e74c3c;
  padding: var(--space-3, 1rem) var(--space-4, 1.5rem);
  border-radius: 12px;
  border: 1px solid #e74c3c;
  margin-bottom: var(--space-4, 1.5rem);
  font-weight: 500;
}

/* ═══ Алерты ═══ */
.alert-success {
  background: rgba(63,191,111,0.15);
  color: #3fbf6f;
  padding: var(--space-3,1rem) var(--space-4,1.5rem);
  border-radius: 12px;
  border: 1px solid #3fbf6f;
  font-weight: 500;
}
.btn-danger {
  background: rgba(231,76,60,0.2);
  color: #e74c3c;
  border: 1px solid rgba(231,76,60,0.5);
}
.btn-danger:hover {
  background: rgba(231,76,60,0.35);
  box-shadow: 0 4px 16px rgba(231,76,60,0.3);
}

/* ═══ Бан-страница ═══ */
.ban-notice-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.ban-notice-box { max-width: 480px; width: 100%; text-align: center; }
.ban-big-icon { font-size: 4rem; margin-bottom: 1rem; }
.ban-title {
  font-size: 2rem;
  font-weight: 700;
  color: #e74c3c;
  margin-bottom: 0.75rem;
}
.ban-reason {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.ban-duration {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: rgba(231,76,60,0.15);
  color: #e74c3c;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.ban-sub { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }

/* ═══ Модерация ═══ */
.search-form { display: flex; gap: 0.75rem; max-width: 500px; }
.search-form .input-field { flex: 1; }
.mod-section { margin-bottom: 2rem; }
.mod-players-list { display: flex; flex-direction: column; gap: 0.5rem; }
.mod-player-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background 150ms;
}
.mod-player-row:hover { background: var(--border); }
.mod-nick { flex: 1; font-size: 1rem; font-weight: 500; color: var(--text); }
.mod-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.warn-tag { background: rgba(245,165,36,0.2); color: var(--accent); }
.ban-tag  { background: rgba(231,76,60,0.2);  color: #e74c3c; }
.badge-dot.large { width: 16px; height: 16px; flex-shrink: 0; }
.mod-player-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.mod-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.mod-action-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.mod-action-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}
.mod-form { gap: 0.75rem; }
.mod-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1.5rem 0 0.75rem;
}
.mod-history-list { display: flex; flex-direction: column; gap: 0.5rem; }
.mod-hist-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background 150ms;
}
.mod-hist-row.ban-active {
  border-color: rgba(231,76,60,0.4);
  background: rgba(231,76,60,0.05);
}
.mod-hist-row.ban-expired { opacity: 0.6; }
.mod-hist-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.mod-hist-info { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.mod-hist-reason { font-size: 0.95rem; color: var(--text); }
.mod-hist-meta   { font-size: 0.8rem;  color: var(--muted); }
.mod-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* ═══ Адаптив ═══ */
@media (max-width: 900px) {
  .hero-diagonal {
    grid-template-columns: 1fr;
    clip-path: none;
    min-height: auto;
  }
  .hero-visual { display: none; }
  .game-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .game-sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 180px;
  }
  .main-nav { display: none; }
}
@media (max-width: 600px) {
  .hud-center { flex-direction: column; gap: 0.5rem; }
  .hud-stat { flex-direction: row; gap: 0.5rem; }
  .stats-trio { grid-template-columns: 1fr; }
  .lobby-grid { grid-template-columns: 1fr; }
  .levels-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}