:root {
  color-scheme: dark;
  --bg: #111310;
  --panel: #191d18;
  --panel-2: #20261f;
  --line: #3a4337;
  --text: #f4f1e8;
  --muted: #b7b1a3;
  --accent: #d7ff4f;
  --accent-2: #56c7ff;
  --danger: #ff6b5a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(215, 255, 79, 0.08), transparent 36%),
    radial-gradient(circle at 82% 8%, rgba(86, 199, 255, 0.14), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: "Aptos", "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 24px;
  align-items: end;
  min-height: 220px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  padding-bottom: 24px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

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

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: 0.9;
  margin-bottom: 18px;
  max-width: 900px;
}

h2 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 680px;
  line-height: 1.65;
  margin-bottom: 0;
}

.status-panel {
  background: var(--accent);
  color: #12140f;
  min-height: 150px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.status-panel strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4rem;
  line-height: 1;
}

.status-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(360px, 1.08fr);
  gap: 18px;
}

.input-pane,
.queue-pane,
.command-pane,
.deploy-note {
  background: rgba(25, 29, 24, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.input-pane,
.queue-pane {
  min-height: 620px;
}

.pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.pane-head p,
.deploy-note p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

textarea {
  width: calc(100% - 36px);
  min-height: 170px;
  resize: vertical;
  margin: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  background: #0d0f0d;
  color: var(--text);
  outline: none;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(215, 255, 79, 0.14);
}

.button-row {
  display: flex;
  gap: 10px;
  padding: 0 18px 18px;
}

.button-row.compact {
  padding: 0;
}

button {
  border: 1px solid transparent;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

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

.primary {
  background: var(--accent);
  color: #14160f;
  font-weight: 800;
}

.secondary,
.icon-button {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.small {
  min-height: 34px;
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 1.35rem;
}

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

label span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

select,
input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: #0d0f0d;
  color: var(--text);
  outline: none;
}

.custom-format {
  display: none;
  padding: 0 18px 18px;
}

.custom-format.is-visible,
.cookie-warning.is-visible,
.speed-tuning.is-visible {
  display: block;
}

.cookie-warning {
  display: none;
  margin: 0 18px 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 107, 90, 0.55);
  background: rgba(255, 107, 90, 0.09);
  color: #ffd8d2;
  line-height: 1.5;
}

.speed-tuning {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.speed-tuning.is-visible {
  display: grid;
}

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

.toggle-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 10px;
}

.toggle-grid input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

.queue-list {
  padding: 10px;
  display: grid;
  gap: 10px;
  max-height: 548px;
  overflow: auto;
}

.empty-state {
  color: var(--muted);
  border: 1px dashed var(--line);
  padding: 28px;
  text-align: center;
}

.queue-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 12px;
}

.queue-index {
  display: grid;
  place-items: center;
  height: 42px;
  background: #0d0f0d;
  color: var(--accent);
  font-weight: 800;
}

.queue-url {
  color: var(--text);
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.queue-meta {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
}

.platform-facebook {
  border-color: rgba(86, 199, 255, 0.65);
  color: var(--accent-2);
}

.platform-instagram {
  border-color: rgba(255, 107, 90, 0.72);
  color: #ff9a8c;
}

.platform-youtube {
  border-color: rgba(255, 107, 90, 0.72);
  color: #ff6b5a;
}

.remove-link {
  color: var(--danger);
  border-color: rgba(255, 107, 90, 0.45);
}

.command-pane {
  margin-top: 18px;
}

pre {
  margin: 0;
  padding: 18px;
  max-height: 360px;
  overflow: auto;
  background: #0b0d0b;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

code {
  color: #dce8d2;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre;
}

.deploy-note {
  margin-top: 18px;
  padding: 18px;
}

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

  .status-panel {
    min-height: 120px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 1280px);
    padding-top: 16px;
  }

  .settings-grid,
  .toggle-grid,
  .speed-tuning {
    grid-template-columns: 1fr;
  }

  .queue-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .remove-link {
    grid-column: 2;
    width: fit-content;
  }
}
