:root {
  --bg: #080b12;
  --panel: rgba(17, 23, 35, 0.92);
  --panel-2: rgba(25, 33, 49, 0.92);
  --line: rgba(145, 171, 208, 0.18);
  --line-strong: rgba(145, 171, 208, 0.34);
  --text: #eef4ff;
  --muted: #9baac0;
  --accent: #6fe2ff;
  --accent-2: #78ffa8;
  --warning: #ffc857;
  --danger: #ff6477;
  --radius: 16px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(69, 133, 255, 0.15), transparent 32rem),
    radial-gradient(circle at 100% 20%, rgba(52, 255, 200, 0.08), transparent 28rem),
    var(--bg);
}

.background-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.shell {
  position: relative;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 30px;
}

.shell.wide {
  width: min(1280px, calc(100% - 32px));
}

.brand-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(111, 226, 255, 0.14), rgba(255,255,255,0.02));
  box-shadow: inset 0 0 30px rgba(111, 226, 255, 0.08);
}

.brand-mark span {
  position: absolute;
  width: 27px;
  height: 6px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(111, 226, 255, 0.75);
}

.brand-mark span:nth-child(1) { transform: rotate(0deg); }
.brand-mark span:nth-child(2) { transform: rotate(60deg); }
.brand-mark span:nth-child(3) { transform: rotate(-60deg); }

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

