:root {
    color-scheme: dark;
    --bg: #080b12;
    --surface: #10151f;
    --surface-2: #171d29;
    --text: #f5f7fb;
    --muted: #929aa9;
    --cyan: #6ee7f2;
    --cyan-strong: #25c7d8;
    --border: rgba(255, 255, 255, .09);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

.catalog-page { overflow-x: hidden; background: radial-gradient(circle at 75% 5%, #102332 0, transparent 30%), #080b12; }
.ambient { position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; opacity: .18; }
.ambient-one { width: 34rem; height: 34rem; background: #1bb9ca; right: -17rem; top: -18rem; }
.ambient-two { width: 24rem; height: 24rem; background: #2e58d6; left: -18rem; top: 40%; }
.catalog-header { height: 5.5rem; max-width: 1440px; margin: auto; padding: 0 4vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: .7rem; letter-spacing: .08em; }
.brand > span:last-child { display: grid; line-height: 1; }
.brand strong { font-size: 1.05rem; }
.brand small { color: var(--cyan); font-size: .55rem; margin-top: .28rem; letter-spacing: .28em; }
.brand-mark { display: flex; align-items: end; gap: 3px; height: 24px; }
.brand-mark i { display: block; width: 4px; border-radius: 4px; background: var(--cyan); box-shadow: 0 0 14px #61e8f4; }
.brand-mark i:nth-child(1) { height: 12px; }
.brand-mark i:nth-child(2) { height: 23px; }
.brand-mark i:nth-child(3) { height: 17px; }
.catalog-actions { display: flex; align-items: center; gap: 1.2rem; }
.converter-link { height: 2.3rem; padding: 0 .8rem; display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--border); border-radius: 999px; color: #b8c0cb; font-size: .68rem; font-weight: 650; letter-spacing: .04em; transition: color .2s, border-color .2s, background .2s; }
.converter-link svg { width: .95rem; }
.converter-link:hover { color: var(--cyan); border-color: rgba(110,231,242,.35); background: rgba(110,231,242,.055); }
.song-count { color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.catalog-main { max-width: 1440px; margin: auto; padding: 0 4vw 5rem; }
.hero { padding: clamp(4rem, 9vw, 8rem) 0 clamp(4rem, 7vw, 6rem); }
.eyebrow { color: var(--cyan); letter-spacing: .28em; font-weight: 700; font-size: .7rem; margin: 0 0 1.5rem; }
.hero h1 { margin: 0; font-size: clamp(3.5rem, 7.4vw, 7.5rem); line-height: .91; letter-spacing: -.065em; max-width: 900px; }
.hero h1 em { color: transparent; font-style: normal; -webkit-text-stroke: 1.5px rgba(255,255,255,.38); }
.hero-copy { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.25rem); margin: 2rem 0 0; }
.library-head { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-bottom: 2rem; }
.library-head h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.03em; }
.search-box { width: min(100%, 350px); height: 3rem; display: flex; align-items: center; gap: .75rem; padding: 0 .8rem 0 1rem; background: rgba(255,255,255,.045); border: 1px solid var(--border); border-radius: 999px; transition: border .2s, background .2s; }
.search-box:focus-within { border-color: rgba(110,231,242,.5); background: rgba(255,255,255,.07); }
.search-box svg { width: 1.1rem; color: var(--muted); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-box input::placeholder { color: #757e8d; }
.search-box kbd { color: #697180; border: 1px solid var(--border); border-radius: 5px; padding: .16rem .36rem; font-size: .68rem; }
.song-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: clamp(1.3rem, 2.2vw, 2rem); }
.song-card { min-width: 0; animation: card-in .55s both; animation-delay: var(--delay); }
.cover-wrap { position: relative; display: block; overflow: hidden; aspect-ratio: 1; border-radius: 14px; background: linear-gradient(145deg, #1b2534, #0f131c); box-shadow: 0 15px 45px rgba(0,0,0,.28); }
.cover-wrap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.72)); opacity: .8; }
.cover-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease, filter .5s ease; }
.cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 6rem; font-weight: 800; color: rgba(255,255,255,.22); background: radial-gradient(circle at 30% 20%, #2d7682, transparent 40%), linear-gradient(145deg, #172d3c, #111521); }
.song-card:hover .cover-wrap img { transform: scale(1.035); filter: brightness(.75); }
.card-play { position: absolute; z-index: 2; inset: 50% auto auto 50%; translate: -50% -40%; width: 3.7rem; height: 3.7rem; display: grid; place-items: center; border-radius: 50%; background: var(--cyan); color: #071015; opacity: 0; transition: opacity .25s, translate .25s; box-shadow: 0 8px 30px rgba(42,210,225,.35); }
.card-play svg { fill: currentColor; stroke: none; width: 1.4rem; margin-left: .2rem; }
.song-card:hover .card-play { opacity: 1; translate: -50% -50%; }
.duration { position: absolute; z-index: 2; right: .8rem; bottom: .7rem; padding: .3rem .55rem; border-radius: 5px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); font-size: .7rem; letter-spacing: .04em; }
.song-card-body { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem .15rem 0; }
.song-card-body > div { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.song-card h3 { min-width: 0; max-width: 100%; margin: 0 0 .35rem; overflow: hidden; font-size: 1.04rem; }
.song-card h3 a { max-width: 100%; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.song-card p { max-width: 100%; margin: 0; overflow: hidden; color: var(--muted); font-size: .85rem; white-space: nowrap; text-overflow: ellipsis; }
.open-song { flex: 0 0 auto; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); transition: color .2s, border .2s, translate .2s; }
.open-song svg { width: 1rem; }
.open-song:hover { color: var(--cyan); border-color: var(--cyan); translate: 3px 0; }
.empty-state { min-height: 280px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed var(--border); border-radius: 16px; color: var(--muted); }
.empty-state h3 { margin: .75rem 0 .4rem; color: var(--text); }
.empty-state p { margin: 0; }
.empty-icon { font-size: 2.6rem; color: var(--cyan); }
.seo-intro { max-width: 920px; margin-top: clamp(4rem, 8vw, 7rem); padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, rgba(20,31,43,.72), rgba(10,15,23,.5)); }
.seo-intro .eyebrow { margin-bottom: 1rem; }
.seo-intro h2 { max-width: 760px; margin: 0 0 1.25rem; font-size: clamp(1.8rem, 4vw, 3.3rem); line-height: 1.05; letter-spacing: -.045em; }
.seo-intro p:not(.eyebrow) { max-width: 780px; margin: .75rem 0 0; color: var(--muted); font-size: .95rem; line-height: 1.75; }
.is-hidden, .song-card.is-hidden { display: none; }
.catalog-footer { max-width: 1440px; margin: auto; padding: 2rem 4vw; border-top: 1px solid var(--border); display: flex; justify-content: space-between; color: #626b79; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }
.error-page { display: grid; place-items: center; padding: 2rem; background: radial-gradient(circle at 50% 30%, #15313c, transparent 45%), #080b12; }
.error-card { max-width: 600px; text-align: center; }
.error-code { display: block; color: var(--cyan); font-size: .75rem; letter-spacing: .25em; }
.error-card h1 { font-size: clamp(2.5rem, 7vw, 5rem); letter-spacing: -.06em; margin: .8rem 0 1rem; }
.error-card p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.error-actions { display: flex; justify-content: center; gap: .8rem; margin-top: 2rem; }
.primary-button, .secondary-button { border-radius: 999px; padding: .85rem 1.2rem; border: 1px solid var(--border); cursor: pointer; }
.primary-button { color: #071015; background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
.secondary-button { background: transparent; }
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 650px) {
    .catalog-actions { gap: .6rem; }
    .converter-link { width: 2.3rem; padding: 0; justify-content: center; font-size: 0; }
    .catalog-header, .catalog-main { padding-left: 1.25rem; padding-right: 1.25rem; }
    .catalog-header { height: 4.6rem; }
    .hero { padding-top: 3.5rem; }
    .hero h1 { font-size: clamp(3rem, 15vw, 4.8rem); }
    .library-head { align-items: stretch; flex-direction: column; gap: 1rem; }
    .search-box { width: 100%; }
    .search-box kbd { display: none; }
    .song-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    .song-card h3 { font-size: .92rem; }
    .song-card p { font-size: .76rem; }
    .open-song { display: none; }
    .catalog-footer { padding: 1.5rem 1.25rem; }
    .catalog-footer span:last-child { display: none; }
}
@media (max-width: 380px) { .song-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
