/* ============================================
   演之音Hi·Res - 高解析度音乐
   Premium Hi-Fi 视觉风格 v2
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&family=Playfair+Display:wght@600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Dark Hi-Fi Palette */
  --bg-primary: #08080e;
  --bg-secondary: #0e0e18;
  --bg-card: rgba(22, 22, 38, 0.8);
  --bg-card-hover: rgba(32, 32, 52, 0.9);
  --bg-glass: rgba(14, 14, 24, 0.85);
  --text-primary: #ececf2;
  --text-secondary: #9898b0;
  --text-muted: #5c5c74;
  --accent: #d4a84b;
  --accent-light: #e8c06a;
  --accent-dim: rgba(212, 168, 75, 0.12);
  --accent-glow: rgba(212, 168, 75, 0.25);
  --border: rgba(42, 42, 64, 0.6);
  --border-light: rgba(42, 42, 64, 0.3);
  --danger: #e85555;
  --danger-dim: rgba(232, 85, 85, 0.12);
  --success: #55cc88;
  --success-dim: rgba(85, 204, 136, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle background atmosphere */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212, 168, 75, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(100, 60, 200, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(212, 168, 75, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-light); }

/* ========== Header ========== */

header {
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
  user-select: none;
}
.logo span {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 4px;
}

nav a {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

nav a:hover,
nav a.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

/* ========== Main Container ========== */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 28px;
  min-height: calc(100vh - 68px);
}

/* ========== Page Sections ========== */

.page {
  display: none;
  animation: pageEnter 0.5s ease;
}

.page.active {
  display: block;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 300;
}

/* ========== Search & Filter Bar ========== */

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-btn {
  padding: 7px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
}
.cat-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text-secondary);
  background: var(--accent-dim);
}
.cat-btn.cat-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
}

.search-bar {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: var(--font-body);
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* ========== Artist Grid ========== */

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

.artist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

/* Top accent line */
.artist-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: width var(--transition);
}

.artist-card:hover::before {
  width: 80%;
}

.artist-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-dim);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.artist-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  opacity: 0;
  background: linear-gradient(135deg, transparent 60%, var(--accent-dim));
  transition: opacity var(--transition);
  pointer-events: none;
}

.artist-card:hover::after {
  opacity: 1;
}

.artist-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dim), rgba(22, 22, 38, 0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--accent);
  margin-bottom: 16px;
  border: 2px solid var(--border);
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}

.artist-card:hover .artist-avatar {
  border-color: var(--accent-dim);
  box-shadow: 0 0 20px var(--accent-glow);
}

.artist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.artist-card .song-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.artist-card .bio-preview {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ========== Back Button ========== */

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  background: none;
  border: 1px solid transparent;
  font-family: var(--font-body);
}

.back-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border);
}

/* ========== Artist Detail ========== */

.artist-detail-header {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  margin-bottom: 36px;
  padding: 36px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.artist-detail-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dim), rgba(22, 22, 38, 0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  color: var(--accent);
  flex-shrink: 0;
  border: 2px solid var(--border);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(212, 168, 75, 0.08);
}

.artist-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-detail-info {
  flex: 1;
}

.artist-detail-info h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.artist-detail-info .artist-category-tag {
  display: inline-block;
  padding: 3px 12px;
  background: var(--accent-dim);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.artist-detail-info .bio {
  color: var(--text-secondary);
  line-height: 1.9;
  font-size: 0.92rem;
}

/* ========== Song Table ========== */

.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.song-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.song-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  background: rgba(255,255,255,0.02);
}

.song-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  transition: background var(--transition);
}

.song-table tr {
  transition: background var(--transition);
}

.song-table tbody tr:hover td {
  background: var(--bg-card);
}

.song-table tbody tr:last-child td {
  border-bottom: none;
}

.song-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.song-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 3px;
  max-width: 300px;
}

.song-format {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  background: var(--accent-dim);
  padding: 2px 10px;
  border-radius: 100px;
  display: inline-block;
}

.song-bitrate {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.song-price {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
}

.btn-download {
  display: inline-block;
  padding: 8px 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-download:hover {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  transform: scale(1.04);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-download-large {
  padding: 16px 36px;
  font-size: 1rem;
  border-radius: var(--radius);
  white-space: nowrap;
}

/* ========== Download Card ========== */

.download-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, var(--bg-card), rgba(22, 22, 38, 0.6));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-top: 20px;
  backdrop-filter: blur(8px);
}

.download-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
}

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

