/* ═══════════════════════════════════════════════════════════════════════════
   TEAM RANDOMIZER — Complete Stylesheet
   Author: Generated for teamrandomizer.duckdns.org
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties (Themes) ──────────────────────────────────────── */
:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-xl:  0 16px 64px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px;

  --transition-fast:   0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow:   0.5s ease;

  --navbar-h: 64px;
}

/* Cosmic Theme (default) */
[data-theme="cosmic"] {
  --bg-primary:   #0a0a1a;
  --bg-secondary: #10102a;
  --bg-tertiary:  #16163a;
  --bg-card:      rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --bg-input:     rgba(255,255,255,0.07);

  --accent-primary:  #6366f1;
  --accent-secondary:#a855f7;
  --accent-tertiary: #ec4899;
  --accent-success:  #22c55e;
  --accent-warning:  #f59e0b;
  --accent-danger:   #ef4444;
  --accent-info:     #3b82f6;

  --gradient-brand: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  --gradient-card:  linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.08));

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;
  --text-accent:    #a5b4fc;

  --border-color:   rgba(255,255,255,0.08);
  --border-accent:  rgba(99,102,241,0.4);

  --particle-color: rgba(99,102,241,0.6);
}

/* Aurora Theme */
[data-theme="aurora"] {
  --bg-primary:   #020c14;
  --bg-secondary: #041825;
  --bg-tertiary:  #062535;
  --bg-card:      rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --bg-input:     rgba(255,255,255,0.07);

  --accent-primary:  #06b6d4;
  --accent-secondary:#0ea5e9;
  --accent-tertiary: #22d3ee;
  --accent-success:  #10b981;
  --accent-warning:  #f59e0b;
  --accent-danger:   #ef4444;
  --accent-info:     #60a5fa;

  --gradient-brand: linear-gradient(135deg, #06b6d4, #0ea5e9, #22d3ee);
  --gradient-card:  linear-gradient(135deg, rgba(6,182,212,0.15), rgba(14,165,233,0.08));

  --text-primary:   #f0f9ff;
  --text-secondary: #7dd3fc;
  --text-muted:     #38bdf8;
  --text-accent:    #67e8f9;

  --border-color:   rgba(6,182,212,0.12);
  --border-accent:  rgba(6,182,212,0.4);

  --particle-color: rgba(6,182,212,0.6);
}

/* Ember Theme */
[data-theme="ember"] {
  --bg-primary:   #130800;
  --bg-secondary: #1f0d00;
  --bg-tertiary:  #2d1200;
  --bg-card:      rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --bg-input:     rgba(255,255,255,0.07);

  --accent-primary:  #f97316;
  --accent-secondary:#ef4444;
  --accent-tertiary: #fbbf24;
  --accent-success:  #22c55e;
  --accent-warning:  #fbbf24;
  --accent-danger:   #dc2626;
  --accent-info:     #fb923c;

  --gradient-brand: linear-gradient(135deg, #f97316, #ef4444, #fbbf24);
  --gradient-card:  linear-gradient(135deg, rgba(249,115,22,0.15), rgba(239,68,68,0.08));

  --text-primary:   #fff7ed;
  --text-secondary: #fed7aa;
  --text-muted:     #fb923c;
  --text-accent:    #fdba74;

  --border-color:   rgba(249,115,22,0.12);
  --border-accent:  rgba(249,115,22,0.4);

  --particle-color: rgba(249,115,22,0.6);
}

/* Forest Theme */
[data-theme="forest"] {
  --bg-primary:   #020f05;
  --bg-secondary: #041a09;
  --bg-tertiary:  #062610;
  --bg-card:      rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --bg-input:     rgba(255,255,255,0.07);

  --accent-primary:  #22c55e;
  --accent-secondary:#16a34a;
  --accent-tertiary: #4ade80;
  --accent-success:  #86efac;
  --accent-warning:  #fbbf24;
  --accent-danger:   #ef4444;
  --accent-info:     #34d399;

  --gradient-brand: linear-gradient(135deg, #22c55e, #16a34a, #4ade80);
  --gradient-card:  linear-gradient(135deg, rgba(34,197,94,0.15), rgba(22,163,74,0.08));

  --text-primary:   #f0fdf4;
  --text-secondary: #bbf7d0;
  --text-muted:     #4ade80;
  --text-accent:    #86efac;

  --border-color:   rgba(34,197,94,0.12);
  --border-accent:  rgba(34,197,94,0.4);

  --particle-color: rgba(34,197,94,0.6);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition-slow), color var(--transition-slow);
}

/* ── Background Canvas ────────────────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(10,10,26,0.85);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 0 12px var(--accent-primary));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.navbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background var(--transition-normal);
}

.status-dot.connected   { background: var(--accent-success); box-shadow: 0 0 8px var(--accent-success); }
.status-dot.disconnected { background: var(--accent-danger);  box-shadow: 0 0 8px var(--accent-danger);  }
.status-dot.connecting  {
  background: var(--accent-warning);
  animation: pulse-dot 1s ease-in-out infinite;
}

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

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

.theme-switcher {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.theme-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  line-height: 1;
  opacity: 0.5;
}

.theme-btn:hover { opacity: 0.9; transform: scale(1.2); }
.theme-btn.active {
  background: var(--accent-primary);
  opacity: 1;
  box-shadow: 0 0 12px var(--accent-primary);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

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

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn:disabled::after { display: none; }

.btn-primary {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(99,102,241,0.6); transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--accent-primary);
}

.btn-sm { padding: 6px 12px; font-size: 0.75rem; }

.btn-randomize {
  background: var(--gradient-brand);
  color: white;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(99,102,241,0.5);
  letter-spacing: 0.02em;
  flex: 1;
}
.btn-randomize:hover {
  box-shadow: 0 12px 40px rgba(99,102,241,0.7);
  transform: translateY(-2px);
}

.btn-randomize-icon {
  font-size: 1.3rem;
  animation: spin-slow 4s linear infinite;
}

@keyframes spin-slow {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-copy {
  background: linear-gradient(135deg, var(--accent-success), #16a34a);
  color: white;
  width: 100%;
  padding: 12px;
  font-size: 0.9rem;
}

/* ── Main Layout ──────────────────────────────────────────────────────────── */
.main-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px 1fr 280px;
  grid-template-rows: 1fr;
  min-height: 100vh;
  padding-top: var(--navbar-h);
  gap: 0;
}

/* ── Panels ───────────────────────────────────────────────────────────────── */
.panel {
  padding: 20px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100vh - var(--navbar-h));
  position: sticky;
  top: var(--navbar-h);
}

