/* === Децибел Рейсинг — Design System === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #0b1020;
  --surface: #131a2e;
  --surface-soft: #1a2440;
  --surface-hover: #1f2d52;
  --text: #e8ecff;
  --text-muted: #a9b2d0;
  --ok: #2ec27e;
  --ok-glow: rgba(46, 194, 126, 0.3);
  --warn: #ffb020;
  --warn-glow: rgba(255, 176, 32, 0.3);
  --danger: #d65b5b;
  --accent: #6c96ff;
  --accent-dark: #4f76df;
  --border: #2a365d;
  --border-light: #3a4a7d;
  --shadow: rgba(3, 7, 18, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Typography === */
h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }

.subtitle { color: var(--text-muted); margin-bottom: 20px; font-size: 15px; }
.label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  font-weight: 600;
}
.mono {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
}

/* === Card === */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  box-shadow: 0 10px 24px var(--shadow);
}

/* === Inputs === */
input, select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 150, 255, 0.15);
}
input::placeholder { color: var(--text-muted); opacity: 0.6; }

/* === Buttons === */
button, .btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  color: #fff;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 4px 12px rgba(79, 118, 223, 0.25);
}
button:hover:not([disabled]) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79, 118, 223, 0.35); }
button:active:not([disabled]) { transform: translateY(0); }
button[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn-success {
  background: linear-gradient(180deg, var(--ok) 0%, #1e9f5a 100%);
  box-shadow: 0 4px 12px var(--ok-glow);
}
.btn-danger {
  background: linear-gradient(180deg, var(--danger) 0%, #b84545 100%);
  box-shadow: 0 4px 12px rgba(214, 91, 91, 0.25);
}
.btn-warn {
  background: linear-gradient(180deg, var(--warn) 0%, #e09800 100%);
  box-shadow: 0 4px 12px var(--warn-glow);
}

/* === Status Badge === */
.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.status-offline {
  color: #ffd5d5;
  background: rgba(214, 91, 91, 0.22);
  border: 1px solid rgba(214, 91, 91, 0.5);
}
.status-online {
  color: #d6ffe8;
  background: rgba(46, 194, 126, 0.22);
  border: 1px solid rgba(46, 194, 126, 0.5);
}
.status-warn {
  color: #ffe6d5;
  background: rgba(255, 178, 107, 0.22);
  border: 1px solid rgba(255, 178, 107, 0.5);
}

/* === Bar indicators === */
.bar-wrap { margin-top: 12px; }
.bar-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.bar-track {
  width: 100%;
  height: 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  transition: width 80ms linear;
}
.bar-fill-volume {
  background: linear-gradient(90deg, #b5179e 0%, #7209b7 100%);
}
.bar-fill-pitch {
  background: linear-gradient(90deg, #4cc9f0 0%, #4895ef 100%);
}
.bar-fill-movement {
  background: linear-gradient(90deg, #1e9f5a 0%, var(--ok) 100%);
}
.bar-ticks {
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* === Player slots === */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.slot-title { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.slot-name { font-size: 22px; font-weight: 700; }
.slot-empty { color: var(--warn); }
.slot-full { color: var(--ok); }

/* === Grid layout === */
.grid-row { display: grid; gap: 10px; }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(46, 194, 126, 0.2); }
  50% { box-shadow: 0 0 40px rgba(46, 194, 126, 0.5); }
}

.animate-fade { animation: fadeIn 0.4s ease-out; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* === Responsive === */
@media (max-width: 900px) {
  .players-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: 24px; }
  .mono { font-size: 12px; word-break: break-word; }
}
