:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f4f5f7;
  background: #090a0d;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 65, 54, .14), transparent 34rem),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    #090a0d;
  background-size: auto, 32px 32px, 32px 32px, auto;
}

button, input { font: inherit; }

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 20px;
}

.card {
  width: min(100%, 720px);
  padding: clamp(24px, 6vw, 56px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 28px;
  background: rgba(17, 18, 23, .88);
  box-shadow: 0 32px 90px rgba(0,0,0,.5);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 44px;
  color: #d8d9de;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.brand-mark {
  width: 30px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #ff4238;
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #fff;
}

.eyebrow {
  margin: 0 0 14px;
  color: #ff675e;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .16em;
}

h1 {
  max-width: 580px;
  margin: 0;
  font-size: clamp(2.25rem, 8vw, 4.35rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.intro {
  max-width: 560px;
  margin: 24px 0 38px;
  color: #a9abb4;
  font-size: 1.05rem;
  line-height: 1.6;
}

label:not(.format-option):not(.rights) {
  display: block;
  margin: 0 0 9px;
  color: #d8d9de;
  font-size: .9rem;
  font-weight: 700;
}

.url-row { position: relative; }

input[type="url"], input[type="password"] {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 13px;
  outline: none;
  background: #0d0e12;
  color: #fff;
  padding: 0 112px 0 17px;
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}

input[type="password"] { padding-right: 17px; }

input:focus {
  border-color: #ff554b;
  box-shadow: 0 0 0 4px rgba(255, 66, 56, .12);
}

.icon-button {
  position: absolute;
  top: 9px;
  right: 9px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: #202127;
  color: #dedfe3;
  padding: 0 13px;
  cursor: pointer;
}

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

.format-option {
  display: grid;
  gap: 4px;
  padding: 16px 17px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 13px;
  background: #0d0e12;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.format-option input { position: absolute; opacity: 0; pointer-events: none; }
.format-option.selected { border-color: #ff554b; background: rgba(255, 66, 56, .07); }
.format-title { font-weight: 750; }
.format-note { color: #858791; font-size: .82rem; }
.password-wrap { margin-top: 16px; }

.rights {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
  color: #a9abb4;
  font-size: .9rem;
  line-height: 1.4;
  cursor: pointer;
}

.rights input { accent-color: #ff4238; width: 18px; height: 18px; flex: 0 0 auto; }

.primary {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 13px;
  background: #ff4238;
  color: white;
  padding: 0 20px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(255, 66, 56, .2);
  transition: transform .2s, background .2s, opacity .2s;
}

.primary:hover { background: #ff554b; transform: translateY(-1px); }
.primary:disabled { cursor: wait; opacity: .55; transform: none; }

.status {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: #0d0e12;
}

.status.error { border-color: rgba(255, 66, 56, .5); }
.status-top { display: flex; justify-content: space-between; gap: 20px; }
.status-top > div { min-width: 0; }
#status-label { display: block; margin-bottom: 5px; color: #8d8f99; font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
#video-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#percent { color: #ff675e; font-weight: 800; }
.track { height: 6px; margin: 18px 0 11px; overflow: hidden; border-radius: 99px; background: #25262c; }
.track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #ff4238; transition: width .35s ease; }
.status-meta { display: flex; justify-content: space-between; gap: 16px; color: #858791; font-size: .8rem; }
.download-link { margin-top: 18px; }
.limits { margin: 20px 0 0; color: #6f717a; text-align: center; font-size: .8rem; }

@media (max-width: 560px) {
  .shell { padding: 0; place-items: stretch; }
  .card { min-height: 100vh; border: 0; border-radius: 0; padding: 28px 20px 34px; }
  .brand { margin-bottom: 34px; }
  .format-grid { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.55rem, 14vw, 3.8rem); }
  .intro { margin: 20px 0 30px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
