*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #05040a;
    color: #f5f5f7;
    line-height: 1.5;
}

/* Общие контейнеры */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px; /* немного больше боковых отступов для современного вида */
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #020617;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    justify-content: space-between; /* логично распределяем элементы по краям */
}

/* Logo */

.logo a {
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
}

/* Добавочные отступы для логотипа, чтобы не прилипал к краю */
.logo {
    padding-inline-start: 6px;
    padding-inline-end: 6px;
}

.logo span {
    color: #4ade80;
}

.logo-tagline {
    font-size: 11px;
    opacity: 0.7;
}

/* Навигация */

.main-nav {
    display: flex;
    gap: 16px;
    flex: 1;
    justify-content: center; /* центрируем навигацию между логотипом и действиями */
}

.nav-link {
    font-size: 14px;
    text-decoration: none;
    color: #e5e7eb;
    padding: 4px 8px;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    background: rgba(148, 163, 184, 0.16);
}

.nav-link.active {
    background: #4ade80;
    color: #020617;
}

/* Поиск в шапке */

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.9);
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    margin-left: auto; /* сдвигаем в правую часть шапки */
}

.header-search input {
    background: transparent;
    border: none;
    color: #f9fafb;
    font-size: 13px;
    min-width: 0;
}

.header-search input::placeholder {
    color: #9ca3af;
}

.header-search button {
    border: none;
    background: #4ade80;
    color: #022c22;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}

/* Бургер */

.burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    border: none;
    background: none;
    cursor: pointer;
}

.burger span {
    width: 20px;
    height: 2px;
    background: #e5e7eb;
}

/* Hero */

.site-main {
    padding-bottom: 40px;
}

.hero {
    background: radial-gradient(circle at top left, #4ade80 0, transparent 45%),
                radial-gradient(circle at top right, #38bdf8 0, transparent 50%),
                #020617;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0 20px;
}

.hero-text h1 {
    font-size: 24px;
    margin-bottom: 6px;
}

/* Отступы внутри hero для выравнивания с контейнером */
.hero-text {
    padding-inline-start: 6px;
    padding-inline-end: 6px;
}

.hero-text p {
    font-size: 14px;
    color: #e5e7eb;
    max-width: 520px;
}

/* Hero badge */

.hero-badge {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    text-align: right;
    min-width: 140px;
}

/* Немного смещаем бейдж в hero, чтобы он не прилипал к краю */
.hero-badge {
    margin-inline-start: 6px;
    margin-inline-end: 6px;
}

.hero-counter-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

.hero-counter {
    font-size: 24px;
    font-weight: 700;
}

/* Раздел с треками */

.tracks-section {
    padding: 20px 0 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-header h2 {
    font-size: 18px;
}

.section-link {
    font-size: 13px;
    text-decoration: none;
    color: #38bdf8;
}

/* Список треков */

.track-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.track-card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(51, 65, 85, 0.8);
}

/* Контент карточки */

.track-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track-title {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #e5e7eb;
}

.track-title:hover {
    color: #93c5fd;
}

.track-artist {
    font-size: 13px;
    color: #9ca3af;
}

.track-actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Кнопки */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, border-color 0.1s ease;
}

.btn.primary {
    background: #4ade80;
    color: #022c22;
    font-weight: 600;
}

.btn.primary:hover {
    box-shadow: 0 6px 14px rgba(74, 222, 128, 0.35);
    transform: translateY(-1px);
}

.btn.ghost {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.6);
    color: #e5e7eb;
}

.btn.ghost:hover {
    background: rgba(15, 23, 42, 0.9);
}

.btn.big {
    padding: 10px 18px;
    font-size: 14px;
}

/* Страница трека */

.track-page {
    padding: 22px 0 0;
}

.track-detail-grid {
    display: block;
}

.track-detail-info h1 {
    font-size: 22px;
    margin-bottom: 6px;
}

.track-breadcrumbs {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.track-breadcrumbs a {
    color: #9ca3af;
    text-decoration: none;
}

.track-breadcrumbs a:hover {
    text-decoration: underline;
}

.track-detail-meta {
    font-size: 13px;
    color: #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.track-detail-actions {
    margin-bottom: 16px;
}

.track-detail-note {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

.track-detail-description h2,
.track-detail-lyrics h2 {
    font-size: 16px;
    margin-bottom: 4px;
    margin-top: 10px;
}

.track-detail-description p {
    font-size: 14px;
    color: #e5e7eb;
}

.track-detail-lyrics pre {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 12px;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    white-space: pre-wrap;
}

.track-detail-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 11px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 999px;
    padding: 3px 8px;
    border: 1px solid rgba(148, 163, 184, 0.6);
}

/* Служебные блоки */

.loading,
.error,
.empty {
    font-size: 14px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.5);
}

/* Footer */

.site-footer {
    margin-top: 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    background: #020617;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
    padding: 18px 0 12px;
    padding-inline-start: 24px; /* выравнивание с контейнером */
    padding-inline-end: 24px;
    font-size: 13px;
}

.footer-logo a {
    font-size: 20px;
}

.footer-text {
    margin-top: 8px;
    color: #9ca3af;
}

.footer-col h4 {
    font-size: 13px;
    margin-bottom: 6px;
}

.footer-links {
    list-style: none;
}

.footer-links li + li {
    margin-top: 3px;
}

.footer-links a {
    text-decoration: none;
    color: #e5e7eb;
    font-size: 13px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 12px;
    color: #9ca3af;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    padding-inline-start: 24px;
    padding-inline-end: 24px;
}

/* Делаем небольшие отступы для всех колонок футера на мобильных */
@media (max-width: 900px) {
    .footer-inner {
        padding-inline-start: 16px;
        padding-inline-end: 16px;
    }
    .footer-bottom .container {
        padding-inline-start: 16px;
        padding-inline-end: 16px;
    }
}

/* Адаптив */

@media (max-width: 900px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 60px; /* под шапкой — немного ниже, чтобы не перекрываться */
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        padding: 10px 24px 12px; /* совпадает с контейнером по бокам */
        flex-direction: column;
        gap: 8px;
    }

    .main-nav.open {
        display: flex;
    }

    .burger {
        display: none;
        flex-direction: column;
        gap: 5px;
        border: none;
        background: none;
        cursor: pointer;
        align-self: center;
    }
    .burger span {
        width: 22px;
        height: 3px;
        background: #e5e7eb;
        border-radius: 2px;
    }
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 4px;
    }
}
