/* Блоки главной (под баннером). Макет: design/home-v2. Всё внутри .hv2, чтобы не задевать стили остального сайта. */

.hv2 {
    --bg-2: #0f0f10;
    --surface: #151517;
    --surface-2: #1c1c1f;
    --surface-3: #242428;
    --border: #232326;
    --border-2: #303035;
    --text: #fff;
    --text-2: #b8b8c0;
    --text-3: #85858f;
    --accent: #ff6b35;
    --c-music: #ff6b35;
    --c-cover: #f472b6;
    --c-voice: #a78bfa;
    --c-minus: #4ade80;
    --c-pay: #38bdf8;
    --c-gold: #facc15;
    --r: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    padding-bottom: 64px;
    color: var(--text);
}
.hv2 a { color: inherit; text-decoration: none; }
.hv2 h2, .hv2 h3 { margin: 0; }

.hv2 .hv-block { padding-top: 40px; }
.hv2 .hv-block:first-child { padding-top: 0; }
@media (min-width: 1024px) { .hv2 .hv-block { padding-top: 56px; } }

/* ---------- Заголовок блока: иконка + название + «Все» ---------- */
.hv2 .bh { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.hv2 .bh-ic {
    width: 40px; height: 40px; flex: none; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 17px;
    background: color-mix(in srgb, var(--ic, var(--accent)) 16%, transparent);
    color: var(--ic, var(--accent));
}
.hv2 .bh-title { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.hv2 .bh-sub { font-size: 14px; color: var(--text-3); margin-top: 2px; }
.hv2 .bh-more {
    margin-left: auto; flex: none;
    font-size: 14px; font-weight: 600; color: var(--text-2);
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border);
    transition: background .15s, color .15s;
}
.hv2 .bh-more:hover { background: var(--surface-2); color: var(--text); }
.hv2 .bh--in { margin: 0; }
.hv2 .bh--in .bh-ic { width: 32px; height: 32px; font-size: 14px; border-radius: 10px; }
.hv2 .bh--in .bh-title { font-size: 18px; }
@media (max-width: 639px) {
    .hv2 .bh-title { font-size: 20px; }
    .hv2 .bh-more span { display: none; }
}

/* ---------- Вкладки ---------- */
.hv2 .seg {
    display: inline-flex; gap: 4px; padding: 4px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.hv2 .seg button {
    border: 0; background: transparent; cursor: pointer;
    padding: 8px 16px; border-radius: 999px;
    font-size: 14px; font-weight: 600; color: var(--text-3);
    transition: background .15s, color .15s;
}
.hv2 .seg button:hover { color: var(--text); }
.hv2 .seg button.on { background: var(--surface-3); color: var(--text); }

/* ---------- Карточка трека (строка) ---------- */
.hv2 .tc {
    display: flex; align-items: center; gap: 12px;
    padding: 8px; border-radius: var(--r);
    transition: background .15s; cursor: pointer;
}
.hv2 .tc:hover, .hv2 .tc:has(.track-cover-wrapper.is-active) { background: var(--surface-2); }
.hv2 .tc-num {
    width: 28px; flex: none; text-align: center;
    font-size: 17px; font-weight: 800; color: var(--text-3);
    font-variant-numeric: tabular-nums;
}
.hv2 .tc-num .fa-medal { font-size: 20px; }
.hv2 .tc-num.p1 { color: #fbbf24; }
.hv2 .tc-num.p2 { color: #cbd5e1; }
.hv2 .tc-num.p3 { color: #d97706; }

.hv2 .tc-cover {
    position: relative; flex: none;
    width: 56px; height: 56px; border-radius: 12px; overflow: hidden;
    background: var(--surface-3);
}
.hv2 .tc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hv2 .tc-play {
    position: absolute; inset: 0; border: 0; cursor: pointer; color: #fff;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .15s; font-size: 16px;
}
.hv2 .tc:hover .tc-play { opacity: 1; }

.hv2 .tc-main { flex: 1; min-width: 0; }
.hv2 .tc-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.hv2 .tc-title a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hv2 .tc-title a:hover,
.hv2 .tc:has(.track-cover-wrapper.is-active) .tc-title a { color: var(--accent); }
.hv2 .tc-meta { margin-top: 3px; font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; min-width: 0; }
.hv2 .tc-meta .by { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; flex: none; }
.hv2 .tc-meta a.by:hover { color: var(--text); }
.hv2 .tc-meta .dot { flex: none; }
.hv2 .tc-meta .style { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* Значок модели — как в библиотеке (includes/track_card.php) */
.hv2 .hv-badge {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .025em;
    padding: 2px 8px; border-radius: 8px;
    color: #ec4899; background: rgba(30,30,40,.8); border: 1px solid rgba(236,72,153,.3);
}

.hv2 .tc-stats {
    flex: none; display: flex; align-items: center; gap: 14px;
    font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums;
}
.hv2 .tc-stats > span, .hv2 .tc-stats .like-btn { display: inline-flex; align-items: center; gap: 5px; }
.hv2 .tc-stats i { font-size: 11px; }
.hv2 .tc-stats .like-btn:hover, .hv2 .tc-stats .like-btn[data-liked="true"] { color: #ec4899; }

.hv2 .tlist { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* ---------- Панель ---------- */
.hv2 .panel { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 8px; }
.hv2 .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 12px; }
.hv2 .grid-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .hv2 .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Узкое окно: «треки/каверы» вкладками, на ПК — рядом */
.hv2 .fresh-seg { margin-bottom: 14px; }
@media (max-width: 1023px) {
    .hv2 #fresh:not([data-tab="covers"]) [data-panel="covers"],
    .hv2 #fresh[data-tab="covers"] [data-panel="tracks"] { display: none; }
}
@media (min-width: 1024px) { .hv2 .fresh-seg { display: none; } }

/* ---------- Топ 20 ---------- */
.hv2 .top-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hv2 .top-head .bh { margin-bottom: 0; }
.hv2 .top-list { display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr); }
.hv2 .top-list[hidden] { display: none; }
@media (min-width: 1024px) {
    .hv2 .top-list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: repeat(10, auto); column-gap: 16px; }
}
.hv2 .top-list .tc-cover { width: 48px; height: 48px; border-radius: 10px; }
.hv2 .top-empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 14px; }
/* ---------- Карусель ---------- */
.hv2 .rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: 116px;
    gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 6px; scrollbar-width: none;
}
.hv2 .rail::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .hv2 .rail { grid-auto-columns: 132px; gap: 14px; } }
@media (min-width: 1024px) { .hv2 .rail { grid-auto-columns: 148px; gap: 16px; } }
.hv2 .tile { scroll-snap-align: start; min-width: 0; }
.hv2 .tile-cover { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r); overflow: hidden; background: var(--surface-3); }
.hv2 .tile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.hv2 .tile:hover .tile-cover img { transform: scale(1.04); }
.hv2 .tile-cover .hv-badge { position: absolute; top: 6px; left: 6px; z-index: 2; font-size: 10px; padding: 2px 6px; }
.hv2 .tile-play { position: absolute; inset: 0; border: 0; cursor: pointer; background: transparent; }
.hv2 .tile-play-ic {
    position: absolute; right: 8px; bottom: 8px;
    width: 34px; height: 34px; border-radius: 999px;
    background: #fff; color: #0a0a0a; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,.45);
    opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
}
.hv2 .tile-play-ic i { margin-left: 2px; }
.hv2 .tile:hover .tile-play-ic { opacity: 1; transform: none; }
.hv2 .tile-title { margin-top: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv2 .tile-title a:hover,
.hv2 .tile:has(.track-cover-wrapper.is-active) .tile-title a { color: var(--accent); }
.hv2 .tile-by { margin-top: 2px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv2 .tile-by a:hover { color: var(--text); }

.hv2 .arrows { display: flex; gap: 8px; margin-left: auto; }
.hv2 .arrows + .bh-more { margin-left: 0; }
.hv2 .arr {
    width: 38px; height: 38px; border-radius: 999px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
    display: flex; align-items: center; justify-content: center;
}
.hv2 .arr:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 639px) { .hv2 .arrows { display: none; } }

/* ---------- Лента ---------- */
.hv2 .feed {
    position: relative; overflow: hidden; display: grid; gap: 20px; align-items: center;
    border-radius: var(--r-xl); border: 1px solid var(--border); padding: 22px;
    background: radial-gradient(120% 140% at 0% 0%, rgba(255,107,53,.18), transparent 55%),
                radial-gradient(120% 140% at 100% 100%, rgba(139,92,246,.22), transparent 55%),
                var(--surface);
}
@media (min-width: 768px) { .hv2 .feed { grid-template-columns: 1fr auto; padding: 28px 32px; } }
.hv2 .feed h3 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.hv2 .feed p { margin: 6px 0 0; color: var(--text-2); font-size: 15px; }
.hv2 .feed-row { display: flex; align-items: center; gap: 18px; }
.hv2 .feed-stack { display: flex; align-items: center; }
.hv2 .feed-stack img {
    width: 56px; height: 56px; border-radius: 14px; object-fit: cover;
    border: 3px solid var(--surface); margin-left: -14px;
    box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.hv2 .feed-stack img:first-child { margin-left: 0; }
.hv2 .feed-play {
    width: 56px; height: 56px; flex: none; border-radius: 999px;
    background: #fff; color: #0a0a0a; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.4); transition: transform .2s;
}
.hv2 .feed-play i { margin-left: 3px; }
.hv2 .feed:hover .feed-play { transform: scale(1.07); }
@media (max-width: 767px) { .hv2 .feed-row { justify-content: space-between; } }

/* ---------- Кнопки ---------- */
.hv2 .hv-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 20px; border-radius: 999px; cursor: pointer;
    font-size: 15px; font-weight: 600; white-space: nowrap;
    background: var(--surface-3); color: var(--text); border: 1px solid var(--border-2);
    transition: background .15s;
}
.hv2 .hv-btn:hover { background: #2c2c31; }

/* ---------- Карточки возможностей ---------- */
.hv2 .feat-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .hv2 .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hv2 .feat {
    position: relative; overflow: hidden;
    border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface);
    padding: 22px; display: flex; flex-direction: column; gap: 14px;
    transition: border-color .2s, transform .2s;
}
.hv2 .feat:hover { border-color: color-mix(in srgb, var(--ic) 45%, var(--border)); transform: translateY(-2px); }
.hv2 .feat::before {
    content: ""; position: absolute; top: 0; right: 0; width: 220px; height: 220px;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--ic) 22%, transparent), transparent);
    transform: translate(35%, -35%); pointer-events: none;
}
.hv2 .feat-top { display: flex; align-items: center; gap: 12px; }
.hv2 .feat-tag {
    font-size: 12px; font-weight: 700; letter-spacing: .02em;
    color: var(--ic); background: color-mix(in srgb, var(--ic) 14%, transparent);
    padding: 4px 10px; border-radius: 999px;
}
.hv2 .feat h3 { font-size: 20px; font-weight: 700; line-height: 1.25; }
.hv2 .feat p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.hv2 .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hv2 .chip {
    font-size: 13px; color: var(--text-2); padding: 6px 11px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border);
    display: inline-flex; align-items: center; gap: 6px;
}
.hv2 .chip i { color: var(--ic); font-size: 12px; }
.hv2 .link-more {
    align-self: flex-start; margin-top: auto;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; color: var(--ic);
}
.hv2 .link-more i { font-size: 13px; transition: transform .2s; }
.hv2 .feat:hover .link-more i { transform: translateX(4px); }
.hv2 .checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.hv2 .checks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 15px; }
.hv2 .checks li i { color: var(--ic); margin-top: 4px; font-size: 13px; }

/* ---------- Приложение ---------- */
.hv2 .app {
    border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface);
    display: grid; gap: 20px; padding: 22px; align-items: center;
}
@media (min-width: 768px) { .hv2 .app { grid-template-columns: auto 1fr auto; padding: 26px 30px; } }
.hv2 .app-ic {
    width: 64px; height: 64px; border-radius: 18px;
    background: rgba(61,220,132,.14); color: #3ddc84;
    display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.hv2 .app h3 { font-size: 20px; font-weight: 700; }
.hv2 .app p { margin: 6px 0 0; color: var(--text-2); font-size: 15px; }