﻿:root {
  --bg: #050505;
  --panel: #0d0d0d;
  --panel-2: #090909;
  --fg: #f5f5f5;
  --muted: #b8b8b8;
  --line: #2a2a2a;
  --line-strong: #f3f3f3;
  --accent: #ffffff;
  --danger: #ff9d9d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, #1d1d1d 0%, transparent 34%),
    radial-gradient(circle at 88% 0%, #181818 0%, transparent 38%),
    linear-gradient(180deg, #080808 0%, #020202 100%);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.13;
  background-image: radial-gradient(circle, #fff 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  z-index: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 6, 6, 0.72);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  text-decoration: none;
  color: var(--fg);
  font-family: "Syne", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
}

.brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: contain;
  border: 1px solid #2f2f2f;
  background: #fff;
  padding: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav a:hover {
  color: var(--fg);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  background: #060606;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  min-width: 42px;
}

.lang-btn.active {
  background: #fff;
  color: #000;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 44px;
  position: relative;
  z-index: 1;
}

.hero {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)),
    linear-gradient(180deg, #0f0f0f 0%, #090909 100%);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}

.tag {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-size: 11px;
  margin: 0 0 10px;
}

h1 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
  max-width: 14ch;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 75ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.workspace {
  margin-bottom: 14px;
}

.section-head {
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.4rem;
  font-family: "Syne", sans-serif;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.panel:hover {
  border-color: #3a3a3a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.section-panel {
  margin-top: 14px;
}

.hidden {
  display: none !important;
}

.panel-enter {
  animation: panel-enter 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}

.row {
  display: flex;
  gap: 10px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  background: #030303;
  color: var(--fg);
  border: 1px solid #292929;
  border-radius: 10px;
  padding: 11px 12px;
}

input:focus,
select:focus {
  outline: 1px solid var(--line-strong);
  outline-offset: 1px;
}

#urlInput {
  transition: border-color 180ms ease, box-shadow 220ms ease, transform 180ms ease;
}

#urlInput.url-pasted {
  border-color: #f3f3f3;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.btn {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: #000;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.btn:hover {
  background: #e7e7e7;
}

.btn-light {
  background: transparent;
  color: #fff;
}

.btn-primary {
  width: 100%;
  margin-top: 14px;
}

.btn-ghost {
  background: #fff;
  color: #000;
}

.message {
  min-height: 20px;
  font-size: 13px;
  color: var(--muted);
}

.meta-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 14px;
}

.thumb-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.thumb-wrap img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.meta-info h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.meta-info p {
  margin: 4px 0;
  color: var(--muted);
}

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

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

.availability-title {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.quality-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quality-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #060606;
  color: #dfdfdf;
  font-size: 12px;
}

.progress-shell {
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  background: #030303;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: #f4f4f4;
  transition: width 220ms ease;
}

.log {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #050505;
  max-height: 180px;
  overflow-y: auto;
  padding: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  white-space: pre-wrap;
}

.log p {
  margin: 0 0 6px;
  color: #d8d8d8;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.012);
}

.feature-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.faq-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.012);
}

.faq-grid h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.faq-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .signature {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-footer .signature a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #4a4a4a;
  transition: border-color 180ms ease, color 180ms ease;
}

.site-footer .signature a:hover {
  border-color: #fff;
}

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

  .controls,
  .feature-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-nav {
    width: 100%;
    justify-content: center;
  }

  .row {
    flex-direction: column;
  }

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