* {
  box-sizing: border-box;
}

:root {
  --bg-a: #fff8ef;
  --bg-b: #eef8ff;
  --bg-c: #f4ffef;
  --text: #1f2433;
  --muted: #5b647d;
  --line: #d9e1f0;
  --card: #ffffff;
  --primary: #0f62fe;
  --primary-dark: #0746b7;
  --success: #0a9a5b;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 188, 76, 0.17), transparent 35%),
    radial-gradient(circle at 85% 15%, rgba(36, 123, 255, 0.16), transparent 30%),
    radial-gradient(circle at 70% 80%, rgba(19, 180, 110, 0.14), transparent 35%),
    linear-gradient(145deg, var(--bg-a), var(--bg-b) 48%, var(--bg-c));
}

.wrap {
  max-width: 1080px;
  margin: 34px auto 60px;
  padding: 0 16px;
}

.hero h1 {
  margin: 0 0 6px;
  line-height: 1.1;
  font-size: clamp(30px, 4vw, 46px);
}

.sub {
  margin: 0;
  color: var(--muted);
}

a {
  color: var(--primary-dark);
}

.layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.layout.pre-verify {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.layout.pre-verify #convert-form {
  margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(29, 35, 57, 0.06);
}

.card-title {
  margin: 0 0 8px;
}

.verify-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.verify-block label,
.verify-block input {
  width: 100%;
}

#verify-url-btn {
  width: min(280px, 100%);
}

#verify-msg {
  margin-top: 6px;
}

#conversion-options {
  margin-top: 10px;
  border-top: 1px dashed #d8e0ef;
  padding-top: 12px;
}

#scope-options {
  margin-top: 10px;
  border-top: 1px dashed #d8e0ef;
  padding-top: 10px;
}

#scope-options label {
  display: block;
  text-align: left;
}

label {
  display: block;
  margin-top: 10px;
  margin-bottom: 6px;
  font-weight: 700;
}

input,
select,
button,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #c8d2e6;
  padding: 11px 12px;
  font-size: 15px;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 98, 254, 0.2);
  border-color: var(--primary);
}

button,
.btn {
  margin-top: 14px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  border-radius: 12px;
  padding: 11px 14px;
}

.btn.small {
  width: auto;
  padding: 8px 12px;
  margin-top: 0;
  font-size: 13px;
}

button:hover,
.btn:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  background: #166534;
}

.preview-title {
  margin: 10px 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.preview-note {
  margin: 0;
  color: var(--muted);
}

.services-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chips {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.chip {
  padding: 7px 10px;
  border: 1px solid #d3ddf1;
  border-radius: 999px;
  background: #f7fbff;
  font-size: 13px;
  color: #2c3c64;
  white-space: nowrap;
}

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

.thumb {
  width: 230px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #d4ddf1;
}

.status-text h2 {
  margin: 0 0 4px;
}

.status-text p {
  margin: 0;
  color: var(--muted);
}

.phase {
  margin-top: 12px;
}

.phase-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #42527c;
}

.progress-wrap {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #edf2fc;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0aa45f, #1584ff);
  transition: width 0.3s ease;
}

#percent-download,
#percent-ffmpeg {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.captcha-wrap {
  margin-top: 12px;
}

.error {
  margin-top: 12px;
  color: #b42318;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 12, 21, 0.54);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 1000;
}

.modal-box {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid #d5dff2;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.2);
}

.modal-link {
  font-weight: 700;
}

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

.stat-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #d7deec;
  padding: 6px 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #e2e8f5;
  white-space: nowrap;
}

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

@media (max-width: 680px) {
  .wrap {
    margin-top: 20px;
  }

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

  .thumb {
    width: 100%;
  }

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

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