:root {
  color-scheme: dark;
  --bg: #07110d;
  --panel: #0d1b14;
  --panel-raised: #12261b;
  --soft: #193223;
  --line: #244633;
  --text: #edf8f1;
  --muted: #8ca99a;
  --accent: #57d68d;
  --accent-dark: #2faa68;
  --danger: #ff766b;
  --success: #70e0a0;
  --shadow: 0 24px 70px rgba(0, 18, 10, .48);
  font-family: "Segoe UI Variable", "Aptos", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100dvh; background: var(--bg); color: var(--text); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .22; background-image: radial-gradient(circle at 16% 5%, #20b966 0, transparent 29%), radial-gradient(circle at 82% 18%, #0d5a39 0, transparent 24%); }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .04; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.hidden { display: none !important; }
.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; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 200; transform: translateY(-160%); padding: 10px 14px; border-radius: 8px; background: var(--text); color: var(--bg); }
.skip-link:focus { transform: none; }

.login-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(7, 17, 13, .96); backdrop-filter: blur(18px); }
.login-card { width: min(440px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 30px 10px 30px 30px; background: var(--panel); box-shadow: var(--shadow); }
.login-card .brand-mark { margin-bottom: 28px; }
.login-card h1 { max-width: 360px; margin: 6px 0 12px; font-size: clamp(38px, 8vw, 62px); line-height: .96; letter-spacing: -.065em; }
.login-copy { max-width: 34ch; color: var(--muted); line-height: 1.5; }
.login-card input { width: 100%; margin: 26px 0 12px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: #050d09; color: var(--text); font-size: 22px; letter-spacing: .2em; transition: border-color .2s, box-shadow .2s; }
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(87, 214, 141, .16); }
.login-error { min-height: 1.4em; margin-top: 12px; color: var(--danger); font-size: 14px; }

.app-shell { width: min(1380px, 100%); margin: 0 auto; padding: 0 34px 70px; }
.topbar { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand > span:last-child { display: grid; }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 11px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px 5px 16px 16px; background: var(--accent); color: #062314; font-family: Georgia, serif; font-size: 25px; font-weight: 900; box-shadow: 0 12px 34px rgba(87,214,141,.24); }
.brand-mark.small { width: 38px; height: 38px; border-radius: 12px 4px 12px 12px; font-size: 20px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.system-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.system-status i { width: 8px; height: 8px; border-radius: 50%; background: #c69852; box-shadow: 0 0 13px currentColor; }
.system-status.online i { background: var(--success); }
.admin-badge { padding: 6px 9px; border: 1px solid rgba(87,214,141,.48); border-radius: 6px; color: #8be9b1; font-size: 11px; font-weight: 700; letter-spacing: .05em; }

.hero { min-height: 410px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); gap: clamp(40px, 7vw, 110px); align-items: center; padding: 68px 4px 74px; }
.hero-copy h1 { margin: 8px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(54px, 7vw, 104px); font-weight: 500; line-height: .9; letter-spacing: -.07em; }
.hero-copy > p:last-child { max-width: 51ch; color: var(--muted); font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.eyebrow, .section-kicker { color: #76e7a7; font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.request-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 26px 8px 26px 26px; background: rgba(13,27,20,.84); box-shadow: var(--shadow); }
.search-field { grid-column: 1 / -1; min-height: 68px; display: flex; align-items: center; gap: 13px; padding: 0 18px; border-radius: 14px; background: #050d09; border: 1px solid transparent; transition: border-color .2s; }
.search-field:focus-within { border-color: var(--accent); }
.search-field > span { color: var(--accent); font-size: 28px; transform: translateY(-2px); }
.search-field input, .filter-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-field input { font-size: 18px; }
.search-field input::placeholder, .filter-field input::placeholder { color: #617c6d; }
.button { min-height: 42px; padding: 10px 15px; border: 0; border-radius: 10px; background: var(--soft); color: var(--text); font-weight: 700; transition: transform .18s, background .18s, color .18s; }
.button:hover { background: #244832; }
.button:active, .icon-button:active, .cover-button:active { transform: scale(.98); }
.button:focus-visible, .icon-button:focus-visible, .cover-button:focus-visible, .mobile-tabs button:focus-visible { outline: 3px solid rgba(87,214,141,.42); outline-offset: 2px; }
.button.primary { background: var(--accent); color: #062314; }
.button.primary:hover { background: #70e3a1; }
.button.full { width: 100%; }
.button.subtle { min-height: 36px; padding: 8px 11px; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.button:disabled { opacity: .55; cursor: wait; }
.upload-button { display: flex; align-items: center; gap: 8px; padding: 0 6px; color: var(--muted); cursor: pointer; font-size: 13px; }
.upload-button input { display: none; }
.upload-button > span:first-of-type { color: var(--accent); font-size: 22px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 800; transition: transform .18s, border-color .18s, color .18s; }
.icon-button:hover { border-color: #3d7052; color: var(--text); }
.icon-button.danger:hover { border-color: var(--danger); color: var(--danger); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 390px); gap: 34px; align-items: start; }
.library-panel, .requests-panel { min-width: 0; }
.requests-panel { position: sticky; top: 18px; padding: 24px; border-radius: 24px 8px 24px 24px; background: rgba(13,27,20,.8); border: 1px solid var(--line); }
.section-heading { min-height: 54px; display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 22px; }
.section-heading.compact { min-height: auto; align-items: start; }
.section-heading h2 { margin-top: 6px; font-size: 27px; letter-spacing: -.045em; }
.section-heading h2 span { color: var(--muted); font-weight: 400; }
.filter-field { width: min(220px, 42vw); display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
.track-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.track-card { min-width: 0; display: grid; grid-template-columns: 92px minmax(0,1fr); grid-template-rows: 1fr auto; gap: 0 16px; padding: 12px; border-radius: 20px 7px 20px 20px; background: var(--panel); transition: transform .24s, background .24s; }
.track-card:hover { transform: translateY(-2px); background: var(--panel-raised); }
.cover-button { grid-row: 1 / 3; position: relative; width: 92px; height: 112px; overflow: hidden; padding: 0; border: 0; border-radius: 14px 4px 14px 14px; background: #193426; color: var(--text); }
.cover { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #34bd72, #102b1d 68%); font-family: Georgia, serif; font-size: 34px; }
.cover:not(.hidden) + .cover-fallback { display: none; }
.play-icon { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(237,248,241,.95); color: #0b2517; font-size: 11px; padding-left: 2px; box-shadow: 0 6px 20px #0006; }
.track-copy { min-width: 0; padding-top: 3px; }
.track-artist { overflow: hidden; color: #72dda0; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.track-title { display: -webkit-box; overflow: hidden; margin-top: 5px; font-size: 18px; line-height: 1.15; letter-spacing: -.035em; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.track-meta { margin-top: 7px; color: var(--muted); font-size: 11px; }
.track-actions { min-width: 0; display: flex; align-items: center; gap: 7px; padding-top: 10px; }
.track-actions .button { min-height: 36px; flex: 1; padding: 7px 12px; }
.track-actions .icon-button { width: 36px; height: 36px; }

.request-list { display: grid; gap: 11px; }
.request-card { padding: 16px; border-radius: 17px 5px 17px 17px; background: #09130e; border: 1px solid #1d3b2a; }
.request-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.request-heading h3 { margin-top: 5px; font-size: 16px; line-height: 1.25; letter-spacing: -.025em; }
.job-status { color: #69d999; font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.job-progress-label { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.progress { height: 3px; margin: 13px 0 10px; overflow: hidden; border-radius: 3px; background: var(--soft); }
.progress i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .4s ease; }
.job-message { color: var(--muted); font-size: 12px; line-height: 1.45; }
.confirmation { display: grid; gap: 12px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.confirmation > label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #050d09; color: var(--text); }
select { padding: 9px 10px; }
textarea { resize: vertical; padding: 10px; line-height: 1.45; }
select:focus, textarea:focus { border-color: var(--accent); }
.mode-row { display: flex; flex-wrap: wrap; gap: 15px; }
.mode-row label { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 12px; }
.mode-row input { accent-color: var(--accent); }
.job-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.empty-state { padding: 54px 20px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); }
.empty-state p { max-width: 38ch; margin: 7px auto 0; font-size: 13px; line-height: 1.5; }
.empty-state.small { padding: 30px 14px; }
.mobile-tabs { display: none; }

.player-dialog { width: min(1100px, calc(100% - 24px)); padding: 0; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #030906; color: var(--text); box-shadow: 0 30px 100px #000c; }
.player-dialog::backdrop { background: rgba(5,4,3,.82); backdrop-filter: blur(10px); }
.player-dialog video { display: block; width: 100%; max-height: 78dvh; background: #000; }
.player-copy { display: grid; gap: 2px; padding: 16px 56px 14px 18px; }
.player-copy span { color: #72dda0; font-size: 12px; }
.player-copy strong { font-size: 18px; }
.close-player { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #193223; color: var(--text); font-size: 23px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 150; max-width: min(440px, calc(100% - 28px)); transform: translate(-50%, 30px); padding: 12px 16px; border-radius: 10px; background: var(--text); color: #0b2517; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: var(--shadow); }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 980px) {
  .app-shell { padding-inline: 20px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 58px 4px; gap: 36px; }
  .hero-copy h1 { max-width: 700px; }
  .content-grid { grid-template-columns: 1fr; }
  .requests-panel { position: static; }
}

@media (max-width: 700px) {
  .app-shell { padding: 0 12px 46px; }
  .topbar { min-height: 72px; }
  .brand small, .system-status span { display: none; }
  .hero { padding: 42px 2px 38px; gap: 27px; }
  .hero-copy h1 { font-size: clamp(48px, 15vw, 74px); }
  .hero-copy > p:last-child { font-size: 15px; }
  .request-form { grid-template-columns: 1fr; padding: 12px; border-radius: 20px 6px 20px 20px; }
  .request-form .button { width: 100%; }
  .upload-button { justify-content: center; min-height: 38px; }
  .mobile-tabs { position: sticky; top: 8px; z-index: 20; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 26px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: rgba(13,27,20,.94); backdrop-filter: blur(14px); }
  .mobile-tabs button { min-height: 39px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; }
  .mobile-tabs button.active { background: var(--soft); color: var(--text); }
  .tab-panel { display: none; }
  .tab-panel.active { display: block; }
  .requests-panel { padding: 18px; }
  .track-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; }
  .filter-field { width: 130px; }
  .login-card { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
