@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: 76px; display: grid; grid-template-columns: 44px minmax(150px, 1fr) minmax(90px, 150px) auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding: 8px 10px; border-radius: 8px; transition: background .15s ease; }
.track-row:hover { background: #f2f5ed; }
.track-row.is-playing { background: #ebf5df; border-left: 4px solid #7cb52b; padding-left: 12px; }
.track-play-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: white; color: #171d19; font-size: 13px; font-weight: bold; display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .15s, color .15s; flex-shrink: 0; }
.track-play-btn:hover { background: var(--green); border-color: #8fbd49; transform: scale(1.08); }
.track-row.is-playing .track-play-btn { background: var(--green); border-color: #7cb52b; color: var(--dark); box-shadow: 0 0 10px rgba(182, 237, 92, 0.45); }
.track-art { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 7px; color: var(--green); background: var(--dark); font-size: 20px; }
.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-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: 44px minmax(150px, 1fr) 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: 38px 1fr auto; gap: 10px; padding: 10px 4px; }
    .track-play-btn { width: 36px; height: 36px; font-size: 11px; }
    .track-art { width: 36px; height: 36px; }
    .track-info h3 { font-size: 12px; }
    .track-info p { font-size: 10px; }
    .track-info .track-license { white-space: normal; }
    .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; }

.repeat-button { font-size: 14px; }
.repeat-button.is-active { color: #13200c; background: var(--green); border-color: #8fbd49; box-shadow: 0 0 8px rgba(182, 237, 92, 0.4); }
.playlist-repeat-button { transition: background .15s, border-color .15s, color .15s; }
.playlist-repeat-button.is-active { background: var(--green); color: #13200c; border-color: #8fbd49; font-weight: 700; }
.playlist-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.moje-header { background: var(--dark); color: white; }
.moje-header .eyebrow { color: #b2beb4; }
.moje-header h1 { margin-bottom: 12px; font-size: clamp(36px, 4.8vw, 62px); line-height: 1.05; letter-spacing: -2.5px; }
.moje-header .hero-description { max-width: 620px; margin-bottom: 0; color: #a5aea7; }
.logged-out-card { text-align: center; padding: 68px 24px; max-width: 560px; margin: 48px auto; background: white; border: 1px solid var(--line); border-radius: 12px; }
.logged-out-card .empty-icon { font-size: 38px; color: #a5bd89; }
.logged-out-card h2 { font-size: 24px; margin: 14px 0 8px; letter-spacing: -1px; }
.logged-out-card p { color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 24px; }
.tab-badge { display: inline-block; padding: 1px 7px; margin-left: 5px; border-radius: 999px; font-size: 10px; background: var(--line); color: var(--ink); font-weight: 700; }
.tab-button.active .tab-badge { background: var(--green); color: #13200c; }
.user-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #d2d8d2; padding: 4px 10px; border-radius: 999px; background: #1c241e; border: 1px solid #333d34; }

/* Top persistent audio player */
.player-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, #131a15 0%, #0d120f 100%);
    border-bottom: 1px solid #243026;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}
.player-progress-area {
    position: relative;
    height: 5px;
    background: #1d261f;
    cursor: pointer;
    transition: height .15s ease;
}
.player-progress-area:hover {
    height: 9px;
}
.player-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, #8dc83e 0%, #b6ed5c 100%);
    pointer-events: none;
    transition: width 0.08s linear;
}
.player-progress {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    z-index: 2;
}
.player-inner {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(320px, 2fr) minmax(160px, 1fr);
    align-items: center;
    gap: 18px;
    padding: 10px max(5.5vw, 24px);
    color: white;
}
.player-track {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.player-art {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #1c2620;
    border: 1px solid #2b382d;
    color: var(--green);
    display: grid;
    place-items: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform .2s, box-shadow .2s;
}
.player-bar.is-playing .player-art {
    box-shadow: 0 0 14px rgba(182, 237, 92, 0.35);
    animation: pulseArt 2.2s infinite ease-in-out;
}
@keyframes pulseArt {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
.player-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.player-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.player-title {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f3f5f3;
}
.player-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #8c978e;
    min-width: 0;
}
.player-artist {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-dot {
    color: #556257;
}
.player-fav {
    width: 32px;
    height: 32px;
    font-size: 16px;
    color: #929e94;
    border-color: #2f3c31;
    background: transparent;
    flex-shrink: 0;
}
.player-fav:hover, .player-fav.is-favorite {
    color: #ff5e6c;
    border-color: #ff5e6c66;
    background: #2b1d20;
}

/* Center controls */
.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.player-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.player-btn {
    border: 0;
    background: transparent;
    color: #cdd5ce;
    display: grid;
    place-items: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background .15s, color .15s, transform .12s;
    user-select: none;
}
.player-btn:hover {
    color: white;
    background: #202b23;
}
.player-btn:active {
    transform: scale(0.92);
}
.player-btn-main {
    width: 44px;
    height: 44px;
    background: var(--green);
    color: #0e1510;
    font-size: 17px;
    box-shadow: 0 4px 14px rgba(182, 237, 92, 0.35);
}
.player-btn-main:hover {
    background: #c3fa68;
    color: #0b110c;
    transform: scale(1.06);
}
.player-btn-nav {
    width: 36px;
    height: 36px;
    font-size: 17px;
}
.player-btn-sub {
    width: 32px;
    height: 32px;
    font-size: 14px;
    color: #7b867d;
}
.player-btn-sub.is-active {
    color: var(--green);
    background: #1b261e;
    box-shadow: inset 0 0 0 1px #8fbd4966;
}

.player-time-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #7c887e;
    font-variant-numeric: tabular-nums;
}
.player-time-sep {
    color: #49544b;
}
.player-queue-badge {
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #1d2720;
    border: 1px solid #2f3d32;
    color: #9cb584;
    font-size: 10px;
    font-weight: 600;
}

/* Volume controls */
.player-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
}
.player-vol-btn {
    border: 0;
    background: transparent;
    color: #8c978e;
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
    display: grid;
    place-items: center;
}
.player-vol-btn:hover {
    color: white;
}
.player-vol-slider {
    width: 90px;
    height: 5px;
    accent-color: var(--green);
    cursor: pointer;
    background: #253127;
    border-radius: 999px;
}

@media (max-width: 820px) {
    .player-inner {
        grid-template-columns: 1fr auto;
        gap: 12px;
        padding: 8px 16px;
    }
    .player-side {
        display: none;
    }
    .player-controls {
        grid-column: 2;
        grid-row: 1;
    }
    .player-time-row {
        display: none;
    }
}
@media (max-width: 600px) {
    .player-inner {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 8px 14px;
    }
    .player-track {
        justify-content: space-between;
    }
    .player-controls {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }
    .player-buttons {
        gap: 14px;
    }
}

