@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    color-scheme: light;
    --ink: #171d19;
    --muted: #747c76;
    --paper: #f7f8f4;
    --green: #b6ed5c;
    --line: #e3e7df;
    --dark: #101512;
    font-family: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.topbar { height: 78px; padding: 0 max(5.5vw, 24px); display: flex; align-items: center; justify-content: space-between; background: var(--dark); color: white; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 700 21px 'Space Grotesk', sans-serif; letter-spacing: -.8px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--green); color: var(--dark); font-size: 21px; }
.brand-light { color: #aeb7af; font-weight: 400; }
.top-nav { display: flex; gap: 34px; align-items: center; font-size: 13px; color: #d2d8d2; }
.top-nav > a:hover { color: var(--green); }
.button { display: inline-flex; min-height: 46px; justify-content: center; align-items: center; gap: 14px; border: 0; border-radius: 8px; padding: 0 20px; font-size: 13px; font-weight: 700; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #13200c; background: var(--green); }
.button-primary:hover { background: #c4fa6a; }
.button-outline { color: white; background: transparent; border: 1px solid #4c554e; min-height: 39px; padding: 0 16px; }
.button-outline:hover { border-color: var(--green); }
.button-small { min-height: 37px; padding: 0 14px; font-size: 12px; }

.hero { min-height: 460px; padding: 76px max(10vw, 28px) 54px; position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; color: white; background: var(--dark); overflow: hidden; }
.hero-copy { z-index: 1; max-width: 490px; }
.eyebrow { margin: 0 0 15px; color: #68736b; text-transform: uppercase; letter-spacing: 1.7px; font-size: 10px; font-weight: 700; }
.hero .eyebrow { color: #b2beb4; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px #b6ed5c88; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }
h1 { margin-bottom: 16px; font-size: clamp(46px, 5.4vw, 73px); line-height: .99; letter-spacing: -4px; }
h1 span { color: var(--green); }
.hero-description { max-width: 440px; margin-bottom: 25px; color: #a5aea7; font-size: 14px; line-height: 1.75; }
.hero-art { position: relative; height: 310px; display: grid; place-items: center; }
.record { position: absolute; width: 276px; height: 276px; border: 1px solid #61696066; border-radius: 50%; background: repeating-radial-gradient(circle, #1d241f 0, #1d241f 2px, #111713 3px, #111713 5px); box-shadow: 0 15px 60px #0007; animation: rotate 22s linear infinite; }
.record-back { width: 295px; height: 295px; background: repeating-radial-gradient(circle, #29332a 0, #29332a 2px, #161c17 3px, #161c17 5px); transform: translate(32px, -6px); }
.record::after { content: ''; position: absolute; inset: 48%; border-radius: 50%; background: #101512; border: 1px solid #747a70; }
.record-label { position: absolute; z-index: 1; inset: 36%; border-radius: 50%; display: grid; place-items: center; color: #15200d; background: var(--green); font: 700 21px 'Space Grotesk', sans-serif; }
.record-label span { position: absolute; margin: 25px 0 0 30px; font-size: 16px; }
.art-caption { position: absolute; right: 2%; bottom: 3px; display: flex; align-items: center; gap: 15px; color: #78827a; font-size: 9px; letter-spacing: 1.3px; }
.art-bars { color: var(--green); font-size: 19px; letter-spacing: -5px; }
.hero-note { position: absolute; bottom: 24px; left: max(10vw, 28px); color: #69736c; font-size: 10px; letter-spacing: .3px; }
@keyframes rotate { to { rotate: 360deg; } }

.section-wrap { padding: 78px max(10vw, 28px); }
.library { min-height: 500px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 25px; }
.section-heading .eyebrow { margin-bottom: 9px; }
h2 { margin-bottom: 0; font-size: 35px; line-height: 1.1; letter-spacing: -1.6px; }
.track-count { color: var(--muted); font-size: 12px; padding-bottom: 5px; }
.library-tools { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.search-box { width: min(410px, 60%); display: flex; align-items: center; gap: 10px; color: #7a837b; }
.search-box > span { font-size: 24px; line-height: 1; }
.search-box input, .sort-select select { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.sort-select { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.sort-select select { cursor: pointer; font-weight: 600; }
.track-list { display: grid; }
.track-row { min-height: 104px; display: grid; grid-template-columns: 52px minmax(150px, 1fr) minmax(160px, 260px) minmax(100px, 150px) auto; align-items: center; gap: 17px; border-bottom: 1px solid var(--line); }
.track-art { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 7px; color: var(--green); background: var(--dark); font-size: 24px; }
.track-info { min-width: 0; }
.track-info h3 { overflow: hidden; margin: 0 0 4px; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; letter-spacing: -.2px; }
.track-info p { overflow: hidden; margin: 0; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.track-info .track-license { margin-top: 5px; color: #929990; font-size: 10px; }
.track-row audio { width: 100%; height: 38px; }
.track-stats { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 10px; }
.license-link { width: fit-content; color: #527f28; font-size: 10px; font-weight: 600; }
.track-actions { display: flex; gap: 8px; align-items: center; }
.icon-button { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; color: #556054; background: transparent; font-size: 20px; line-height: 1; }
.icon-button:hover, .icon-button.is-favorite { color: #a43735; border-color: #e7caca; background: #fff6f4; }
.add-to-playlist { max-width: 120px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 5px; color: #566054; background: transparent; font-size: 10px; }
.empty-state { padding: 68px 20px; text-align: center; }
.empty-icon { color: #a5bd89; font-size: 34px; }
.empty-state h3 { margin: 12px 0 7px; font-size: 19px; }
.empty-state p, .muted { color: var(--muted); font-size: 12px; line-height: 1.65; }

.account-area { padding-top: 24px; border-top: 1px solid var(--line); }
.account-tabs, .auth-tabs { display: flex; gap: 21px; border-bottom: 1px solid var(--line); }
.tab-button { padding: 13px 0; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 12px; }
.tab-button.active { border-bottom-color: #86b837; color: var(--ink); font-weight: 700; }
.account-panel { padding-top: 16px; }
.account-panel .track-row { grid-template-columns: 52px minmax(150px, 1fr) minmax(160px, 260px) auto; }
.account-panel .track-stats { display: none; }
.account-panel .empty-message { padding: 26px 0; }
.inline-form { display: flex; gap: 9px; margin: 4px 0 22px; }
.inline-form input, .submission-form input, .submission-form select, .auth-form input { min-height: 42px; border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; outline-color: #8fbd49; color: var(--ink); background: white; font-size: 12px; }
.inline-form input { width: min(340px, 100%); }
.playlist-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
.playlist-card { padding: 17px 18px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.playlist-heading { display: flex; align-items: center; gap: 12px; }
.playlist-heading h3 { margin: 0 auto 0 0; font-size: 15px; }
.playlist-songs { padding-top: 6px; }
.playlist-songs li { display: flex; justify-content: space-between; gap: 9px; align-items: center; padding: 9px 0; border-top: 1px solid #eef0ec; color: #59625b; font-size: 11px; }
.text-button { padding: 4px 0; border: 0; color: #527f28; background: transparent; white-space: nowrap; font-size: 10px; }
.danger-button { color: #a24a43; }
.license-notice { max-width: 720px; margin: 4px 0 23px; padding: 15px 17px; border-left: 3px solid #9fc653; background: #eef4e6; font-size: 12px; line-height: 1.6; }
.license-notice p { margin: 5px 0 0; color: #5f6b5b; }
.submission-form { max-width: 650px; display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.submission-form label, .auth-form label { display: grid; gap: 6px; color: #626b63; font-size: 11px; }
.submission-form label:nth-child(4), .submission-form label:nth-child(6), .submission-form label:nth-child(7), .submission-form .consent-field, .submission-form > button { grid-column: 1 / -1; }
.submission-form .consent-field { display: flex; align-items: center; gap: 9px; line-height: 1.5; }
.consent-field input { width: 16px; height: 16px; min-height: 0; accent-color: #6d9d32; }
.submission-form > button { justify-self: start; }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 27px max(5.5vw, 24px); color: #aeb7af; background: var(--dark); }
.footer-brand { color: white; font-size: 17px; }
.footer-brand .brand-mark { width: 26px; height: 26px; font-size: 17px; }
.footer p { max-width: 440px; margin: 0; text-align: right; font-size: 10px; line-height: 1.6; }
.auth-dialog { width: min(430px, calc(100vw - 28px)); padding: 34px; border: 0; border-radius: 12px; color: var(--ink); box-shadow: 0 25px 90px #0004; }
.auth-dialog::backdrop { background: #07100bb3; backdrop-filter: blur(3px); }
.dialog-close-form { position: absolute; top: 12px; right: 14px; }
.dialog-close { border: 0; color: #657067; background: transparent; font-size: 25px; }
.auth-dialog h2 { margin-bottom: 19px; font-size: 30px; }
.auth-tabs { gap: 20px; }
.auth-form { display: grid; gap: 15px; padding: 20px 0 8px; }
.auth-form .button { width: 100%; }
.dialog-footnote { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.form-error { min-height: 0; margin: -5px 0; color: #a33131; font-size: 11px; }
.toast { position: fixed; z-index: 5; right: 22px; bottom: 20px; max-width: min(400px, calc(100vw - 44px)); padding: 13px 17px; border: 1px solid #3b473c; border-radius: 7px; color: white; background: #19221b; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; font-size: 12px; }
.toast.visible { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 820px) {
    .hero { padding-right: 7vw; padding-left: 7vw; }
    .hero-art { transform: scale(.82); }
    .section-wrap { padding-right: 7vw; padding-left: 7vw; }
    .track-row { grid-template-columns: 45px minmax(100px, 1fr) minmax(140px, 220px) auto; gap: 11px; }
    .track-stats { display: none; }
}
@media (max-width: 600px) {
    .topbar { height: 66px; padding: 0 20px; }
    .top-nav { gap: 15px; font-size: 11px; }
    .top-nav > a { display: none; }
    .hero { min-height: 630px; padding: 59px 25px 55px; grid-template-columns: 1fr; align-content: start; }
    .hero-copy { max-width: 100%; }
    h1 { font-size: 58px; }
    .hero-art { height: 270px; margin-top: 8px; transform: scale(.8); }
    .hero-note { left: 25px; right: 25px; font-size: 9px; }
    .section-wrap { padding: 58px 22px; }
    .section-heading { align-items: end; }
    h2 { font-size: 30px; }
    .library-tools { align-items: flex-start; flex-direction: column; }
    .search-box { width: 100%; }
    .track-row, .account-panel .track-row { grid-template-columns: 42px 1fr auto; gap: 10px; padding: 13px 0; }
    .track-art { width: 40px; height: 40px; }
    .track-info h3 { font-size: 12px; }
    .track-info p { font-size: 10px; }
    .track-info .track-license { white-space: normal; }
    .track-row audio { grid-column: 2 / -1; grid-row: 2; max-width: 100%; }
    .track-stats { display: none; }
    .track-actions { grid-column: 3; grid-row: 1; }
    .add-to-playlist { width: 34px; color: transparent; }
    .account-area { padding-top: 22px; }
    .account-tabs { gap: 14px; }
    .tab-button { font-size: 11px; }
    .submission-form { grid-template-columns: 1fr; }
    .submission-form label { grid-column: 1 / -1; }
    .inline-form { align-items: stretch; flex-direction: column; }
    .inline-form input { width: 100%; }
    .footer { align-items: flex-start; flex-direction: column; }
    .footer p { text-align: left; }
}

.genre-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 10px; }
.genre-chip { min-height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: #4d574f; background: white; font-size: 12px; }
.genre-chip small { margin-left: 5px; color: #929990; font-size: 10px; }
.genre-chip:hover { border-color: #8fbd49; }
.genre-chip.active { border-color: var(--dark); color: white; background: var(--dark); }
.genre-chip.active small { color: #b6ed5c; }
.track-genre { width: fit-content; padding: 2px 8px; border-radius: 999px; color: #46661f; background: #eaf3dc; font-size: 10px; font-weight: 600; }
.load-more-wrap { display: flex; justify-content: center; padding: 26px 0 0; }
.button-outline-dark { border: 1px solid #b9c1b6; color: var(--ink); background: transparent; }
.button-outline-dark:hover { border-color: #6d9d32; }
