:root {
  --bg-1: #101126;
  --bg-2: #1f2547;
  --card: rgba(17, 20, 46, 0.86);
  --text: #f5f7ff;
  --muted: #b8bed8;
  --accent: #ffcf56;
  --accent-2: #6ce5e8;
  --danger: #ff6d7a;
  --ok: #8de47f;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, #27356f 0%, var(--bg-1) 45%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  width: 34vw;
  height: 34vw;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.22;
  z-index: -1;
  animation: drift 9s ease-in-out infinite alternate;
}

.bg-shape-a {
  background: #ff8e2c;
  top: -8vw;
  left: -8vw;
}

.bg-shape-b {
  background: #4dd6ff;
  right: -7vw;
  bottom: -9vw;
}

@keyframes drift {
  from {
    transform: translateY(0px) scale(1);
  }
  to {
    transform: translateY(30px) scale(1.08);
  }
}

.app-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 18px 42px;
}

.hidden {
  display: none !important;
}

.hero h1 {
  font-family: "Bungee", cursive;
  letter-spacing: 0.09em;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.hero p {
  margin: 10px 0 0;
  color: var(--muted);
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 207, 86, 0.17);
  border: 1px solid rgba(255, 207, 86, 0.5);
}

.grid {
  margin-top: 20px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(7px);
}

.card h2 {
  margin: 0 0 12px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#adminSongsContent,
#memberAdminContent {
  margin-top: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(8, 10, 25, 0.72);
}

.modal-card {
  width: min(560px, 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: rgba(17, 20, 46, 0.96);
  box-shadow: var(--shadow);
}

.modal-card h3 {
  margin: 0 0 12px;
}

.modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  border: 1px solid var(--border);
}

.userbar {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.userbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.login-card {
  margin-top: 20px;
}

.login-form,
.admin-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login-form input,
.admin-row input {
  flex: 1;
  min-width: 180px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

.admin-row select {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 1fr));
  gap: 10px;
}

.stats div {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.stats strong {
  font-size: 1.2rem;
}

.task-box {
  margin-top: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 12px;
}

.task-box h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.task-box p {
  margin: 0 0 7px;
}

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

.command-row {
  display: flex;
  gap: 10px;
}

input,
button {
  font: inherit;
}

#commandInput {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

button {
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 12px;
  cursor: pointer;
  color: #101126;
  background: linear-gradient(120deg, var(--accent), #ffab4f);
  font-weight: 700;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(35%);
}

button:disabled:hover {
  transform: none;
}

.quick-buttons {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 1fr));
  gap: 8px;
}

.quick-buttons button {
  background: rgba(108, 229, 232, 0.9);
}

.quick-buttons button.spin-blocked:disabled {
  background: rgba(255, 109, 122, 0.95);
  color: #2b0c12;
  border-color: rgba(255, 163, 172, 0.9);
  opacity: 1;
  filter: none;
}

.hint {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.log-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.song-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

.song-list li {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.smule-link {
  color: #9fe5ff;
  text-decoration: none;
  font-weight: 600;
}

.smule-link:hover {
  text-decoration: underline;
}

.member-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.og-preview {
  margin-top: 12px;
  width: 100%;
  max-width: 360px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.song-list button {
  padding: 6px 10px;
  font-size: 0.86rem;
  background: rgba(255, 109, 122, 0.95);
}

.member-actions button {
  background: rgba(108, 229, 232, 0.9);
  color: #101126;
}

.admin-actions {
  margin-top: 10px;
  grid-template-columns: repeat(2, minmax(80px, 1fr));
}

.log-card li {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.17);
  font-size: 0.95rem;
}

.log-card .ok {
  border-color: rgba(141, 228, 127, 0.5);
}

.log-card .warn {
  border-color: rgba(255, 207, 86, 0.55);
}

.log-card .bad {
  border-color: rgba(255, 109, 122, 0.55);
}

.faq-item + .faq-item {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 640px) {
  .quick-buttons {
    grid-template-columns: repeat(2, minmax(80px, 1fr));
  }

  .command-row {
    flex-direction: column;
  }

  .login-form,
  .admin-row {
    flex-direction: column;
  }
}
