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

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  background: #000;
  color: #fff;
}

body {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-variant-numeric: lining-nums;
}

.banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 32px;
  border-bottom: 1px solid #222;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 28px;
  line-height: 0.9;
}

/* Three-line menu button */
.menu-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 24px;
  height: 32px;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
  z-index: 30;
}

.menu-button span {
  display: block;
  height: 2px;
  background: #fff;
  transition: transform 0.25s, opacity 0.25s;
}

.menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Slide-out side panel */
.menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  max-width: 80vw;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 96px 32px 32px;
  background: #000;
  border-right: 1px solid #222;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 20;
}

.menu.open {
  transform: translateX(0);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.menu-overlay[hidden] {
  display: none;
}

.menu-link {
  color: #fff;
  text-decoration: none;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 0 4px;
  align-self: flex-start;
  cursor: pointer;
  opacity: 0.7;
}

.menu-link:hover,
.menu-link.active {
  opacity: 1;
  border-bottom-color: #fff;
}

.menu form {
  margin-top: auto;
}

.page {
  min-height: calc(100vh - 90px);
}

.sans {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

/* Home */
#home:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 720px;
  text-align: center;
}

.home-headline {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  opacity: 0.7;
}

.home-big {
  font-size: clamp(40px, 9vw, 88px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.hero-gif {
  width: 100%;
  max-width: 720px;
  height: auto;
}

.home-paragraph,
.contact-paragraph {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.85;
  white-space: pre-line;
  max-width: 60ch;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.pill-link {
  color: #fff;
  text-decoration: none;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  padding: 8px 18px;
  border: 1px solid #fff;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.pill-link:hover {
  background: #fff;
  color: #000;
}

/* Beats and contact */
.content-column {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-title {
  font-size: 36px;
}

.empty-note {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  opacity: 0.5;
}

.contact {
  align-items: center;
  text-align: center;
}

.contact-email {
  color: #fff;
  font-size: clamp(22px, 5vw, 32px);
  overflow-wrap: anywhere;
}

.beat-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.beat {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid #222;
}

.beat-cover {
  flex: none;
  width: 120px;
  height: 120px;
  background: #111;
}

.beat-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.beat-cover.no-cover img {
  display: none;
}

.beat-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.beat-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-button {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #000;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.play-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.play-button .icon-pause,
.beat.playing .play-button .icon-play {
  display: none;
}

.beat.playing .play-button .icon-pause {
  display: block;
}

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

.beat-title {
  font-size: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beat-meta,
.beat-time {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0.6;
}

.beat-download {
  flex: none;
  color: #fff;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #444;
}

.beat-download:hover {
  border-color: #fff;
}

.waveform {
  width: 100%;
  height: 56px;
  cursor: pointer;
  touch-action: manipulation;
}

.beat-time {
  display: flex;
  justify-content: space-between;
}

.beat-producer {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.beat-songs {
  border-top: 1px solid #222;
  padding-top: 12px;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
}

.beat-songs-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.5;
  margin-bottom: 6px;
}

.beat-songs ul {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.beat-songs li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  min-width: 0;
}

.beat-songs li + li {
  border-top: 1px solid #161616;
}

.song-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-artist {
  opacity: 0.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-artist::before {
  content: "·";
  margin-right: 10px;
}

.song-link {
  flex: none;
  margin-left: auto;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid #444;
  border-radius: 999px;
}

.song-link:hover {
  border-color: #fff;
}

@media (max-width: 600px) {
  .beat {
    flex-direction: column;
  }

  .beat-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .beat-cover.no-cover {
    display: none;
  }
}

/* Admin and login pages */
.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 16px;
}

.centered h1 {
  font-size: 36px;
  font-weight: 700;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 320px;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.login-form input {
  padding: 10px 12px;
  background: #000;
  color: #fff;
  border: 1px solid #444;
  font: inherit;
  font-size: 16px;
  letter-spacing: normal;
}

.login-form input:focus {
  outline: none;
  border-color: #fff;
}

.login-form button {
  padding: 10px 12px;
  background: #fff;
  color: #000;
  border: 0;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.login-error {
  color: #ff6b6b;
  font-size: 14px;
}

@media (max-width: 600px) {
  .banner {
    padding: 12px 16px;
    gap: 16px;
  }
}

/* Admin panel */
.admin {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #222;
}

.admin-tabs .menu-link {
  font-size: 16px;
  padding-bottom: 10px;
  margin-bottom: -1px;
}

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-panel[hidden] {
  display: none;
}

.admin h2 {
  font-size: 24px;
}

.admin-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid #222;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.field > span {
  opacity: 0.7;
}

.field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.field-row > .field {
  flex: 1 1 140px;
}

.admin input[type="text"],
.admin input[type="email"],
.admin input[type="url"],
.admin input[type="number"],
.admin textarea {
  width: 100%;
  padding: 10px 12px;
  background: #000;
  color: #fff;
  border: 1px solid #444;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}

.admin textarea {
  min-height: 110px;
  resize: vertical;
}

.admin input:focus,
.admin textarea:focus {
  outline: none;
  border-color: #fff;
}

.admin input[type="file"] {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #aaa;
}

.admin input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  background: #000;
  color: #fff;
  border: 1px solid #444;
  font: inherit;
  cursor: pointer;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: #fff;
}

.button {
  padding: 10px 18px;
  background: #fff;
  color: #000;
  border: 1px solid #fff;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.button.secondary {
  background: #000;
  color: #fff;
  border-color: #444;
}

.button.secondary:hover {
  border-color: #fff;
}

.button.danger {
  background: #000;
  color: #ff6b6b;
  border-color: #5a2323;
}

.button:disabled {
  opacity: 0.5;
  cursor: default;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  opacity: 0.8;
}

.status.error {
  color: #ff6b6b;
  opacity: 1;
}

.image-preview {
  max-width: 240px;
  max-height: 160px;
  object-fit: contain;
  align-self: flex-start;
  border: 1px solid #222;
}

.link-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-row {
  display: flex;
  gap: 8px;
}

.link-row input:first-child {
  flex: 0 1 35%;
}

.song-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.song-row input {
  flex: 1 1 0;
  min-width: 0;
}

.song-row input:first-child {
  flex: 1 1 0;
}

.link-row .button {
  flex: none;
  padding: 10px 14px;
}

.admin-beat {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.admin-beat .beat-cover {
  width: 88px;
  height: 88px;
}

.admin-beat-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-beat audio {
  width: 100%;
  height: 36px;
}

@media (max-width: 600px) {
  .admin-beat {
    flex-direction: column;
  }

  .link-row {
    flex-wrap: wrap;
  }

  .link-row input:first-child {
    flex-basis: 100%;
  }
}
