:root {
  --bg: #090611;
  --bg-elevated: #140d24;
  --bg-panel: #1a1230;
  --text: #f5ecff;
  --muted: #b6a7d6;
  --accent: #c084fc;
  --accent-2: #a855f7;
  --danger: #ff6b81;
  --success: #56f39a;
  --border: rgba(192, 132, 252, 0.28);
  --shadow: 0 0 0 1px rgba(192, 132, 252, 0.12),
    0 0 18px rgba(192, 132, 252, 0.10),
    0 0 36px rgba(168, 85, 247, 0.10);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at top, rgba(192, 132, 252, 0.10), transparent 24%),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.12), transparent 30%),
    radial-gradient(circle at left, rgba(139, 92, 246, 0.08), transparent 24%),
    var(--bg);
  background-repeat: no-repeat;
}

.page {
  width: 100%;
  max-width: 1100px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px;
  backdrop-filter: blur(6px);
}

.hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 12px;
  font-size: 2.2rem;
  line-height: 1.1;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.spacer {
  height: 18px;
}

.status {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(192, 132, 252, 0.08);
  color: var(--text);
  border: 1px solid rgba(192, 132, 252, 0.22);
  font-size: 0.95rem;
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.08);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  justify-content: center;
}

button,
.button-link {
  appearance: none;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.22), rgba(168, 85, 247, 0.20));
  color: white;
  font-weight: 700;
  font-size: 0.96rem;
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.16);
  transition: filter 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

button:hover,
.button-link:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

button.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: none;
}

button.danger {
  background: linear-gradient(180deg, rgba(255, 107, 129, 0.22), rgba(168, 85, 247, 0.18));
}

input[type="password"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  margin-top: 14px;
  outline: none;
}

input[type="password"]:focus {
  border-color: rgba(192, 132, 252, 0.45);
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.10);
}

.form-card {
  max-width: 460px;
  margin: 0 auto;
}

.form-error {
  color: #ff9cab;
  margin-top: 12px;
  min-height: 22px;
}

.form-success {
  color: #83f7b3;
  margin-top: 12px;
  min-height: 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.topbar p {
  margin-top: 4px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.sound-button {
  min-height: 96px;
  text-align: left;
  border-radius: 18px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(192, 132, 252, 0.08), rgba(168, 85, 247, 0.05)),
    rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(192, 132, 252, 0.14);
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.04);
}

.sound-button-active {
  background:
    linear-gradient(180deg, rgba(192, 132, 252, 0.22), rgba(168, 85, 247, 0.18)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(192, 132, 252, 0.32);
  box-shadow:
    0 0 16px rgba(192, 132, 252, 0.14),
    0 0 32px rgba(168, 85, 247, 0.12);
}

.sound-button strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

.sound-button span {
  color: var(--muted);
  font-size: 0.9rem;
}

.soundboard-status {
  margin-top: 18px;
  min-height: 24px;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(192, 132, 252, 0.16);
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.05);
}

.control-group label {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}

.control-group input[type="range"] {
  width: 180px;
  accent-color: #c084fc;
  cursor: pointer;
}

.volume-value {
  min-width: 48px;
  text-align: right;
  color: var(--muted);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.error-code {
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--accent);
  text-shadow:
    0 0 12px rgba(192, 132, 252, 0.55),
    0 0 28px rgba(168, 85, 247, 0.40),
    0 0 48px rgba(168, 85, 247, 0.22);
}

.sound-category-section + .sound-category-section {
  margin-top: 28px;
}

.sound-category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.sound-category-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sound-category-divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(192, 132, 252, 0.42),
    rgba(168, 85, 247, 0.16),
    transparent
  );
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.10);
}

.sound-category-grid {
  margin-top: 0;
}