:root {
  color-scheme: dark;
  --bg: #17171b;
  --panel: #232229;
  --panel-2: #2a2831;
  --line: #3a3644;
  --text: #f7f5fb;
  --muted: #bcb6c8;
  --accent: #a64cff;
  --accent-2: #ffb12b;
  --danger: #ff5a73;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(166, 76, 255, 0.18), transparent 26rem),
    radial-gradient(circle at 82% 20%, rgba(255, 177, 43, 0.12), transparent 22rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 32px 18px;
}

.workspace {
  display: grid;
  gap: 16px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 14px 4px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.02;
}

.muted {
  margin: 0;
  color: var(--muted);
}

.status-pill,
.ghost {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 13px;
  background: rgba(35, 34, 41, 0.78);
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.danger {
  color: var(--danger);
}

.panel {
  background: rgba(35, 34, 41, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.24);
  padding: 18px;
}

form.panel,
.admin-form {
  display: grid;
  gap: 16px;
}

.user-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.dropzone {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #655b76;
  border-radius: 8px;
  background: #1e1d24;
  cursor: pointer;
}

.dropzone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.drop-title {
  font-size: 22px;
  font-weight: 850;
}

.drop-text {
  max-width: 100%;
  padding: 0 16px;
  color: var(--muted);
  overflow-wrap: anywhere;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(166, 76, 255, 0.22);
}

details {
  display: grid;
  gap: 14px;
}

details[open] {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 850;
}

.section-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  margin-bottom: 12px;
}

.primary,
.download {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #7f45ff);
  color: white;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  padding: 0 16px;
}

.secondary {
  background: #34303d;
}

.primary:disabled {
  opacity: 0.58;
  cursor: progress;
}

.result {
  display: grid;
  gap: 12px;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #18171d;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 180ms ease;
}

#message {
  margin: 0;
  color: var(--muted);
}

.kills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kill-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #1f1e25;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.error {
  color: var(--danger);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(520px, 100%);
  display: grid;
  gap: 16px;
}

.video-panel {
  display: grid;
  gap: 16px;
}

video {
  width: 100%;
  max-height: 76vh;
  background: #050506;
  border-radius: 8px;
}

.watch-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-form {
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: end;
}

.table {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.table-row {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #1f1e25;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-row span {
  overflow-wrap: anywhere;
}

.table-row strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

@media (max-width: 860px) {
  .header,
  .user-panel {
    display: grid;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-form,
  .table-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
