* {
  box-sizing: border-box;
}

body.theme-gamer {
  --bg: #090611;
  --bg-secondary: #110c1a;
  --panel: #151027;
  --panel-soft: #1c1435;
  --line: #312455;
  --text: #f2ecff;
  --muted: #b7acd9;
  --accent: #8b5cf6;
  --accent-strong: #22d3ee;
  --success: #22c55e;
  --danger: #f43f5e;
  --primary: #a855f7;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 24%),
    linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg) 100%);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: var(--shadow);
}

.brand-text h1 {
  margin: 0;
  font-size: 22px;
}

.brand-text p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
  transition: 0.18s ease;
}

.nav-item:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-color: transparent;
}

.sidebar-status {
  display: grid;
  gap: 14px;
}

.mini-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-card span {
  color: var(--muted);
  font-size: 13px;
}

.status-badge {
  font-size: 14px;
  font-weight: 700;
}

.status-badge.online {
  color: var(--success);
}

.status-badge.offline {
  color: var(--danger);
}

.main {
  padding: 26px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.topbar h2 {
  margin: 0 0 6px;
  font-size: 34px;
}

.topbar-subtitle {
  margin: 0;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.18s ease;
  color: #fff;
}

.action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent-strong));
}

.action-btn.success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.action-btn.danger {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
}

.action-btn.neutral {
  background: linear-gradient(135deg, #334155, #475569);
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.hero-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.32);
  margin-bottom: 12px;
  font-size: 12px;
}

.hero-content h3 {
  margin: 0 0 10px;
  font-size: 32px;
}

.hero-content p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

.hero-side {
  display: grid;
  gap: 14px;
}

.hero-metric {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.hero-metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.hero-metric strong {
  font-size: 28px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.players-grid {
  margin-top: 4px;
}

.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.metric-card.large {
  min-height: 140px;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.metric-card strong {
  display: block;
  font-size: 24px;
  margin-bottom: 6px;
  word-break: break-word;
}

.metric-card small {
  color: var(--muted);
}

.dashboard-grid,
.settings-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-header h3 {
  margin: 0;
  font-size: 20px;
}

.live-pill {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.overview-list {
  display: grid;
  gap: 12px;
}

.overview-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.overview-item span {
  color: var(--muted);
}

.quick-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.quick-btn {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: 0.18s ease;
}

.quick-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.note-box,
.share-box {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.note-box p,
.share-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.note-title {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.console-output {
  margin: 0 0 14px;
  min-height: 420px;
  max-height: 420px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(7, 6, 16, 0.92);
  color: #efe9ff;
  padding: 16px;
  white-space: pre-wrap;
  line-height: 1.48;
  font-size: 13px;
}

.console-form {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

.console-form input,
.select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  padding: 14px 15px;
  outline: none;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
}

.design-preview {
  display: grid;
  gap: 12px;
}

.theme-preview {
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  font-weight: 700;
}

.gamer-preview {
  background: linear-gradient(135deg, #1a1032, #3b0764);
  color: #f5f3ff;
}

.tab-section {
  display: none;
}

.tab-section.active {
  display: block;
}

@media (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero,
  .dashboard-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topbar {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 18px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .console-form {
    grid-template-columns: 1fr;
  }

  .topbar h2 {
    font-size: 28px;
  }

  .hero-content h3 {
    font-size: 26px;
  }
}
