/**
 * Lyrics3s - Stylesheet Chi Tiết Thể Loại (taxonomy-genre.css)
 * Music Database Layout: Song-Centric Hub (Spotify / Apple Music aesthetics)
 * Tuân thủ nghiêm ngặt rules.md (< 350 dòng, KHÔNG viền trái, Solid Pill tabs, Vanilla CSS)
 *
 * @package Lyrics3s_Theme
 * @version 2.2.0
 */

/* 1. Page Base & Breadcrumbs */
.l3s-genre-single-page { padding-top: 16px; padding-bottom: 72px; }
.l3s-genre-single-page .l3s-breadcrumb-bar { margin-bottom: 24px; }
.l3s-genre-single-page .l3s-breadcrumb-list {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    list-style: none; padding: 0; margin: 0; font-size: 13.5px; color: var(--text-muted);
}
.l3s-genre-single-page .l3s-breadcrumb-item a { color: var(--text-muted); text-decoration: none; transition: color 0.15s ease; }
.l3s-genre-single-page .l3s-breadcrumb-item a:hover { color: var(--primary); }
.l3s-genre-single-page .l3s-breadcrumb-sep { color: var(--border-color); font-size: 15px; }
.l3s-genre-single-page .l3s-breadcrumb-item.is-active { color: var(--text-primary); font-weight: 600; }

/* 2. Hero Section & Metadata Stats Bar */
.l3s-genre-single-hero {
    position: relative; border-radius: 20px; background: var(--bg-card);
    border: 1px solid var(--border-subtle); padding: 36px 32px; margin-bottom: 36px;
    overflow: hidden; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
.l3s-genre-hero-glow {
    position: absolute; top: -60%; right: -15%; width: 450px; height: 450px; border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%); pointer-events: none; z-index: 0;
}
.l3s-genre-hero-content { position: relative; z-index: 1; max-width: 800px; }
.l3s-genre-hero-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 9999px;
    background: rgba(124, 58, 237, 0.12); color: var(--primary); font-size: 11.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 12px;
}
.l3s-genre-single-title {
    font-size: 2.3rem; font-weight: 800; font-family: var(--font-heading); color: var(--text-primary);
    line-height: 1.25; margin: 0 0 12px 0; letter-spacing: -0.4px;
}
.l3s-genre-single-desc {
    font-size: 15px; color: var(--text-secondary, var(--text-muted)); line-height: 1.6; margin: 0 0 20px 0; max-width: 720px;
}
.l3s-genre-meta-stats { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.l3s-genre-meta-stat-item { display: flex; align-items: baseline; gap: 6px; }
.l3s-genre-meta-stat-num { font-size: 1.35rem; font-weight: 800; font-family: var(--font-heading); color: var(--primary); }
.l3s-genre-meta-stat-label { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.l3s-genre-meta-stat-sep { color: var(--border-color); font-size: 14px; }

/* 3. Section: Songs List (Core Content Table) */
.l3s-genre-songs-section {
    background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 20px;
    padding: 28px 24px; margin-bottom: 40px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}
.l3s-genre-songs-header {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
    margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--border-subtle);
}
.l3s-genre-songs-title-wrap { display: flex; align-items: center; gap: 10px; }
.l3s-genre-section-title { font-size: 1.35rem; font-weight: 800; font-family: var(--font-heading); color: var(--text-primary); margin: 0; }
.l3s-genre-section-badge {
    font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 9999px;
    background: var(--bg-subtle); color: var(--text-muted);
}
.l3s-genre-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.l3s-genre-search-box { position: relative; display: flex; align-items: center; }
.l3s-genre-search-box svg { position: absolute; left: 12px; color: var(--text-muted); pointer-events: none; }
.l3s-genre-song-search-input {
    height: 36px; padding: 0 14px 0 34px; border-radius: 9999px; background: var(--bg-subtle);
    border: 1px solid var(--border-color); font-size: 13px; color: var(--text-primary); outline: none; width: 220px;
    transition: all 0.2s ease;
}
.l3s-genre-song-search-input:focus { border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); width: 250px; }

