* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
}

.dark-ui {
  background: radial-gradient(circle at top left, #202832, #0d1117 55%, #05070a);
  color: #f5f7fb;
  min-height: 100vh;
}

.dashboard {
  display: grid;
  grid-template-columns: 540px 1fr;
  gap: 24px;
  padding: 20px;
}

.panel {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

h1 {
  margin: 0 0 22px;
  font-size: 28px;
}

h2 {
  margin: 24px 0 12px;
}

label {
  display: block;
  margin: 16px 0 7px;
  color: #e8edf5;
}

select,
input,
button {
  font: inherit;
}

select,
input {
  width: 100%;
  background: rgba(0,0,0,0.28);
  color: white;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 6px;
  padding: 10px 12px;
}

button {
  background: #2d333d;
  color: white;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
}

button:hover {
  background: #3a424f;
}

button.primary {
  background: #12a866;
}

button.primary:hover {
  background: #0fbd70;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

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

fieldset {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #2f7df6;
  border-radius: 8px;
}

legend {
  padding: 0 8px;
  color: #cfe0ff;
}

.inline-input {
  display: grid;
  grid-template-columns: 140px auto;
  gap: 8px;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: auto;
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

pre#status {
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
  padding: 18px;
  min-height: 74px;
  white-space: pre-wrap;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #14ce7b;
  border-radius: 50%;
  margin-right: 8px;
}

.tips,
.note {
  margin-top: 26px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 16px;
}

.tips li {
  margin: 8px 0;
}

.preview-frame {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: 7px;
  background: #111;
  overflow: hidden;
}

.muted {
  color: #b9c1cf;
}

hr {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.18);
  margin: 28px 0;
}

.url-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
}

.url-row code {
  display: block;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
  padding: 13px;
  color: white;
  word-break: break-all;
}

.url-row button {
  background: #216cf6;
}

.overlay {
  margin: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 5vw 8vh;
}

#captionBox {
  display: block;
  max-width: 90vw;
  padding: 0.15em 0.45em;
  background: var(--caption-bg, rgba(0,0,0,0.75));
  border-radius: 0.12em;
  text-align: center;
}

.caption-line {
  display: block;
  color: var(--caption-fg, white);
  font-family: var(--caption-font, Arial, sans-serif);
  font-size: var(--caption-size, 32px);
  font-weight: var(--caption-weight, 700);
  line-height: 1.18;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.85);
}

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