:root {
  color-scheme: dark;
  --bg: #090d12;
  --bg-soft: #0c1219;
  --card: #101720;
  --panel: #101720;
  --panel-2: #0d141d;
  --field: #131d28;
  --line: #203044;
  --border: #203044;
  --text: #edf5ff;
  --muted: #9db0c4;
  --accent: #5eead4;
  --accent2: #93c5fd;
  --accent-2: #93c5fd;
  --good: #60e6a8;
  --bad: #ff6b6b;
  --danger: #ff6b6b;
  --warn: #f6c768;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(0, 0, 0, .22);
  --max: 1120px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
}

body {
  background:
    radial-gradient(circle at 14% -8%, rgba(94, 234, 212, .12), transparent 34rem),
    radial-gradient(circle at 90% 4%, rgba(147, 197, 253, .10), transparent 30rem),
    linear-gradient(180deg, #0a0f15 0%, var(--bg) 46rem) !important;
  color: var(--text) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: 0;
}

a {
  color: var(--accent);
  text-decoration: none !important;
}

a:hover {
  color: #c8fff6;
  text-decoration: none !important;
}

.wrap {
  width: min(var(--max), calc(100% - 32px));
  max-width: var(--max) !important;
  margin-inline: auto !important;
  padding: 28px 0 44px !important;
}

.nav,
.top,
header.nav,
header.topbar,
header[style*="display:flex"] {
  gap: 14px !important;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.chip,
.mark {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--radius) !important;
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  color: #061018 !important;
  box-shadow: 0 10px 30px rgba(94, 234, 212, .15);
}

.nav,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.hero {
  padding: 52px 0 18px;
}

.title {
  font-size: clamp(2.1rem, 6vw, 4.4rem);
  line-height: 1;
  margin: 0;
}

.subtitle {
  max-width: 68ch;
  margin-top: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.btn,
button,
.nav-btn,
.pill,
.uploadButton,
summary {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  background: rgba(255, 255, 255, .035) !important;
  color: var(--text) !important;
  text-decoration: none !important;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.btn:hover,
button:hover,
.nav-btn:hover,
.pill:hover,
.uploadButton:hover,
summary:hover {
  border-color: rgba(94, 234, 212, .62) !important;
  background: rgba(94, 234, 212, .075) !important;
  transform: translateY(-1px);
}

button[type="submit"],
.btn.primary,
.uploadButton,
.sideNav .active,
.segmented .active,
.nav-btn.active {
  border-color: rgba(94, 234, 212, .72) !important;
  background: linear-gradient(135deg, rgba(94, 234, 212, .95), rgba(147, 197, 253, .88)) !important;
  color: #061018 !important;
  font-weight: 800;
}

.card,
.panel,
.metric,
.clockPanel,
.loginPanel,
.userCard,
.subPanel,
.stat,
.notice,
.flash {
  padding: 18px;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  background: linear-gradient(180deg, rgba(16, 23, 32, .96), rgba(13, 20, 29, .94)) !important;
  box-shadow: none !important;
}

.card {
  display: block;
  color: var(--text);
}

.card h3 {
  margin: .2rem 0 .35rem;
  color: var(--text);
}

.card p {
  margin: 0;
}

.card:hover {
  border-color: rgba(94, 234, 212, .45) !important;
}

h1,
.title {
  color: var(--text);
  letter-spacing: 0 !important;
}

p,
.subtitle,
.muted,
.subtle,
small,
.note,
li {
  color: var(--muted);
}

input,
select,
textarea,
.search {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  background: var(--field) !important;
  color: var(--text) !important;
}

input:focus,
select:focus,
textarea:focus,
.search:focus {
  outline: 2px solid rgba(94, 234, 212, .22) !important;
  border-color: rgba(94, 234, 212, .7) !important;
}

code {
  border: 1px solid rgba(94, 234, 212, .16);
  border-radius: 6px !important;
  background: #0d141d !important;
  color: #bdfcf4 !important;
}

.badge,
.pill {
  color: var(--muted);
}

.sideNav,
.sidebar,
.topbar,
.playerbar {
  border-color: var(--line) !important;
  background: rgba(13, 20, 29, .96) !important;
}

.logo {
  fill: var(--accent) !important;
}

.row.item.active {
  background: rgba(94, 234, 212, .12) !important;
}

.table th,
.table td,
.row,
.fileRow,
.tableRow,
.flash-line {
  border-color: var(--line) !important;
}

.siteFooter {
  width: min(var(--max), calc(100% - 32px));
  margin: 10px auto 0;
  padding: 22px 0 34px;
  border-top: 1px solid rgba(148, 163, 184, .16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: .92rem;
}

.siteFooter nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.siteFooter a {
  color: var(--muted);
}

.siteFooter a:hover {
  color: var(--accent);
}

.legalPage .hero {
  padding-top: 56px;
}

.legalGrid .card {
  min-height: 150px;
}

@keyframes xdevFadeUp {
  from {
    opacity: 1;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card,
.panel,
.metric,
.clockPanel,
.loginPanel,
.legalGrid .card {
  animation: xdevFadeUp .36s ease both;
}

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

@media (max-width: 760px) {
  .wrap {
    width: min(100% - 28px, var(--max));
    padding-top: 22px !important;
  }

  .siteFooter {
    display: grid;
    width: min(100% - 28px, var(--max));
  }

  .siteFooter nav {
    justify-content: flex-start;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
  }

  .topbar .topnav {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar .search {
    min-width: 0;
  }

  .main .table.head,
  .main .row.item {
    grid-template-columns: 44px minmax(0, 1fr) 64px !important;
  }

  .main .table.head .size,
  .main .table.head .date,
  .main .row.item .size,
  .main .row.item .date {
    display: none;
  }

  .playerbar {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .playerbar .now {
    min-width: 0;
  }

  .playerbar .art,
  .playerbar .right {
    display: none !important;
  }

  .playerbar .timeline {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
  }

  #seek,
  #vol {
    width: 100% !important;
    max-width: none !important;
  }
}