.panel-left {
  border-right: 1px solid var(--border-color);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.panel-center {
  padding: 24px 20px;
  overflow-y: auto;
  height: calc(100vh - var(--navbar-h));
  position: sticky;
  top: var(--navbar-h);
}

.panel-right {
  border-left: 1px solid var(--border-color);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.panel-section {
  margin-bottom: 24px;
}

/* ── Section Headers ──────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-icon { font-size: 1rem; }

.section-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

/* ── Voice Channels ───────────────────────────────────────────────────────── */
.voice-channels-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voice-channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.voice-channel-card:hover { border-color: var(--border-accent); }

.voice-channel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--gradient-card);
  cursor: pointer;
}

.voice-channel-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.voice-channel-icon { font-size: 0.9rem; }

.voice-channel-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.voice-members-list {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.voice-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  position: relative;
}

.voice-member-row:hover { background: var(--bg-card-hover); }

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
  background: var(--bg-tertiary);
}

.member-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
}

.member-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag-discord {
  background: rgba(88,101,242,0.25);
  color: #a5b4fc;
  border: 1px solid rgba(88,101,242,0.3);
}

.tag-manual {
  background: rgba(249,115,22,0.2);
  color: #fdba74;
  border: 1px solid rgba(249,115,22,0.3);
}

.btn-remove-member {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  line-height: 1;
  opacity: 0;
}

.voice-member-row:hover .btn-remove-member,
.manual-player-item:hover .btn-remove-member {
  opacity: 1;
}

.btn-remove-member:hover {
  color: var(--accent-danger);
  background: rgba(239,68,68,0.15);
}

/* ── Empty State ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.5;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.empty-hint {
  font-size: 0.75rem;
  margin-top: 6px;
  opacity: 0.7;
}

.empty-hint code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-family: monospace;
  color: var(--text-accent);
}

/* ── Manual Input ─────────────────────────────────────────────────────────── */
.manual-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.input-wrapper {
  position: relative;
}

.text-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 42px 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition-fast);
}

.text-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  background: var(--bg-card);
}

.text-input::placeholder { color: var(--text-muted); }

.input-char-count {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--text-muted);
  pointer-events: none;
}

.manual-players-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.manual-player-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.manual-player-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
}

/* ── Player Pool Grid ─────────────────────────────────────────────────────── */
.player-count-badge {
  background: var(--accent-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 0 12px rgba(99,102,241,0.4);
}

.player-pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px;
}

.pool-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
}

.pool-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  transition: all var(--transition-fast);
}

.pool-avatar:hover {
  border-color: var(--accent-primary);
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.pool-name {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Controls Card ────────────────────────────────────────────────────────── */
.controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.controls-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.controls-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.control-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Number Stepper ───────────────────────────────────────────────────────── */
.number-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stepper-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: 700;
  width: 40px;
  height: 42px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper-btn:hover {
  background: var(--accent-primary);
  color: white;
}

.stepper-input {
  width: 56px;
  background: none;
  border: none;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  pointer-events: none;
}

.randomize-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}

.copy-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.copy-feedback {
  font-size: 0.8rem;
  color: var(--accent-success);
  text-align: center;
  min-height: 20px;
}

.error-banner {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #fca5a5;
  margin-top: 12px;
}

/* ── Teams Area ───────────────────────────────────────────────────────────── */
.teams-area {
  flex: 1;
  min-height: 300px;
}

.teams-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 24px;
}

.placeholder-animation {
  position: relative;
  height: 120px;
  width: 100px;
}

.placeholder-card-stack {
  position: relative;
  width: 80px;
  height: 100px;
  margin: 0 auto;
}