.download-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.download-info p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.download-pwd {
  margin-top: 6px;
  padding: 5px 12px;
  background: var(--accent-dim);
  border-radius: var(--radius-xs);
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.download-pwd strong {
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

@media (max-width: 640px) {
  .download-card {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
  .btn-download-large { width: 100%; text-align: center; }
}

/* ========== Admin ========== */

.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.admin-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.admin-form .full-width { grid-column: 1 / -1; }

.admin-form label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: block;
  font-weight: 500;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: var(--font-body);
  transition: all var(--transition);
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

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

.btn {
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--bg-primary);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  background: #cc4444;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border);
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* Admin artist list */
.admin-artist-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.admin-artist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.admin-artist-header h3 { font-size: 1rem; font-weight: 600; }

.admin-artist-actions {
  display: flex;
  gap: 8px;
}

/* Admin song row */
.admin-song-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  margin-bottom: 6px;
  font-size: 0.85rem;
}
.admin-song-info { display: flex; gap: 16px; align-items: center; }
.admin-song-title { font-weight: 500; }
.admin-song-meta { color: var(--text-muted); font-size: 0.8rem; }

.admin-data-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ========== Modal ========== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 90%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalEnter 0.3s ease;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h3 { margin-bottom: 18px; font-size: 1.1rem; font-weight: 600; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ========== Empty State ========== */

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 8px; font-weight: 500; }

/* ========== Toast ========== */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  color: var(--text-primary);
  font-size: 0.88rem;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 300;
  pointer-events: none;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }

/* ========== Auth ========== */

.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 68px - 60px);
  padding: 24px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.auth-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 2px;
}
.auth-logo span { color: var(--accent); }

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 28px;
  font-weight: 300;
}

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

.auth-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: var(--font-body);
  transition: all var(--transition);
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.auth-input::placeholder { color: var(--text-muted); }

.auth-code-input {
  font-family: var(--font-mono);
  letter-spacing: 2px;
}

.auth-btn {
  padding: 13px;
  font-size: 1rem;
  width: 100%;
  margin-top: 4px;
}

/* ========== 微信联系浮动按钮 ========== */

#wechat-contact {
  position: fixed;
  right: 24px;
  bottom: 100px;
  z-index: 500;
}

#wechat-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: var(--bg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(212, 168, 75, 0.3);
  transition: all 0.3s;
}

#wechat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(212, 168, 75, 0.45);
}

#wechat-popup {
  position: absolute;
  right: 64px;
  bottom: 0;
  display: none;
  width: 240px;
}

#wechat-popup.show { display: block; }

.wechat-popup-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.wechat-popup-inner h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.wechat-popup-inner > p {
  margin: 0 0 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

#wechat-qr {
  width: 160px;
  height: 160px;
  margin: 0 auto 10px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  overflow: hidden;
}

#wechat-qr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wechat-hint {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0;
}

.wechat-hint strong {
  color: var(--accent);
}

#wechat-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

#wechat-close:hover { color: var(--text-primary); }

.auth-message {
  margin-top: 16px;
  font-size: 0.85rem;
  min-height: 1.5em;
}
.auth-message.success { color: var(--success); }
.auth-message.error { color: var(--danger); }

.auth-link {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-link a { color: var(--accent); cursor: pointer; }
.auth-link a:hover { color: var(--accent-light); }

/* ========== Code Management ========== */

.code-gen-form { margin-bottom: 18px; }

.code-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.code-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.code-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.code-table tbody tr:hover td {
  background: var(--bg-card);
}

.code-table tbody tr:last-child td { border-bottom: none; }

.code-value {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  background: var(--bg-primary);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  color: var(--accent);
}

.code-active { color: var(--success); font-weight: 600; }
.code-used { color: var(--text-muted); }

.code-time {
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ========== Footer ========== */

footer {
  text-align: center;
  padding: 28px 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-light);
  font-weight: 300;
}

/* ========== Responsive ========== */

@media (max-width: 768px) {
  main { padding: 24px 16px; }
  .header-inner { padding: 0 16px; }

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

  .artist-detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    gap: 20px;
  }
  .artist-detail-avatar { width: 100px; height: 100px; font-size: 2.5rem; }

  .song-table th,
  .song-table td { padding: 12px 10px; }
  .song-table { font-size: 0.82rem; }
  .song-desc { max-width: 120px; }

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

  .page-header h1 { font-size: 1.6rem; }
  .page-header p { font-size: 0.85rem; }

  .auth-card { padding: 36px 24px; }
}

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

  .song-table th:nth-child(3),
  .song-table td:nth-child(3),
  .song-table th:nth-child(4),
  .song-table td:nth-child(4) { display: none; }

  .download-card { padding: 20px; }
  .admin-section { padding: 18px 16px; }
}
