/* =============================================================================
   SÓNG — kiểu dáng riêng của từng trang
   ========================================================================== */

/* =============================================================================
   TRANG CHỦ — khối nổi bật
   ========================================================================== */

.home-hero {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    padding: var(--s-7) var(--s-6);
    margin-bottom: var(--s-7);
    background: var(--brand-grad);
    isolation: isolate;
}

/*  Có ảnh nền thì phủ lên một lớp tối dần. Chữ trắng trên ảnh bất kỳ là canh
    bạc — ảnh sáng là mất chữ. Lớp phủ này đảm bảo tương phản đủ đọc dù ảnh
    biên tập viên chọn là gì.                                                  */
.home-hero--img { background: var(--surface); }
.home-hero--img::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--hero-img);
    background-size: cover;
    background-position: center;
}
.home-hero--img::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg,
                rgba(8, 7, 12, .92) 0%,
                rgba(8, 7, 12, .72) 45%,
                rgba(8, 7, 12, .35) 100%);
}

.home-hero__in { position: relative; max-width: 46rem; }

.home-hero__kicker {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(255, 255, 255, .82);
    margin-bottom: var(--s-2);
}

.home-hero__title {
    font-size: clamp(1.9rem, 5vw, var(--fs-3xl));
    color: #fff;
    margin-bottom: var(--s-3);
}

.home-hero__text {
    color: rgba(255, 255, 255, .88);
    font-size: var(--fs-md);
    margin-bottom: var(--s-5);
    max-width: 40rem;
}

/*  Nút trên nền gradient: nút chính đổi thành nền trắng chữ tím, vì gradient
    trên gradient thì nút biến mất.                                            */
.home-hero .btn--grad {
    background: #fff;
    color: var(--brand-strong);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
}
.home-hero .btn--grad:hover { background: #fff; color: var(--brand-strong); filter: brightness(.97); }
.home-hero .btn--ghost {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .3);
    color: #fff;
}
.home-hero .btn--ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; }

@media (max-width: 640px) {
    .home-hero { padding: var(--s-6) var(--s-4); border-radius: var(--r-md); }
}

/* Dải MV: thẻ rộng hơn vì ảnh ngang */
.rail--wide { grid-auto-columns: minmax(260px, 1fr); }
@media (min-width: 1200px) { .rail--wide { grid-auto-columns: minmax(300px, 1fr); } }

/* =============================================================================
   TRANG NGHỆ SĨ — ảnh bìa ngang
   ========================================================================== */

.artist-banner {
    position: relative;
    height: 260px;
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: calc(var(--s-6) * -1);
    background: var(--brand-grad);
}
.artist-banner img { width: 100%; height: 100%; object-fit: cover; }
.artist-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, var(--bg) 100%);
}
@media (max-width: 700px) { .artist-banner { height: 160px; } }

.artist-hero { position: relative; z-index: 1; }
.artist-hero .hero__art { border-radius: var(--r-full); }

/* =============================================================================
   TRANG MV — khung xem
   ========================================================================== */

#video-host { margin-bottom: var(--s-5); }
#video-host .vstage { border-radius: var(--r-lg); }

/* =============================================================================
   TRANG TÌM KIẾM
   ========================================================================== */

.search-head {
    margin-bottom: var(--s-6);
    padding-bottom: var(--s-5);
    border-bottom: 1px solid var(--line);
}
.search-head h1 { margin-bottom: var(--s-2); }
.search-head p { color: var(--text-2); margin: 0; }
.search-head mark {
    background: none;
    color: var(--brand-soft);
    font-weight: 700;
}

/* Ô tìm kiếm lớn ở giữa trang khi chưa nhập gì */
.search-big {
    max-width: 34rem;
    margin: var(--s-8) auto;
    text-align: center;
}
.search-big .search { max-width: none; margin-top: var(--s-5); }
.search-big .search__input { padding-top: var(--s-4); padding-bottom: var(--s-4); }

/* =============================================================================
   TRANG TĨNH (giới thiệu, điều khoản…)
   ========================================================================== */

.prose {
    max-width: var(--w-read);
    color: var(--text-2);
    font-size: var(--fs-md);
}
.prose h2, .prose h3 { color: var(--text); margin-top: var(--s-6); }
.prose ul, .prose ol { margin: 0 0 var(--s-4); padding-left: var(--s-5); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: var(--s-2); }
.prose a { color: var(--brand-soft); text-decoration: underline; text-underline-offset: 2px; }
.prose img { border-radius: var(--r); margin: var(--s-4) 0; }
.prose blockquote {
    border-left: 3px solid var(--brand);
    padding-left: var(--s-4);
    margin: var(--s-5) 0;
    font-style: italic;
}

/* =============================================================================
   TRANG 404
   ========================================================================== */

.p404 {
    text-align: center;
    padding: var(--s-8) var(--s-4);
    max-width: 30rem;
    margin: 0 auto;
}
.p404__code {
    font-size: clamp(4rem, 18vw, 8rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--s-3);
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* =============================================================================
   MÀN HÌNH THỐNG KÊ

   Chỉ quản trị viên thấy. Biểu đồ vẽ bằng CSS thuần — không nạp thư viện biểu
   đồ nào. Một thư viện vẽ đồ thị nặng hơn cả trình phát nhạc, chỉ để vẽ mấy
   cột chữ nhật thì không đáng, và mỗi thư viện ngoài là thêm một thứ phải tin.
   ========================================================================== */

.stat-grid {
    display: grid;
    gap: var(--s-4);
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-bottom: var(--s-6);
}

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-4);
}
.stat__k {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-3);
    margin-bottom: var(--s-2);
}
.stat__v {
    font-size: var(--fs-xl);
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat__note { font-size: var(--fs-xs); color: var(--text-3); margin-top: var(--s-2); }

/* ---- Biểu đồ cột -------------------------------------------------------- */

.chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 180px;
    padding: var(--s-4) 0 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.bar {
    flex: 1;
    min-width: 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: var(--s-2);
    height: 100%;
}
.bar i {
    display: block;
    width: 100%;
    height: var(--h, 0%);
    min-height: 2px;
    border-radius: 3px 3px 0 0;
    background: var(--brand-grad);
    transition: filter var(--t-fast) var(--ease);
}
.bar:hover i { filter: brightness(1.25); }
.bar__x {
    font-size: 10px;
    color: var(--text-3);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ---- Biểu đồ thanh ngang (quốc gia, thiết bị…) --------------------------- */

.hbars { display: flex; flex-direction: column; gap: var(--s-3); }

.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 72px; gap: var(--s-3); align-items: center; }
.hbar__k { font-size: var(--fs-sm); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__t { height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
.hbar__f { height: 100%; width: var(--w, 0%); border-radius: var(--r-full); background: var(--brand-grad); }
.hbar__v { font-size: var(--fs-sm); color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
    .hbar { grid-template-columns: 88px minmax(0, 1fr) 58px; gap: var(--s-2); }
}

/* ---- Bảng --------------------------------------------------------------- */

.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tbl th, .tbl td { padding: var(--s-3); text-align: left; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--text-3); font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr:hover { background: var(--surface); }

.tbl-wrap { overflow-x: auto; }

/* ---- Bộ chọn kỳ --------------------------------------------------------- */

.period {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    align-items: center;
    margin-bottom: var(--s-5);
}
.period select {
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
}

.p404__count { font-size: var(--fs-sm, .875rem); color: var(--text-3, var(--text-2)); margin-bottom: var(--s-5); }
.p404__count b { color: var(--text); font-variant-numeric: tabular-nums; }
