:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

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

.panel {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(17, 24, 39, 0.08);
  padding: 28px;
}

.heading {
  margin-bottom: 22px;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
  letter-spacing: 0;
}

.url-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input {
  min-width: 0;
  height: 48px;
  border: 1px solid #9ca3af;
  border-radius: 6px;
  padding: 0 14px;
  color: #111827;
  background: #ffffff;
}

input:focus {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  border-color: #2563eb;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: #ffffff;
  background: #2563eb;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: #1d4ed8;
}

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

.status {
  min-height: 24px;
  margin: 16px 0 0;
  color: #4b5563;
}

.status.error {
  color: #b91c1c;
}

.result {
  margin-top: 22px;
  border-top: 1px solid #e5e7eb;
  padding-top: 22px;
}

.video-head {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: start;
}

.thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #e5e7eb;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.meta {
  color: #6b7280;
}

.tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
}

.tab {
  min-width: 110px;
  border-radius: 0;
  background: #ffffff;
  color: #374151;
}

.tab.active {
  background: #111827;
  color: #ffffff;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 12px;
}

.option-title {
  margin: 0;
  font-weight: 700;
}

.option-kind {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.download {
  min-width: 108px;
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 20px, 980px);
    padding: 20px 0;
  }

  .panel {
    padding: 18px;
  }

  .url-form,
  .video-head,
  .option {
    grid-template-columns: 1fr;
  }

  .download,
  .url-form button {
    width: 100%;
  }
}
