:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --line: #2a2a2a;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --dim: #6b6b6b;
  --accent: #ffc20e;
  --accent-ink: #111;
  --danger: #ff5c5c;
  --ok: #4ade80;
  --radius: 12px;
  --gutter: 20px;
  --max: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
svg { flex-shrink: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 10, 10, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 48px; width: auto; }
.brand-stack { flex-direction: column; align-items: flex-start; gap: 6px; }
.brand-sub { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .04em; }
@media (min-width: 900px) { .brand-logo { height: 54px; } }
.nav-desktop { display: none; gap: 28px; font-size: 14px; font-weight: 500; }
.nav-desktop a { color: var(--muted); transition: color .15s; }
.nav-desktop a:hover, .nav-desktop a[aria-current="page"] { color: var(--text); }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 10px;
}
.icon-btn:hover { background: var(--surface); }
@media (min-width: 860px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
}

/* ---------- Drawer & sheets ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, .7);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(320px, 86vw); background: var(--surface); border-left: 1px solid var(--line);
  padding: 20px; transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column; gap: 4px;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.drawer a.nav-item {
  padding: 14px 12px; border-radius: 10px; font-weight: 600;
  display: flex; align-items: center; gap: 12px;
}
.drawer a.nav-item:hover, .drawer a.nav-item[aria-current="page"] { background: var(--surface-2); color: var(--accent); }

.sheet {
  position: fixed; z-index: 61; left: 50%; bottom: 0;
  width: min(520px, 100%); transform: translate(-50%, 105%);
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 20px 20px 0 0; padding: 22px var(--gutter) calc(26px + env(safe-area-inset-bottom));
  transition: transform .25s ease;
}
.sheet.open { transform: translate(-50%, 0); }
@media (min-width: 640px) {
  .sheet { bottom: auto; top: 50%; border-radius: 20px; border-bottom: 1px solid var(--line); transform: translate(-50%, -40%); opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s; }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
}
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.sheet-head h3 { margin: 0; font-size: 20px; }
.sheet-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.option-list { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2); transition: border-color .15s, transform .15s;
}
.option:hover { border-color: var(--accent); }
.option .opt-icon {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: #0d0d0d; color: var(--accent);
}
.option .opt-body { flex: 1; min-width: 0; }
.option strong { display: block; }
.option span.sub { font-size: 13px; color: var(--muted); word-break: break-all; }
.option.disabled { opacity: .5; pointer-events: none; }

/* ---------- Buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 24px; border-radius: 6px;
  font-weight: 700; font-size: 15px; letter-spacing: .02em; text-transform: uppercase;
  border: 1px solid transparent; transition: transform .1s, background .15s, border-color .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ffd040; }
.btn-ghost { background: transparent; border-color: #3a3a3a; color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
/* Nút 2 dòng: tiếng Việt + phụ đề tiếng Anh */
.btn-label { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; line-height: 1.25; text-align: center; }
.btn-label > span { display: inline-flex; align-items: center; gap: 8px; }
.btn-label small { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; opacity: .85; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; text-transform: none; letter-spacing: 0; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero { padding: 36px 0 28px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; }
.hero h1 {
  margin: 14px 0 0; font-size: clamp(38px, 9vw, 68px); line-height: 1.08; font-weight: 800; letter-spacing: -.015em;
}
.hero .tagline { margin: 14px 0 0; font-size: clamp(26px, 5.6vw, 36px); font-weight: 800; color: var(--accent); line-height: 1.15; }
.hero .lead { margin: 18px 0 0; color: #cfcfcf; font-size: 17px; max-width: 30em; }
.hero-actions { display: grid; gap: 14px; margin-top: 30px; max-width: 460px; }
.feature-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px 20px;
  margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line);
}
.feature { display: flex; flex-direction: column; gap: 12px; border-radius: 10px; }
.feature svg { color: var(--accent); }
.feature strong { display: block; font-weight: 600; font-size: 17px; line-height: 1.3; }
.feature small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
a.feature { transition: transform .15s; }
a.feature:hover strong { color: var(--accent); }
.scroll-down {
  margin: 30px auto 0; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid #3a3a3a; display: grid; place-items: center; color: var(--text);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(5px); } }
@media (min-width: 960px) {
  .hero { padding: 72px 0 40px; }
  .hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: end; }
  .feature-grid { margin-top: 0; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); gap: 34px 28px; }
  .scroll-down { grid-column: 1 / -1; }
}

