/* KuVinh Music — giao diện công khai */
:root {
  --accent: #C8F542;
  --bg: #0E0F13;
  --bg-2: #15171D;
  --bg-3: #1B1D25;
  --line: #23252D;
  --line-2: #2E313A;
  --text: #F2EFE8;
  --text-2: #C9CBD1;
  --muted: #9A9DA6;
  --ink: #0E0F13;
  --radius: 12px;
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --player-h: 0px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  padding-bottom: var(--player-h);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.ic { flex: none; }

/* Chữ */
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.display { margin: 0; font-size: clamp(40px, 7vw, 80px); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; overflow-wrap: anywhere; }
.h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.h2.big { font-size: clamp(32px, 5vw, 48px); }
.h3 { margin: 0; font-size: 20px; font-weight: 700; }
.h4 { margin: 0; font-size: 18px; font-weight: 600; }
.lead { margin: 0; font-size: 18px; line-height: 1.65; color: var(--text-2); max-width: 560px; }
.prose { font-size: 18px; line-height: 1.75; color: var(--text-2); }

/* Nút */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none !important; white-space: nowrap;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: #3A3D47; }
.btn-ghost:hover { border-color: var(--text-2); }
.btn-dark { background: var(--ink); color: var(--text); border-radius: 10px; min-height: 52px; }
.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text-2);
}
.icon-btn:hover { color: var(--text); }
.icon-btn.ring { border: 1px solid #3A3D47; color: var(--text); }
.icon-btn.ring:hover { border-color: var(--accent); }
.i-play, .i-pause { display: inline-flex; }
[data-play] .i-pause { display: none; }
[data-play].is-on .i-play { display: none; }
[data-play].is-on .i-pause { display: inline-flex; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--text-2);
  font-size: 14px; font-weight: 500; text-decoration: none !important;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.is-on, .chip[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.badge { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; background: var(--accent); color: var(--ink); }

/* Header & footer */
.site-header { border-bottom: 1px solid var(--line); }
.header-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: .02em; text-decoration: none !important; }
.brand-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.brand-dot span { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--text-2); padding-block: 10px; }
.nav a:hover, .nav a[aria-current] { color: var(--text); text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; padding-block: 40px; }
.footer-brand { font-weight: 800; }
.footer-in p { margin: 4px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.footer-links a { color: var(--text-2); }
.notice { margin-top: 16px; padding: 12px 16px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--accent); }
.notice-error { border-color: #FF9B7A; }
.notice-warn { border-color: #FACC15; }

/* Ảnh bìa */
.cover { border-radius: 8px; object-fit: cover; aspect-ratio: 1 / 1; width: 100%; background: var(--bg-3); }
.cover-sm { width: 52px; height: 52px; border-radius: 6px; flex: none; }
.cover-lg { border-radius: 12px; }
.cover-xl { border-radius: 12px; }
.cover-ph { position: relative; display: flex; align-items: center; justify-content: center; background: var(--c, var(--accent)); }
.cover-ph span { width: 56%; height: 56%; border-radius: 50%; background: var(--ink); position: relative; }
.cover-ph span::after { content: ""; position: absolute; inset: 40%; border-radius: 50%; background: var(--c, var(--accent)); }

/* Trang chủ */
.hero { display: flex; flex-wrap: wrap; gap: 48px 56px; align-items: center; padding-block: 72px 56px; }
.hero-cover { flex: 1 1 340px; max-width: 460px; }
.hero-body { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-empty { padding-block: 120px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.avail { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.section { padding-block: 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.tracklist { border-top: 1px solid var(--line); }
.track { display: flex; align-items: center; gap: 16px 20px; padding: 12px; border-bottom: 1px solid var(--line); border-radius: 4px; }
.track:hover, .track.is-current { background: #181A21; }
.track.is-current .track-title { color: var(--accent); }
.track-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.track-title { color: var(--text); font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-dur { flex: none; }
.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 24px; }
.platform-card { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text); background: var(--bg-2); text-decoration: none !important; }
.platform-card:hover { border-color: var(--accent); }
.platform-card strong { flex: 1; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.video-card { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.video-card figcaption { display: flex; flex-direction: column; gap: 2px; }
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--bg-3); }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(14,15,19,.85); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.yt-play:hover { background: var(--ink); transform: scale(1.05); }
.about { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.about-head { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; }
.about-body { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.steps li { border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; }
.steps strong { font-size: 16px; }
.newsletter { background: var(--accent); color: var(--ink); border-radius: 16px; padding: clamp(28px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 24px 32px; align-items: center; justify-content: space-between; }
.newsletter p { margin: 8px 0 0; }
.nl-form { flex: 1 1 380px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.nl-form .field { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; }
.nl-form label { font-size: 14px; font-weight: 600; }
.nl-form input { height: 52px; border: 0; border-radius: 10px; padding: 0 16px; font: inherit; background: #F6FBE4; color: var(--ink); }
.nl-form input:focus { outline: 2px solid var(--ink); }
.nl-msg { flex-basis: 100%; margin: 0; min-height: 1em; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Trang bài hát */
.song-hero { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-end; padding-block: 56px 32px; }
.song-cover { flex: 0 1 340px; }
.song-head { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.artist { font-size: 18px; color: var(--text-2); }
.listen { padding-block: 8px 24px; display: flex; flex-direction: column; gap: 14px; }
.listen-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.embed-panel { border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.embed-panel iframe { display: block; width: 100%; border: 0; }
.embed-panel .ratio { aspect-ratio: 16 / 9; }
.embed-panel .ratio iframe { height: 100%; }
.song-body { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-block: 24px 40px; }
.song-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.song-aside { flex: 1 1 320px; display: flex; flex-direction: column; gap: 24px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.tab { min-height: 48px; padding: 0 2px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 16px; font-weight: 600; }
.tab.is-on { color: var(--text); border-bottom-color: var(--accent); }
.lyrics { display: flex; flex-direction: column; gap: 28px; }
.verse { display: flex; flex-direction: column; gap: 6px; }
.verse p { margin: 0; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.6; }
.verse.is-chorus p { font-weight: 600; }
.verse-label { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.verse.is-chorus .verse-label { color: var(--accent); }
.story { display: flex; flex-direction: column; gap: 20px; }
.card { border: 1px solid var(--line); background: var(--bg-2); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card p { margin: 0; }
.card-accent { border-color: var(--accent); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.info { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px 16px; font-size: 14px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; overflow-wrap: anywhere; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row .btn { flex: 1 1 140px; border-radius: 10px; }

/* Trình phát */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(21,23,29,.97); border-top: 1px solid #2A2D36; backdrop-filter: blur(10px); padding-bottom: env(safe-area-inset-bottom); }
.player-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-block: 10px; }
.p-cover { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; flex: none; }
.p-cover img, .p-cover .cover-ph { width: 100%; height: 100%; object-fit: cover; }
.p-meta { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; }
.p-title { color: var(--text); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-ctrl { display: flex; align-items: center; gap: 4px; }
.p-play { width: 48px; height: 48px; background: var(--accent); color: var(--ink) !important; }
.p-play .i-pause { display: none; }
.player.is-playing .p-play .i-play { display: none; }
.player.is-playing .p-play .i-pause { display: inline-flex; }
.p-seek { flex: 2 1 260px; display: flex; align-items: center; gap: 10px; color: var(--muted); }
.p-seek input { flex: 1; accent-color: var(--accent); height: 28px; }
.p-hq { min-height: 36px; padding: 0 12px; border-radius: 6px; border: 1px solid #3A3D47; background: transparent; color: var(--text-2); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; }
.p-hq[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.p-hq:disabled { opacity: .35; cursor: not-allowed; }

@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .header-in { padding-block: 12px; }
  .header-in .btn-sm { display: none; }
  .nav { width: 100%; gap: 4px 18px; }
  .hero { padding-block: 32px; }
  .track { gap: 12px; padding: 10px 4px; }
  .track .cover-sm { display: none; }
  .p-seek { order: 5; flex-basis: 100%; }
  .p-hq { order: 4; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
