:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111314;
  color: #f4f1e8;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(28, 102, 109, 0.34), transparent 32%),
    linear-gradient(315deg, rgba(133, 48, 67, 0.28), transparent 34%),
    #111314;
}

button,
input,
select,
.providers a {
  font: inherit;
}

.app {
  width: min(1180px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

.request-form,
.providers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: #b9c2bd;
  font-size: 0.82rem;
}

input,
select,
button,
.providers a {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f1e8;
}

input,
select {
  width: 132px;
  padding: 0 11px;
}

button {
  padding: 0 14px;
  cursor: pointer;
  background: #e2c66d;
  border-color: #e2c66d;
  color: #171714;
  font-weight: 700;
}

.providers a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f1e8;
  border-color: rgba(255, 255, 255, 0.16);
  font-weight: 700;
  text-decoration: none;
}

.providers a[data-active="true"] {
  background: #4aa391;
  border-color: #4aa391;
  color: #071412;
}

.stage {
  position: relative;
  min-height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background: #050607;
}

iframe {
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: block;
  border: 0;
  background: #050607;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9da7a2;
}

.status {
  min-height: 20px;
  margin: 0;
  color: #b9c2bd;
  font-size: 0.9rem;
}

.status[data-error="true"] {
  color: #ff9c8b;
}

body.watch-mode {
  overflow: hidden;
}

body.watch-mode .app {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  gap: 0;
  grid-template-rows: 1fr;
}

body.watch-mode .toolbar {
  display: none;
}

body.watch-mode .stage,
body.watch-mode iframe {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
}

body.watch-mode .status {
  position: fixed;
  left: 12px;
  bottom: 10px;
  z-index: 5;
  max-width: min(720px, calc(100vw - 24px));
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(5, 6, 7, 0.72);
}

@media (max-width: 760px) {
  .app {
    width: min(100vw - 20px, 1180px);
    padding: 10px 0;
  }

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

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

  label,
  input,
  select,
  .request-form button {
    width: 100%;
  }

  .stage,
  iframe {
    min-height: 62vh;
  }
}