/* ---------- Sections ---------- */
section.block { padding: 64px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 8px 0 0; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; font-weight: 800; }
.section-head p { margin: 10px 0 0; color: var(--muted); max-width: 36em; }
.link-more { color: var(--accent); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }

.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards.four { grid-template-columns: repeat(4, 1fr); } }
.card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.card svg { color: var(--accent); }
.card h3 { margin: 16px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.stat { padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-size: 28px; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }

.contact-info h3 { margin: 0 0 18px; font-size: 18px; font-weight: 700; text-transform: uppercase; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.info-list li { display: flex; align-items: flex-start; gap: 16px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.info-list li svg { color: var(--muted); margin-top: 1px; }
.info-body { min-width: 0; overflow-wrap: anywhere; }
.info-body strong { display: block; color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.info-body a, .info-body span { display: block; }
.info-group + .info-group { margin-top: 10px; }
.info-group small { display: block; color: var(--dim); font-size: 13px; }
.info-list a { width: fit-content; transition: color .15s; }
.info-list a:hover { color: var(--accent); }
.follow { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.follow strong { font-size: 15px; font-weight: 600; }
.social-list { display: inline-flex; gap: 10px; }
.social {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  transition: color .15s, border-color .15s, background .15s;
}
a.social:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.social.disabled { opacity: .35; }
.site-footer .social { width: 34px; height: 34px; }
.site-footer .social svg { width: 16px; height: 16px; }
/* Hàng link chính sách — dấu chấm ngăn cách, tự xuống dòng khi hẹp */
.policy-links { display: flex; flex-wrap: wrap; gap: 8px 0; margin-top: 18px; font-size: 13px; line-height: 1.5; }
.policy-links a { color: var(--muted); transition: color .15s; }
.policy-links a:hover, .policy-links a[aria-current="page"] { color: var(--accent); }
.policy-links a:not(:last-child)::after { content: "·"; margin: 0 10px; color: var(--dim); }

/* Trang chính sách */
.policy { max-width: 760px; }
.policy-meta { margin: 14px 0 28px; display: grid; gap: 4px; font-size: 15px; color: var(--muted); }
.policy-meta:empty { display: none; }
.policy-meta dt { display: inline; font-weight: 600; color: var(--text); }
.policy-meta dd { display: inline; margin: 0; }
.policy-body { color: #d4d4d4; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.policy-body h2 { margin: 32px 0 10px; font-size: 22px; color: var(--text); }
.policy-body h3, .policy-body h4 { margin: 24px 0 8px; font-size: 18px; color: var(--text); }
.policy-body p { margin: 0 0 14px; }
.policy-body ul, .policy-body ol { margin: 0 0 14px; padding-left: 22px; }
.policy-body li { margin: 4px 0; }
.policy-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.policy-body strong { color: var(--text); }
.policy-nav { max-width: 760px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); }
.policy-nav strong { font-size: 14px; }
.policy-nav .policy-links { margin-top: 10px; }
@media (min-width: 900px) {
  .contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .contact-wrap .section-head { margin-bottom: 0; }
}

/* ---------- Gallery ---------- */
.page-head { padding: 40px 0 8px; }
.page-head h1 { margin: 10px 0 0; font-size: clamp(32px, 6vw, 48px); line-height: 1.1; font-weight: 800; }
.page-head p { color: var(--muted); margin: 10px 0 0; max-width: 40em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 24px 0; }
.search {
  flex: 1 1 220px; min-height: 44px; padding: 0 14px 0 40px; border-radius: 10px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center;
  border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 15px;
}
.search:focus { outline: none; border-color: var(--accent); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--muted);
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }

.grid-images { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-images { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid-images { grid-template-columns: repeat(3, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-align: left; padding: 0; transition: border-color .15s; }
.tile:hover { border-color: #444; }
.tile .thumb { aspect-ratio: 16 / 9; background: #111; position: relative; overflow: hidden; }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; user-select: none; -webkit-user-drag: none; }
.tile:hover .thumb img { transform: scale(1.03); }
.tile .meta { padding: 12px 14px 14px; }
.tile .meta strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-protected {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 4px 8px; border-radius: 6px;
  background: rgba(0, 0, 0, .7); color: var(--accent); text-transform: uppercase;
}
.date { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.audio-list { display: grid; gap: 10px; }
.track {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.track.playing { border-color: var(--accent); }
.play {
  width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
}
.track .info { min-width: 0; }
.track .info strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .sub { display: flex; gap: 12px; flex-wrap: wrap; }
.progress { height: 4px; background: #2a2a2a; border-radius: 4px; margin-top: 10px; overflow: hidden; cursor: pointer; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.track .dur { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.track .info strong[data-info] { cursor: pointer; }
.track .info strong[data-info]:hover { color: var(--accent); }
.track-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.track-actions .btn { flex: 1; }
@media (min-width: 640px) {
  .track { grid-template-columns: auto 1fr auto auto; }
  .track-actions { grid-column: auto; }
  .track-actions .btn { flex: none; }
}

.empty { padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.empty svg { color: var(--dim); margin: 0 auto 10px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .94);
  display: flex; flex-direction: column; padding: 16px var(--gutter) 24px;
}
.lightbox-top { display: flex; justify-content: flex-end; }
.lightbox-body { display: grid; place-items: center; min-height: 0; }
.lightbox-body img { max-height: 60vh; width: auto; border-radius: 8px; user-select: none; -webkit-user-drag: none; }
.details {
  flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 20px;
  align-content: start; justify-items: center; padding-top: 8px;
}
.lightbox:not(.has-media) .details { align-content: safe center; }
@media (min-width: 900px) {
  .lightbox.has-media .details { grid-template-columns: 1fr 400px; align-items: center; overflow: hidden; }
  .lightbox.has-media .lightbox-body { height: 100%; }
  .lightbox.has-media .lightbox-body img { max-height: 82vh; }
  .lightbox.has-media .cr-card { max-height: 100%; overflow-y: auto; }
}

/* Khung Copyright Information */
.cr-card {
  width: 100%; max-width: 440px; padding: 20px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
}
.cr-head { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.cr-thumb {
  flex: 0 0 104px; height: 80px; border-radius: 12px; overflow: hidden; background: #111;
  display: grid; place-items: center; color: var(--accent);
}
.cr-thumb.audio { flex-basis: 88px; height: 88px; background: linear-gradient(145deg, #2b1d4a, #1a1230); }
.cr-thumb img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.cr-title { min-width: 0; }
.cr-title h3 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.cr-title p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.cr-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #2e2e2e; color: var(--text); }
.pill-ok { background: rgba(74, 222, 128, .14); color: var(--ok); }
.cr-audio { width: 100%; margin-top: 16px; }
.cr-desc { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.cr-heading { margin: 22px 0 16px; font-size: 20px; font-weight: 700; }
.cr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.cr-list li { display: flex; gap: 14px; align-items: flex-start; }
.cr-list li svg { color: var(--muted); margin-top: 2px; }
.cr-list li div { min-width: 0; overflow-wrap: anywhere; }
.cr-list strong { display: block; font-size: 17px; font-weight: 700; }
.cr-list span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }
.cr-empty { color: var(--dim) !important; font-style: italic; }
.cr-verify { color: #fbbf24 !important; font-weight: 600; }
.cr-verify.ok { color: var(--ok) !important; }
.cr-cta { width: 100%; margin-top: 24px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 14px; margin-top: 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 20px);
  background: #fafafa; color: #111; font-weight: 600; font-size: 14px;
  padding: 12px 18px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .2s;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- Forms (admin) ---------- */
label.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
label.field small { font-weight: 400; color: var(--muted); }
.input, textarea.input, select.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); }
input[type="date"].input { color-scheme: dark; }

/* Popup/menu đã đóng: ẩn hẳn (không lóe khi đổi kích thước, không nhận focus bàn phím) */
.drawer, .sheet { visibility: hidden; }
.drawer.open, .sheet.open { visibility: visible; }