.ph-card {
  position: absolute;
  width: 70px;
  height: 90px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.ph-card-1 {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0.9;
  top: 0; left: 5px;
  animation: card-float 3s ease-in-out infinite;
}

.ph-card-2 {
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary));
  opacity: 0.6;
  top: 10px; left: 0;
  animation: card-float 3s ease-in-out 0.5s infinite;
}

.ph-card-3 {
  background: linear-gradient(135deg, var(--accent-tertiary), var(--accent-primary));
  opacity: 0.3;
  top: 20px; left: 10px;
  animation: card-float 3s ease-in-out 1s infinite;
}

@keyframes card-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-8px) rotate(3deg); }
}

.placeholder-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.placeholder-text strong { color: var(--text-accent); }

/* ── Teams Grid ───────────────────────────────────────────────────────────── */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

/* ── Team Card ────────────────────────────────────────────────────────────── */
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--team-color, var(--accent-primary));
  box-shadow: 0 0 16px var(--team-color, var(--accent-primary));
}

.team-card:hover {
  border-color: var(--team-color, var(--accent-primary));
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px var(--team-color, var(--accent-primary));
  transform: translateY(-2px);
}

.team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent);
}

.team-name-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.team-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--team-color, var(--accent-primary));
  box-shadow: 0 0 8px var(--team-color, var(--accent-primary));
  flex-shrink: 0;
}

.team-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.team-actions {
  display: flex;
  gap: 4px;
}

.team-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

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

.team-players-list {
  padding: 8px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
}

/* Sortable drag states */
.team-players-list.sortable-drag-over {
  background: rgba(99,102,241,0.06);
  border-radius: var(--radius-md);
}

.player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: grab;
  transition: all var(--transition-fast);
  user-select: none;
  position: relative;
}

.player-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateX(2px);
}

.player-card.sortable-chosen {
  cursor: grabbing;
  box-shadow: var(--shadow-lg);
  transform: scale(1.03) rotate(1deg);
  z-index: 50;
  border-color: var(--accent-primary);
}

.player-card.sortable-ghost {
  opacity: 0.3;
  border: 1px dashed var(--accent-primary);
}

.player-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.player-card-info {
  flex: 1;
  min-width: 0;
}

.player-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-card-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.drag-handle {
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: grab;
  padding: 0 4px;
  opacity: 0.4;
  transition: opacity var(--transition-fast);
}

.player-card:hover .drag-handle { opacity: 1; }

/* ── Activity Log ─────────────────────────────────────────────────────────── */
.activity-log {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
}

.log-entry {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  background: var(--bg-card);
  line-height: 1.4;
}

.log-time {
  color: var(--text-muted);
  flex-shrink: 0;
  font-family: monospace;
  font-size: 0.68rem;
}

.log-msg { color: var(--text-secondary); }

.log-info    { border-left-color: var(--accent-info); }
.log-success { border-left-color: var(--accent-success); }
.log-warning { border-left-color: var(--accent-warning); }
.log-error   { border-left-color: var(--accent-danger); }
.log-event   { border-left-color: var(--accent-primary); }

/* ── Stats Grid ───────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  transition: all var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* ── Bot Status ───────────────────────────────────────────────────────────── */
.bot-status-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bot-heartbeat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.hb-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hb-value {
  font-size: 0.85rem;
  color: var(--text-accent);
  font-weight: 500;
}

.drag-hint {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 14px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── Toast Notifications ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  backdrop-filter: blur(10px);
  pointer-events: all;
  min-width: 240px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateX(60px);
}

.toast-success { background: rgba(34,197,94,0.9); border: 1px solid rgba(34,197,94,0.5); }
.toast-error   { background: rgba(239,68,68,0.9); border: 1px solid rgba(239,68,68,0.5); }
.toast-info    { background: rgba(99,102,241,0.9); border: 1px solid rgba(99,102,241,0.5); }
.toast-warning { background: rgba(245,158,11,0.9); border: 1px solid rgba(245,158,11,0.5); }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  min-width: 320px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-xl);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .main-layout {
    grid-template-columns: 280px 1fr;
    grid-template-rows: auto;
  }
  .panel-right { display: none; }
}

@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .panel, .panel-center {
    position: static;
    height: auto;
    overflow: visible;
  }
  .panel-left {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .navbar { padding: 0 12px; }
  .brand-sub { display: none; }
  .theme-switcher { display: none; }
}

/* ── Utility Animations ───────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.3); }
  50%  { opacity: 1; transform: scale(1.1); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.anim-fadeInUp  { animation: fadeInUp  0.4s ease both; }
.anim-scaleIn   { animation: scaleIn   0.3s ease both; }
.anim-slideLeft { animation: slideInLeft 0.3s ease both; }
.anim-bounceIn  { animation: bounceIn  0.5s ease both; }

/* ── Loading Skeleton ─────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-card-hover) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Sortable Ghost/Chosen override ──────────────────────────────────────── */
.sortable-fallback {
  opacity: 1 !important;
  box-shadow: var(--shadow-xl) !important;
}