h1 {
  margin-bottom: 6px;
  font-size: clamp(2rem, 5vw, 3.7rem);
  letter-spacing: -0.05em;
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.eyebrow,
.step-label {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  font-weight: 800;
}

.lede,
.help-text {
  margin-bottom: 0;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: clamp(20px, 4vw, 34px);
}

.panel.compact {
  max-width: 620px;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

form {
  display: grid;
  gap: 22px;
}

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

label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

label > span {
  color: #d7e2f2;
  font-size: 0.84rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(5, 8, 14, 0.7);
  color: var(--text);
  padding: 12px 13px;
  font: inherit;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

textarea {
  resize: vertical;
  min-height: 88px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(111, 226, 255, 0.12);
  background: rgba(7, 12, 22, 0.96);
}

.full-width {
  width: 100%;
}

.drop-zone {
  min-height: 160px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
  background: rgba(4, 8, 15, 0.42);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.drop-zone:hover,
.drop-zone:focus,
.drop-zone.dragging {
  border-color: var(--accent);
  background: rgba(111, 226, 255, 0.06);
  transform: translateY(-1px);
  outline: none;
}

.drop-zone strong {
  display: block;
  margin-bottom: 4px;
}

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

.drop-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(111, 226, 255, 0.12);
  color: var(--accent);
  font-size: 1.65rem;
}

.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 120ms ease, opacity 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.button.primary {
  color: #031219;
  background: linear-gradient(135deg, var(--accent), #a4f1ff);
}

.button.secondary {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255,255,255,0.04);
}

.button.danger {
  color: #fff;
  background: rgba(255, 100, 119, 0.18);
  border-color: rgba(255, 100, 119, 0.34);
}

.button.ghost {
  background: transparent;
}

.form-footer,
.toolbar,
.toolbar-group,
.toolbar-actions,
.inline-form,
.review-row,
.submission-topline,
.submission-actions,
footer {
  display: flex;
  align-items: center;
  gap: 14px;
}

.form-footer,
.submission-topline,
footer {
  justify-content: space-between;
}

.progress-wrap {
  display: grid;
  gap: 10px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
}

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

.progress-wrap p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.message {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
}

.message.success {
  color: #c6ffdc;
  border-color: rgba(120, 255, 168, 0.35);
  background: rgba(120, 255, 168, 0.08);
}

.message.error {
  color: #ffd5dc;
  border-color: rgba(255, 100, 119, 0.4);
  background: rgba(255, 100, 119, 0.08);
}

audio {
  width: 100%;
  margin-top: 14px;
}

footer {
  padding: 20px 4px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

footer a {
  color: var(--accent);
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 18px;
}

.toolbar-group {
  flex: 1;
  align-items: end;
  flex-wrap: wrap;
}

.toolbar-group label {
  min-width: 170px;
  flex: 1;
}

.toolbar-actions {
  align-self: flex-end;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: rgba(17, 23, 35, 0.86);
}

.stat-card strong {
  display: block;
  font-size: 1.8rem;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.submission-list {
  display: grid;
  gap: 16px;
}

.submission-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(28, 37, 54, 0.94), rgba(13, 18, 29, 0.96));
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
  padding: 24px;
}

.submission-topline {
  align-items: flex-start;
}

.submission-line-id {
  margin: 12px 0 6px;
  font-size: 1.4rem;
}

.submission-meta,
.submission-notes {
  color: var(--muted);
  margin-bottom: 0;
}

.submission-notes:empty {
  display: none;
}

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

.status-chip,
.mini-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 6px 9px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-chip[data-status="approved"] {
  color: #c6ffdc;
  border-color: rgba(120,255,168,0.35);
  background: rgba(120,255,168,0.08);
}

.status-chip[data-status="revision"] {
  color: #ffe7ae;
  border-color: rgba(255,200,87,0.35);
  background: rgba(255,200,87,0.08);
}

.status-chip[data-status="rejected"] {
  color: #ffd5dc;
  border-color: rgba(255,100,119,0.35);
  background: rgba(255,100,119,0.08);
}

.submission-line-text {
  margin: 22px 0 0;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: rgba(111, 226, 255, 0.06);
  color: #f5f9ff;
  font-size: 1.04rem;
  line-height: 1.6;
}

.review-row {
  margin-top: 18px;
  align-items: end;
}

.review-row label:first-child {
  min-width: 175px;
}

.review-notes-label {
  flex: 1;
}

.review-notes {
  min-height: 66px;
}

.card-message {
  margin-top: 14px;
}

.empty-state {
  text-align: center;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 820px) {
  .form-grid,
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar,
  .review-row,
  .submission-topline {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions,
  .submission-actions {
    align-self: stretch;
  }

  .toolbar-actions .button,
  .submission-actions .button {
    flex: 1;
  }
}

@media (max-width: 600px) {
  .shell {
    width: min(100% - 20px, 980px);
    padding-top: 28px;
  }

  .brand-header {
    align-items: flex-start;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex: 0 0 auto;
  }

  .form-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .drop-zone {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .form-footer,
  footer {
    flex-direction: column;
    align-items: stretch;
  }

  .form-footer .button {
    width: 100%;
  }
}

/* Simplified voice actor upload page */
.actor-shell {
  width: min(920px, calc(100% - 32px));
}

.actor-header {
  margin-bottom: 22px;
}

.quick-guide {
  display: grid;
  gap: 20px;
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(111, 226, 255, 0.26);
  border-radius: var(--radius);
  background: rgba(111, 226, 255, 0.065);
}

.quick-guide-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.quick-guide-title h2 {
  margin: 0 0 5px;
  font-size: 1.08rem;
}

.quick-guide-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.guide-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #031219;
  background: var(--accent);
  font-weight: 900;
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide;
}

.guide-list li {
  position: relative;
  min-height: 92px;
  padding: 15px 14px 14px 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 8, 15, 0.42);
  color: var(--muted);
  line-height: 1.45;
  counter-increment: guide;
}

.guide-list li::before {
  content: counter(guide);
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: var(--accent);
  background: rgba(111, 226, 255, 0.12);
  font-weight: 900;
}

.guide-list strong {
  color: var(--text);
}

.guide-list code {
  color: #c8f6ff;
  overflow-wrap: anywhere;
}

.actor-panel {
  padding: clamp(20px, 4vw, 34px);
}

.actor-panel-title {
  margin-bottom: 8px;
}

.panel-description {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.required-dot {
  color: var(--danger);
  font-weight: 900;
}

.actor-panel form {
  gap: 0;
}

.form-step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.form-step:first-of-type {
  padding-top: 24px;
}

.form-step.final-step {
  border-bottom: 0;
  padding-bottom: 4px;
}

.step-number {
  display: grid;
  place-items: center;
  align-self: start;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(111, 226, 255, 0.38);
  border-radius: 12px;
  color: var(--accent);
  background: rgba(111, 226, 255, 0.09);
  font-size: 1.02rem;
  font-weight: 900;
  box-shadow: inset 0 0 18px rgba(111, 226, 255, 0.05);
}

.step-body {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.step-heading h3 {
  margin: 0 0 5px;
  font-size: 1.12rem;
}

.step-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.simple-grid {
  gap: 18px;
}

.field {
  gap: 7px;
}

.field-label {
  color: #e3ecf8;
  font-size: 0.9rem;
  font-weight: 800;
}

.field-help,
.field-notice {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.field-notice {
  color: #bff5ff;
}

.optional-badge {
  display: inline-flex;
  margin-left: 5px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  vertical-align: 1px;
}

.field-error input,
.field-error select,
.field-error textarea,
.drop-zone.field-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 100, 119, 0.12);
}

.simple-drop-zone {
  min-height: 132px;
}

.simple-drop-zone.has-file {
  border-style: solid;
  border-color: rgba(120, 255, 168, 0.4);
  background: rgba(120, 255, 168, 0.055);
}

.drop-copy {
  min-width: 0;
}

.selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(120, 255, 168, 0.28);
  border-radius: 12px;
  background: rgba(120, 255, 168, 0.06);
}

.selected-file > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.selected-file strong,
.selected-file small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file small,
.selected-label {
  color: var(--muted);
  font-size: 0.76rem;
}

.selected-label {
  color: #c6ffdc;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.small-button {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.advanced-details {
  margin: 20px 0 0 62px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(4, 8, 15, 0.32);
  overflow: hidden;
}

.advanced-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 18px;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  list-style-position: inside;
}

.advanced-details summary:hover {
  background: rgba(255, 255, 255, 0.025);
}

.advanced-details summary small {
  color: var(--muted);
  font-weight: 500;
  text-align: right;
}

.advanced-content {
  display: grid;
  gap: 20px;
  padding: 20px 18px;
  border-top: 1px solid var(--line);
}

.upload-code-field {
  max-width: 520px;
}

.submission-summary {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(4, 8, 15, 0.44);
}

.summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.readiness-badge {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--muted);
  background: rgba(255,255,255,0.035);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.readiness-badge.ready {
  color: #c6ffdc;
  border-color: rgba(120, 255, 168, 0.38);
  background: rgba(120, 255, 168, 0.08);
}

.submission-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
}

.submission-summary dl > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(145, 171, 208, 0.09);
}

.submission-summary dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.submission-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.82rem;
}

.large-submit {
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
}

.privacy-note {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

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

  .guide-list li {
    min-height: auto;
  }

  .form-step {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }

  .step-number {
    width: 34px;
    height: 34px;
  }

  .advanced-details {
    margin-left: 48px;
  }

  .submission-summary dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .actor-shell {
    width: min(100% - 20px, 920px);
  }

  .quick-guide,
  .actor-panel {
    padding: 18px;
  }

  .actor-panel-title,
  .quick-guide-title,
  .summary-heading,
  .selected-file,
  .advanced-details summary {
    align-items: stretch;
    flex-direction: column;
  }

  .form-step {
    grid-template-columns: 1fr;
  }

  .step-number {
    margin-bottom: -4px;
  }

  .advanced-details {
    margin-left: 0;
  }

  .advanced-details summary small {
    text-align: left;
  }

  .simple-drop-zone {
    grid-template-columns: 1fr;
  }

  .selected-file strong,
  .selected-file small {
    white-space: normal;
  }
}

[hidden] {
  display: none !important;
}
