:root {
  color: #17202a;
  background: #f2f4f7;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f2f4f7;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

.topbar {
  border-bottom: 1px solid #d8dde3;
  background: #ffffff;
}

.topbar__inner {
  width: min(1120px, calc(100% - 32px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 700;
}

.brand__mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: #11756d;
  font-size: 12px;
  padding-left: 2px;
}

.connection {
  color: #52606d;
  font-size: 13px;
}

.workspace {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 48px;
}

.resolver {
  padding: 20px;
  border: 1px solid #d8dde3;
  border-radius: 8px;
  background: #ffffff;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #364152;
  font-size: 13px;
  font-weight: 650;
}

.resolver__row,
.source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #b8c0ca;
  border-radius: 6px;
  outline: none;
  color: #17202a;
  background: #ffffff;
}

input:focus {
  border-color: #11756d;
  box-shadow: 0 0 0 3px rgba(17, 117, 109, 0.14);
}

input[readonly] {
  color: #3e4c59;
  background: #f7f8fa;
}

button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  color: #ffffff;
  background: #11756d;
  font-weight: 700;
}

button:hover {
  background: #0c625b;
}

button:focus-visible {
  outline: 3px solid rgba(17, 117, 109, 0.22);
  outline-offset: 2px;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button__spinner {
  display: none;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

button.is-loading .button__spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status {
  min-height: 26px;
  padding: 9px 2px 0;
  color: #52606d;
  font-size: 14px;
}

.status.is-error {
  color: #b42318;
}

.status.is-success {
  color: #087f5b;
}

.player-section {
  margin-top: 18px;
}

.player-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #080a0c;
}

.player-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #080a0c;
}

.video-meta {
  padding: 18px 0 0;
}

.video-meta__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.video-meta h1 {
  min-width: 0;
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.video-meta__heading span {
  flex: none;
  color: #52606d;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.secondary-button {
  border: 1px solid #aeb7c2;
  color: #26323f;
  background: #ffffff;
}

.secondary-button:hover {
  background: #eef1f4;
}

[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .topbar__inner,
  .workspace {
    width: min(100% - 24px, 1120px);
  }

  .workspace {
    margin-top: 16px;
  }

  .resolver {
    padding: 14px;
  }

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

  .resolver__row button {
    width: 100%;
  }

  .player-section {
    margin-top: 10px;
  }

  .player-frame {
    width: calc(100% + 24px);
    margin-left: -12px;
    border-radius: 0;
  }

  .video-meta__heading {
    display: block;
  }

  .video-meta__heading span {
    display: block;
    margin-top: 5px;
  }

  .source-row {
    grid-template-columns: minmax(0, 1fr) 68px;
  }
}

