:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-elevated: rgba(17, 24, 39, 0.82);
  --bg-card: rgba(15, 23, 42, 0.9);
  --border: rgba(148, 163, 184, 0.18);
  --text: #e5eefb;
  --muted: #9eb0cb;
  --primary: #7c3aed;
  --primary-strong: #5b21b6;
  --accent: #22c55e;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at top left,
      rgba(124, 58, 237, 0.22),
      transparent 28%
    ),
    radial-gradient(
      circle at top right,
      rgba(34, 197, 94, 0.16),
      transparent 26%
    ),
    linear-gradient(180deg, #08101f 0%, #0b1020 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #8b5cf6, #22c55e);
  color: white;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.brand__name {
  font-size: 1.1rem;
  font-weight: 800;
}

.helper {
  display: none;
}

.brand__tag {
  display: none;
}

.topbar__meta,
.hero__actions,
.card__header,
.output-box__header,
.output-box,
.results__grid,
.grid {
  display: flex;
  gap: 16px;
}

.topbar__meta {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.pill--soft {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(124, 58, 237, 0.3);
}

.layout {
  display: grid;
  gap: 18px;
}

.card {
  background: linear-gradient(
    180deg,
    rgba(17, 24, 39, 0.9),
    rgba(10, 16, 31, 0.92)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 24px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.eyebrow {
  display: none;
}

.hero h1,
.card h2,
.panel h3,
.output-box h3 {
  margin: 0;
}

.hero {
  display: none;
}

.hero h1 {
  display: none;
}

.hero__text {
  display: none;
}

.hero__actions {
  display: none;
}

.hero__stats {
  display: none;
}

.stat {
  display: none;
}

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

.grid > .card,
.results {
  padding: 24px;
}

.card__header,
.output-box__header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 600;
}

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

input[type="file"],
input[type="url"],
input[type="number"],
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.45);
  outline: none;
}

input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  margin-right: 12px;
  background: rgba(124, 58, 237, 0.22);
  color: var(--text);
}

input:focus,
select:focus {
  border-color: rgba(124, 58, 237, 0.8);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

select:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    opacity 150ms ease;
}

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

.button--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: white;
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.22);
}

.button--ghost {
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.72);
}

.button--disabled {
  pointer-events: none;
  opacity: 0.45;
}

.results {
  display: grid;
  gap: 18px;
}

.results__grid {
  display: grid;
  grid-template-columns: 1fr;
}

.panel,
.output-box {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(3, 7, 18, 0.4);
}

.summary {
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.summary div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.summary dt {
  color: var(--muted);
}

.summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.player-placeholder {
  margin-top: 18px;
  min-height: 160px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.28);
  padding: 18px;
}

.player-placeholder__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  background: rgba(124, 58, 237, 0.2);
  color: #ddd6fe;
  flex: 0 0 auto;
}

.player-stage {
  margin-top: 16px;
}

audio,
video {
  width: 100%;
  border-radius: 16px;
  background: #020617;
}

.video-mode .player-placeholder__icon {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.output-box {
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.helper {
  margin: 0;
  font-size: 0.92rem;
}

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

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar__meta {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .hero,
  .grid > .card,
  .results {
    padding: 18px;
  }

  .summary div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
