@font-face {
  font-family: "BubbleFont";
  src: url("/fonts/bubble.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0d0d11;
  --bg-elevated: #15151c;
  --bg-card: #1b1b24;
  --border: #2a2a36;
  --text: #ededf2;
  --text-muted: #9a9aad;
  --accent: #7c5cff;
  --accent-hover: #9076ff;
  --danger: #ff5c7a;
  --danger-hover: #ff7e97;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at top, #181822 0%, var(--bg) 60%);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.site-title {
  margin: 0;
  font-family: "BubbleFont", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Baloo 2", sans-serif;
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  display: inline-block;
  background: linear-gradient(135deg, #1d191b 0%, #3a3057 50%, #5ce1ff 100%);
  background-size: 180% 180%;
  background-position: 30% 30%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 2px #0d0d11;
  paint-order: stroke fill;
  filter: drop-shadow(0 0 22px rgba(255, 156, 209, 0.45)) drop-shadow(0 0 30px rgba(92, 225, 255, 0.4))
    drop-shadow(3px 3px 0 rgba(169, 140, 255, 0.55)) drop-shadow(6px 6px 0 rgba(0, 0, 0, 0.45))
    drop-shadow(0 12px 20px rgba(0, 0, 0, 0.4));
}

.band-trigger {
  cursor: pointer;
  user-select: none;
  transition: filter 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.band-trigger:hover,
.band-trigger:focus {
  transform: rotate(2deg) scale(1.05);
  filter: drop-shadow(0 0 16px rgba(124, 92, 255, 0.8));
}

.site-subtitle {
  color: var(--text-muted);
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

.container {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.admin-panel {
  border-color: var(--accent);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.upload-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="file"],
select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-size: 0.95rem;
}

input:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-small {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.status-msg {
  color: var(--text-muted);
  min-height: 1.2em;
  font-size: 0.85rem;
}

.stats-msg {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.stats-msg span {
  color: var(--accent-hover);
  font-weight: 700;
}

.media-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.media-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.media-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.media-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.media-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.media-title-input {
  width: 100%;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.3rem 0.5rem;
}

.media-downloads {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.type-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.4rem 0.5rem;
  font-size: 0.8rem;
}

.media-item audio {
  width: 100%;
  height: 44px;
  color-scheme: dark;
  accent-color: var(--accent);
  background: var(--bg-elevated);
  border-radius: 8px;
}

.media-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.empty-msg {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 1.5rem 1rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow);
}

.modal h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.error-msg {
  color: var(--danger);
  font-size: 0.85rem;
}

@media (min-width: 640px) {
  .upload-form {
    grid-template-columns: 1fr 1fr;
  }

  .upload-form .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (min-width: 900px) {
  .container {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .media-actions {
    justify-content: flex-end;
  }
}
