/* 公共页面补充样式 + 表单/认证/提示等共享样式 */

a.button {
  text-decoration: none;
}

.site-nav {
  flex-wrap: wrap;
}

.public-header {
  margin-bottom: 22px;
}

.public-intro {
  align-items: flex-end;
  margin: 10px 0 18px;
}

.intro-title {
  margin: 4px 0 0;
  color: var(--text);
  font-size: clamp(19px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.intro-copy {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.intro-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  display: block;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-strong);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
}

.badge-admin {
  color: #ffc3e7;
  border-color: rgba(255, 110, 199, 0.28);
  background: rgba(255, 110, 199, 0.08);
}

.badge-user {
  color: #a9ddff;
  border-color: rgba(86, 225, 255, 0.24);
  background: rgba(86, 225, 255, 0.07);
}

.notice {
  margin: 12px 0;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.65;
  background: rgba(255, 255, 255, 0.035);
}

.notice-success {
  color: #b7f5c8;
  border-color: rgba(80, 220, 130, 0.24);
  background: rgba(80, 220, 130, 0.07);
}

.notice-error {
  color: #ffc0b7;
  border-color: rgba(255, 120, 100, 0.28);
  background: rgba(255, 120, 100, 0.08);
}

.notice-warning {
  color: #ffe1a8;
  border-color: rgba(255, 209, 139, 0.28);
  background: rgba(255, 209, 139, 0.08);
}

.notice-info {
  color: #b9d7ff;
}

.is-disabled {
  pointer-events: none;
  opacity: 0.42;
}

/* 让图片在 JS 不可用时也能显示，错误时由 JS 移除 */
.cover-img,
.player-cover img {
  opacity: 1;
  transition: none;
}

.cover::after {
  z-index: 2;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.break {
  overflow-wrap: anywhere;
  word-break: break-word;
}

code {
  padding: 1px 5px;
  border-radius: 4px;
  color: #b9e9ff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 11px;
}

.field > span {
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(165, 190, 255, 0.16);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 150ms ease, background 150ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(86, 225, 255, 0.5);
  background: rgba(86, 225, 255, 0.06);
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field-hint {
  color: #7887aa;
  font-size: 10px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.form-grid .form-action {
  align-self: end;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 16px;
  background:
    radial-gradient(circle at 16% 10%, rgba(70, 104, 255, 0.22), transparent 36%),
    radial-gradient(circle at 88% 88%, rgba(255, 110, 199, 0.14), transparent 34%),
    #080d1a;
}

.auth-shell {
  width: min(410px, 100%);
}

.auth-card {
  padding: 26px 24px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(16, 25, 47, 0.9);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(22px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.auth-brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 12px;
}

.auth-title {
  margin: 0;
  color: var(--text);
  font-size: 23px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.auth-copy {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
  min-height: 42px;
}

.auth-footer {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.auth-footer a {
  color: var(--muted-strong);
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--accent);
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .public-intro {
    align-items: flex-start;
  }

  .intro-badges {
    justify-content: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* 曲目详情弹窗 */
body.modal-open {
  overflow: hidden;
}

.song-card {
  cursor: pointer;
}

.song-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.song-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.song-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 20, 0.78);
  backdrop-filter: blur(8px);
}

.song-modal-card {
  position: relative;
  width: min(820px, 100%);
  max-height: min(82vh, 900px);
  overflow: hidden;
  border: 1px solid rgba(120, 190, 255, 0.22);
  border-radius: 22px;
  background: var(--panel, #0d1628);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.song-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(8, 13, 26, 0.85);
  color: var(--text, #eaf2ff);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.song-modal-body {
  max-height: min(82vh, 900px);
  overflow-y: auto;
  padding: 30px;
  overscroll-behavior: contain;
}

.song-detail-head {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding-right: 30px;
}

.song-detail-cover {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(145deg, #122441, #07101f);
  border: 1px solid rgba(120, 190, 255, 0.16);
}

.song-detail-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-detail-head h2 {
  margin: 6px 0 4px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.2;
}

.song-detail-artist {
  margin: 0 0 12px;
  color: var(--muted-strong, #b8c7dd);
}

.song-detail-aliases {
  margin: 12px 0 0;
  color: var(--muted, #8ea3bd);
  font-size: 0.9rem;
  line-height: 1.6;
}

.chart-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.chart-row {
  padding: 14px 16px;
  border: 1px solid rgba(120, 190, 255, 0.14);
  border-radius: 14px;
  background: rgba(8, 15, 30, 0.62);
}

.chart-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chart-row-head strong {
  font-size: 0.98rem;
}

.chart-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(86, 225, 255, 0.12);
  color: var(--accent, #56e1ff);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chart-level {
  min-width: 38px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  text-align: center;
}

.chart-constant {
  color: var(--muted, #8ea3bd);
  font-size: 0.82rem;
}

.chart-designer {
  margin: 8px 0 10px;
  color: var(--muted, #8ea3bd);
  font-size: 0.85rem;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.note-grid span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.note-grid b {
  font-size: 0.98rem;
}

.note-grid small {
  color: var(--muted, #8ea3bd);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

@media (max-width: 620px) {
  .song-modal {
    padding: 10px;
  }

  .song-modal-body {
    padding: 22px 16px;
  }

  .song-detail-head {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding-right: 28px;
  }

  .note-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
