:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #181a20;
  --panel-2: #20232b;
  --text: #f4f0e8;
  --muted: #aaa39a;
  --line: rgba(255,255,255,.11);
  --accent: #d7ff64;
  --accent-2: #62d0ff;
  --danger: #ff6d6d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(98,208,255,.18), transparent 28rem),
    linear-gradient(135deg, #101114 0%, #171511 52%, #101114 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
}

.brand {
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: .02em;
}

.brand span {
  color: var(--accent);
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 4rem;
}

.login-shell {
  min-height: calc(100vh - 7rem);
  display: grid;
  place-items: center;
}

.login-panel,
.upload-box,
.card,
.empty {
  background: rgba(24,26,32,.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
}

.login-panel {
  width: min(430px, 100%);
  padding: 2rem;
}

.eyebrow {
  margin: 0 0 .7rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 1rem;
  font-size: clamp(2.2rem, 6vw, 5.6rem);
  line-height: .95;
}

.login-panel h1 {
  font-size: 2.2rem;
  line-height: 1.05;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.form {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

label {
  display: grid;
  gap: .45rem;
  color: var(--muted);
  font-size: .9rem;
}

input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101114;
  color: var(--text);
  padding: .85rem .95rem;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: #101114;
  font-weight: 800;
}

.primary {
  background: var(--accent);
  padding: .95rem 1.2rem;
}

.ghost {
  background: rgba(255,255,255,.08);
  color: var(--text);
  padding: .65rem .9rem;
}

.danger {
  background: rgba(255,109,109,.14);
  color: var(--danger);
  padding: .75rem .9rem;
}

.alert {
  border: 1px solid rgba(255,109,109,.5);
  color: #ffd6d6;
  background: rgba(255,109,109,.12);
  border-radius: 8px;
  padding: .85rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 2rem;
  align-items: end;
  padding: 4rem 0 3rem;
}

.upload-box {
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.dropzone {
  min-height: 210px;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 1.2rem;
}

.dropzone input {
  max-width: 100%;
}

.dropzone strong {
  font-size: 1.25rem;
}

.dropzone span {
  color: var(--muted);
}

.history {
  display: grid;
  gap: 1rem;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.section-title h2 {
  margin: 0;
  font-size: 1.4rem;
}

.section-title span {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}

.card {
  overflow: hidden;
}

.media {
  display: grid;
  place-items: center;
  height: 220px;
  background: var(--panel-2);
  text-decoration: none;
}

.preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

video.preview {
  object-fit: contain;
}

.audio-tile,
.file-tile {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.audio-tile span {
  font-size: 4rem;
  color: var(--accent-2);
}

.audio-tile audio {
  width: 100%;
}

.file-tile {
  color: var(--muted);
  font-weight: 900;
  letter-spacing: .18em;
}

.card-body {
  display: grid;
  gap: .8rem;
  padding: 1rem;
}

.card h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .5rem;
}

.actions input {
  padding: .7rem;
  font-size: .82rem;
}

.actions button {
  height: 100%;
  padding: .7rem .8rem;
  background: var(--accent-2);
}

.empty {
  padding: 2rem;
  color: var(--muted);
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 3rem;
  }
}