/* Sort Tabs (Solid Pill Pattern) */
.l3s-genre-sort-tabs { display: flex; align-items: center; gap: 6px; }
.l3s-genre-sort-btn {
    display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 9999px;
    background: var(--bg-subtle); border: 1px solid var(--border-color); color: var(--text-secondary);
    font-size: 12.5px; font-weight: 600; text-decoration: none; transition: all 0.2s ease;
}
.l3s-genre-sort-btn:hover { color: var(--primary); border-color: var(--primary-border); }
.l3s-genre-sort-btn.is-active {
    background: var(--primary-gradient, linear-gradient(135deg, #7c3aed, #a855f7));
    color: #ffffff; border-color: transparent; box-shadow: 0 3px 10px rgba(124, 58, 237, 0.25);
}

/* Songs Table */
.l3s-genre-songs-table { width: 100%; }
.l3s-songs-table-head {
    display: grid; grid-template-columns: 44px 1.8fr 1.4fr 90px 110px; align-items: center;
    padding: 10px 14px; font-size: 12px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border-subtle);
}
.l3s-songs-table-body { display: flex; flex-direction: column; }
.l3s-genre-song-row {
    display: grid; grid-template-columns: 44px 1.8fr 1.4fr 90px 110px; align-items: center;
    padding: 10px 14px; border-radius: 10px; transition: background 0.15s ease, transform 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.l3s-genre-song-row:hover { background: var(--bg-card-hover, rgba(255, 255, 255, 0.06)); }
.l3s-row-num { font-size: 13px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.l3s-col-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.l3s-row-thumb-link { flex-shrink: 0; text-decoration: none; }
.l3s-row-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; display: block; }
.l3s-row-thumb-placeholder {
    width: 40px; height: 40px; border-radius: 8px; background: var(--bg-subtle); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
}
.l3s-row-title-box { min-width: 0; flex: 1; }
.l3s-row-title { font-size: 14.5px; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l3s-row-title a { color: var(--text-primary); text-decoration: none; transition: color 0.15s ease; }
.l3s-row-title a:hover { color: var(--primary); }
.l3s-row-mobile-artist { display: none; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.l3s-row-mobile-artist a { color: var(--text-muted); text-decoration: none; }
.l3s-col-artist { min-width: 0; font-size: 13px; }
.l3s-row-artist-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l3s-row-artist-line a { color: var(--text-secondary); text-decoration: none; transition: color 0.15s ease; }
.l3s-row-artist-line a:hover { color: var(--primary); }
.l3s-row-album-line { font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l3s-row-album-link { color: var(--text-muted); text-decoration: none; }
.l3s-row-album-link:hover { color: var(--text-primary); }
.l3s-row-year { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.l3s-col-action { text-align: right; }
.l3s-row-btn {
    display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 9999px;
    background: rgba(124, 58, 237, 0.1); color: var(--primary); font-size: 12px; font-weight: 700;
    text-decoration: none; transition: all 0.2s ease;
}
.l3s-row-btn:hover { background: var(--primary); color: #ffffff; }

/* Pagination */
.l3s-genre-pagination { margin-top: 28px; display: flex; justify-content: center; }
.l3s-genre-pagination ul { display: flex; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 0; }
.l3s-genre-pagination li a, .l3s-genre-pagination li span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px;
    padding: 0 12px; border-radius: 9999px; background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-primary); font-size: 13px; font-weight: 600; text-decoration: none; transition: all 0.2s ease;
}
.l3s-genre-pagination li a:hover { border-color: var(--primary); color: var(--primary); }
.l3s-genre-pagination li span.current {
    background: var(--primary-gradient, linear-gradient(135deg, #7c3aed, #a855f7));
    color: #ffffff; border-color: transparent; box-shadow: 0 3px 10px rgba(124, 58, 237, 0.3);
}

/* Section Common Headers (Clean Typography & Horizontal Alignment) */
.l3s-genre-section-header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-bottom: 20px;
}
.l3s-genre-block-title {
    font-size: 1.35rem; font-weight: 800; font-family: var(--font-heading);
    color: var(--text-primary); margin: 0; letter-spacing: -0.3px;
}
.l3s-genre-view-all {
    display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700;
    color: var(--primary); text-decoration: none; transition: gap 0.2s ease, opacity 0.15s ease;
}
.l3s-genre-view-all:hover { gap: 7px; opacity: 0.88; }

/* 4. Related Genres Section */
.l3s-genre-related-section { margin-bottom: 38px; }
.l3s-genre-related-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.l3s-genre-related-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 12px;
    border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border-subtle);
    text-decoration: none; text-align: center; transition: all 0.2s ease;
}
.l3s-genre-related-card:hover {
    border-color: rgba(124, 58, 237, 0.35); transform: translateY(-2px); background: var(--bg-card-hover, rgba(255, 255, 255, 0.06));
}
.l3s-related-card-thumb {
    width: 44px; height: 44px; border-radius: 50%; overflow: hidden; margin-bottom: 8px;
    flex-shrink: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); background: var(--bg-subtle);
}
.l3s-related-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.l3s-genre-related-card:hover .l3s-related-card-thumb img { transform: scale(1.1); }
.l3s-related-card-name { font-size: 13.5px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.l3s-genre-related-card:hover .l3s-related-card-name { color: var(--primary); }
.l3s-related-card-count { font-size: 11.5px; color: var(--text-muted); }

/* 5. Responsive Breakpoints */
@media (max-width: 1024px) {
    .l3s-genre-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .l3s-genre-single-hero { padding: 24px 18px; }
    .l3s-genre-single-title { font-size: 1.85rem; }
    .l3s-genre-songs-section { padding: 18px 14px; }
    .l3s-genre-songs-header {
        flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 16px; padding-bottom: 14px;
    }
    .l3s-genre-songs-title-wrap { width: 100%; }
    .l3s-genre-section-badge { display: none !important; }
    .l3s-genre-toolbar { width: 100%; flex-direction: column; align-items: stretch; gap: 10px; }
    .l3s-genre-search-box { width: 100%; }
    .l3s-genre-song-search-input { width: 100%; box-sizing: border-box; }
    .l3s-genre-song-search-input:focus { width: 100%; }
    .l3s-genre-sort-tabs { width: 100%; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .l3s-songs-table-head { display: none; }
    .l3s-genre-song-row { grid-template-columns: 32px 1fr auto; gap: 10px; padding: 10px 6px; }
    .l3s-col-artist, .l3s-col-year { display: none; }
    .l3s-row-mobile-artist { display: block; }
    .l3s-genre-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
