:root {
  color-scheme: dark;
  --bg: #050506;
  --bg-2: #0b0b0d;
  --surface: #111114;
  --surface-2: #18181d;
  --surface-3: #202027;
  --line: rgba(255, 255, 255, 0.12);
  --soft-line: rgba(255, 255, 255, 0.07);
  --text: #f7f7f8;
  --muted: #adadb8;
  --muted-2: #7f808a;
  --red: #ff1f2f;
  --red-2: #c50916;
  --green: #32d27a;
  --yellow: #ffcb47;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 31, 47, 0.18), transparent 28%),
    linear-gradient(180deg, #050506 0%, #09090b 48%, #040405 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(180deg, #ff2737, #d80d1a);
  box-shadow: 0 14px 34px rgba(255, 31, 47, 0.25);
  cursor: pointer;
  font-weight: 850;
}

button:hover {
  filter: brightness(1.08);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ghost {
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  text-decoration: underline;
}

.app-shell {
  min-height: 100vh;
}

.public-page {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 72px) 56px;
}

.public-nav,
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 950;
  letter-spacing: 0;
}

.brand img {
  width: 190px;
  height: 50px;
  object-fit: contain;
  object-position: left center;
}

.public-nav nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  flex-wrap: wrap;
}

.public-nav a,
.footer-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 750;
}

.public-nav a:hover,
.footer-links a:hover {
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(520px, 1.08fr);
  gap: clamp(34px, 6vw, 86px);
  align-items: center;
  padding: clamp(58px, 8vw, 110px) 0 46px;
}

.pill,
.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(3rem, 6.2vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  color: var(--muted);
}

.hero .lead {
  max-width: 720px;
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 12px;
}

.public-action {
  border: 1px solid var(--line);
  background: rgba(18, 18, 22, 0.82);
  border-radius: 8px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow);
}

.public-action h2 {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 3vw, 2.7rem);
}

.public-action p,
.hint {
  color: var(--muted);
  line-height: 1.55;
}

.stack {
  display: grid;
  gap: 16px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  color: #f4f4f6;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  outline: none;
}

textarea {
  min-height: 180px;
  padding: 14px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 31, 47, 0.75);
}

.upload-drop {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.035);
  display: grid;
  gap: 12px;
}

.upload-drop.dragging {
  border-color: var(--red);
  background: rgba(255, 31, 47, 0.08);
}

.upload-drop input[type="file"] {
  display: none;
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress > span,
.progress > div {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ff6670);
  transition: width 0.25s ease;
}

.feature-band,
.info-section {
  border-top: 1px solid var(--soft-line);
  padding: 46px 0;
}

.feature-grid,
.pricing-grid,
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card,
.metric-card,
.tool-card,
.project-card,
.clip-card,
.export-row,
.history-row,
.plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 17, 20, 0.8);
  padding: 20px;
}

.card h3,
.tool-card h3,
.plan-card h3 {
  margin: 0 0 10px;
}

.card p,
.tool-card p,
.plan-card p {
  color: var(--muted);
  line-height: 1.55;
}

.plan-card.featured {
  border-color: rgba(255, 31, 47, 0.55);
  background: linear-gradient(180deg, rgba(255, 31, 47, 0.12), rgba(17, 17, 20, 0.9));
}

.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  border-top: 1px solid var(--soft-line);
  padding-top: 26px;
}

.dashboard-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px 1fr;
  background: #070708;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(13, 13, 15, 0.96);
  padding: 24px 18px;
  overflow: auto;
}

.sidebar .brand {
  margin-bottom: 24px;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 850;
}

.side-nav a.active,
.side-nav a:hover {
  color: #fff;
  background: rgba(255, 31, 47, 0.14);
}

.dash-main {
  min-width: 0;
  padding: 22px clamp(18px, 3vw, 42px) 42px;
}

.dash-topbar {
  min-height: 72px;
  border-bottom: 1px solid var(--soft-line);
  margin-bottom: 28px;
  padding-bottom: 18px;
}

.dash-search {
  max-width: 460px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red), #6f070d);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 950;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

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

.metric-card span {
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  gap: 18px;
}

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

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.table th,
.table td {
  border-bottom: 1px solid var(--soft-line);
  padding: 14px 10px;
  color: var(--muted);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: #fff;
  font-size: 0.85rem;
}

.table strong {
  color: #fff;
}

.workspace-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 17, 20, 0.78);
  padding: clamp(18px, 2.4vw, 26px);
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
}

.result-panel {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c0c0e;
  padding: 20px;
}

.video-preview {
  min-height: 300px;
  border-radius: 8px;
  border: 1px solid var(--soft-line);
  background:
    linear-gradient(135deg, rgba(255, 31, 47, 0.18), transparent 42%),
    #09090b;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

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

.track {
  position: relative;
  height: 44px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.track span {
  display: block;
  height: 100%;
  width: 68%;
  background: linear-gradient(90deg, rgba(255, 31, 47, 0.62), rgba(255, 255, 255, 0.12));
}

.score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(50, 210, 122, 0.12);
  color: var(--green);
  font-weight: 900;
}

.score.medium {
  background: rgba(255, 203, 71, 0.12);
  color: var(--yellow);
}

.score.low {
  background: rgba(255, 31, 47, 0.12);
  color: #ff8a92;
}

.clips-grid,
.exports-grid,
.history-grid {
  display: grid;
  gap: 12px;
}

.clip-card {
  display: grid;
  gap: 10px;
}

.clip-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 31, 47, 0.2), transparent),
    #09090b;
  border: 1px solid var(--soft-line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tabs button {
  min-height: 38px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.tabs button.active {
  background: rgba(255, 31, 47, 0.2);
  border-color: rgba(255, 31, 47, 0.45);
}

.empty,
.notice,
.error {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 18px;
  color: var(--muted);
}

.notice {
  border-color: rgba(255, 203, 71, 0.36);
  background: rgba(255, 203, 71, 0.08);
}

.error {
  border-color: rgba(255, 31, 47, 0.45);
  background: rgba(255, 31, 47, 0.08);
  color: #ffc7cb;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
}

.modal.show {
  display: flex;
}

.auth-card {
  width: min(620px, 100%);
  max-height: min(860px, 92vh);
  overflow: auto;
  border: 1px solid rgba(255, 31, 47, 0.45);
  border-radius: 8px;
  background: linear-gradient(145deg, #111114, #171217);
  padding: clamp(22px, 4vw, 42px);
  box-shadow: var(--shadow);
}

.auth-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.auth-card h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.check {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
}

.check input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .hero,
  .tool-layout,
  .two-col {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .pricing-grid,
  .steps-grid,
  .dash-grid,
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }
}

@media (max-width: 720px) {
  .public-nav,
  .dash-topbar,
  .page-head,
  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .input-row,
  .feature-grid,
  .pricing-grid,
  .steps-grid,
  .dash-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .brand img {
    width: 160px;
  }

  .hero h1 {
    font-size: 3rem;
  }
}
