:root {
  color-scheme: dark;
  --bg: #08090a;
  --bg-soft: #0d0f12;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f7fa;
  --text-soft: #b9c0ca;
  --text-muted: #777f8b;
  --accent: #5ea1ff;
  --accent-strong: #7db4ff;
  --accent-text: #05101f;
  --success: #42d392;
  --warning: #f4c76b;
  --danger: #ff6b6b;
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 20px 70px rgba(0, 0, 0, 0.42);
  --shadow-tight: 0 10px 30px rgba(0, 0, 0, 0.3);
  --font: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -12%, rgba(94, 161, 255, 0.12), transparent 36rem),
    linear-gradient(180deg, #0b0c0e 0%, var(--bg) 48%, #050607 100%);
  font-family: var(--font);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -18% -12%;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 18%, rgba(94, 161, 255, 0.045) 28%, transparent 42%),
    linear-gradient(65deg, transparent 52%, rgba(66, 211, 146, 0.035) 62%, transparent 74%);
  background-size: 160% 160%, 140% 140%;
  opacity: 0.75;
  transform: translateZ(0);
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 78%);
}

.ambient-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 0 24%, rgba(94, 161, 255, 0.07) 24.08% 24.2%, transparent 24.3% 100%),
    linear-gradient(112deg, transparent 0 67%, rgba(66, 211, 146, 0.045) 67.08% 67.18%, transparent 67.3% 100%);
}

.ambient-grid.active {
  animation: grid-drift 60s linear infinite;
}

@keyframes grid-drift {
  to {
    background-position: 144px 72px, 144px 72px;
  }
}

.site-header,
.home-layout,
.center-layout,
.result-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--accent-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent),
    var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), var(--shadow-tight);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 1rem;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-copy small {
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 620;
  text-transform: uppercase;
}

.header-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.server-pill,
.platform-strip span,
.flow-pill,
.section-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.server-pill span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(66, 211, 146, 0.12);
}

.server-pill.offline {
  color: #ffd8d8;
}

.server-pill.offline span {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(255, 107, 107, 0.13);
}

.platform-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-strip span {
  min-height: 30px;
  padding: 0 10px;
  color: var(--text-muted);
  background: transparent;
}

.platform-strip-mobile {
  display: none;
}

.home-layout {
  display: grid;
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: 24px 0 72px;
}

.download-console,
.process-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(10, 11, 13, 0.86);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.console-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 32px 34px 20px;
}

.console-head p,
.eyebrow,
.preview-copy p {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console-head h1,
.process-panel h1,
.preview-copy h1,
.preview-copy h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.08;
  letter-spacing: 0;
}

.console-head h1 {
  margin-top: 8px;
  font-size: 4.55rem;
  font-weight: 820;
}

.flow-pill {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.025);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 10px;
  padding: 0 34px 30px;
}

.url-box {
  position: relative;
  min-width: 0;
}

.url-box svg {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 21px;
  height: 21px;
  fill: var(--text-muted);
  transform: translateY(-50%);
  z-index: 1;
}

.url-box input {
  width: 100%;
  height: 58px;
  padding: 0 18px 0 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: none;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.url-box input::placeholder {
  color: rgba(185, 192, 202, 0.56);
}

.url-box input:focus {
  border-color: rgba(94, 161, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(94, 161, 255, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.primary-button,
.download-button,
.secondary-link,
.file-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 760;
}

.primary-button,
.download-button {
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  color: var(--accent-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent),
    var(--accent);
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(94, 161, 255, 0.18);
  transition: transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease;
}

.primary-button:hover:not(:disabled),
.download-button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 16px 36px rgba(94, 161, 255, 0.25);
}

.primary-button:active:not(:disabled),
.download-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(94, 161, 255, 0.16);
}

.primary-button svg,
.download-button svg,
.file-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: 0 0 auto;
}

.primary-button:disabled,
.download-button:disabled {
  cursor: not-allowed;
  filter: saturate(0.4);
  opacity: 0.58;
}

body.is-working #analyze-button:disabled {
  cursor: progress;
  filter: none;
  opacity: 1;
}

.status-message {
  margin: 0 34px 24px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  background: var(--surface);
}

.status-message.error {
  color: #ffd8d8;
  border-color: rgba(255, 107, 107, 0.42);
  background: rgba(255, 107, 107, 0.08);
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
  border-top: 1px solid var(--line);
}

.format-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 34px 34px;
  border-right: 1px solid var(--line);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 720;
}

.section-title span {
  color: var(--accent-strong);
  background: rgba(94, 161, 255, 0.08);
}

.format-list {
  display: grid;
  gap: 10px;
}

.photo-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 10px;
}

.photo-option {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  min-height: 126px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.photo-option:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.photo-option.is-selected {
  border-color: rgba(94, 161, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(94, 161, 255, 0.16), transparent 70%),
    var(--surface-strong);
  box-shadow: inset 0 0 0 1px rgba(94, 161, 255, 0.24);
}

.photo-thumb,
.photo-option-stack {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(94, 161, 255, 0.16), transparent),
    rgba(255, 255, 255, 0.04);
}

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

.photo-thumb span,
.photo-option-stack {
  color: var(--accent-strong);
  font-size: 1.35rem;
  font-weight: 860;
}

.photo-option strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-option small {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 780;
}

.photo-option-all {
  border-color: rgba(94, 161, 255, 0.22);
}

.format-option {
  position: relative;
  min-height: 68px;
}

.format-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.format-option > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.format-option > span::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 10px;
  height: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transform: translateY(-50%);
}

.format-option > span:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.format-option input:focus-visible + span {
  outline: 3px solid rgba(94, 161, 255, 0.18);
}

.format-option input:checked + span {
  border-color: rgba(94, 161, 255, 0.72);
  background:
    linear-gradient(90deg, rgba(94, 161, 255, 0.18), transparent 72%),
    var(--surface-strong);
  box-shadow: inset 0 0 0 1px rgba(94, 161, 255, 0.26);
}

.format-option input:checked + span::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(94, 161, 255, 0.14);
}

.media-format-list {
  gap: 10px;
}

.media-format-option {
  min-height: 82px;
}

.media-format-option > span {
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 82px;
  padding: 9px 40px 9px 9px;
}

.format-thumb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-xs);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(94, 161, 255, 0.16), transparent),
    rgba(255, 255, 255, 0.04);
}

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

.format-thumb span {
  color: var(--accent-strong);
  font-size: 1.1rem;
  font-weight: 860;
}

.format-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.format-copy small {
  justify-self: start;
  padding-right: 0;
}

.media-format-all .format-thumb {
  color: var(--accent-strong);
  background:
    linear-gradient(180deg, rgba(94, 161, 255, 0.18), transparent),
    rgba(255, 255, 255, 0.045);
}

.format-option strong,
.file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 720;
  line-height: 1.28;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.format-option strong {
  padding-right: 22px;
  font-size: 0.98rem;
}

.format-option small,
.file-size,
.file-meta,
.preview-copy span,
.progress-row {
  color: var(--text-soft);
}

.format-option small {
  justify-self: end;
  padding-right: 24px;
  color: var(--text-muted);
  white-space: nowrap;
}

.download-button {
  width: 100%;
  margin-top: 16px;
}

.media-preview {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(94, 161, 255, 0.09), transparent 22rem),
    rgba(255, 255, 255, 0.012);
}

.preview-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(94, 161, 255, 0.28), transparent),
    linear-gradient(315deg, rgba(66, 211, 146, 0.14), transparent),
    #11151a;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.55rem;
  font-weight: 900;
  box-shadow: var(--shadow-tight), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

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

.preview-copy {
  display: grid;
  gap: 9px;
}

.preview-copy h1,
.preview-copy h2 {
  font-size: 1.85rem;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.preview-copy span {
  line-height: 1.48;
}

.center-layout {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 94px);
  padding-bottom: 52px;
}

.center-layout.loading-layout {
  align-items: start;
  padding-top: 8px;
}

.process-panel {
  width: min(940px, 100%);
  padding: 0;
  text-align: left;
}

.loading-panel {
  overflow: hidden;
}

.loading-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: start;
  gap: 26px;
  padding: 28px 38px 22px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 72% 0%, rgba(94, 161, 255, 0.1), transparent 20rem),
    rgba(255, 255, 255, 0.012);
}

.loading-heading {
  min-width: 0;
}

.loading-percent {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 96px;
  border: 1px solid rgba(94, 161, 255, 0.32);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(94, 161, 255, 0.18), rgba(94, 161, 255, 0.055)),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--shadow-tight);
}

.loading-percent strong {
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  font-weight: 860;
  font-variant-numeric: tabular-nums;
}

.loading-percent span {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 780;
  text-transform: uppercase;
}

.job-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 38px 14px;
}

.job-rail span {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.job-rail span::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  opacity: 0.48;
}

.job-rail span:nth-child(2)::before {
  opacity: 0.6;
}

.job-rail span:nth-child(3)::before {
  opacity: 0.44;
}

@keyframes rail-pulse {
  0%,
  100% {
    transform: translateX(-110%);
    opacity: 0.35;
  }
  48% {
    transform: translateX(112%);
    opacity: 1;
  }
}

.process-panel h1 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.02;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.loading-progress-card {
  margin: 0 38px 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.024);
}

.wide-progress {
  position: relative;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.wide-progress div {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--success));
  box-shadow: 0 0 22px rgba(94, 161, 255, 0.24);
  transition: width 0.25s ease;
}

.wide-progress.indeterminate div {
  position: absolute;
  width: 36%;
  min-width: 118px;
  animation: progress-slide 2.6s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

@keyframes progress-slide {
  from {
    transform: translateX(-125%);
  }
  to {
    transform: translateX(300%);
  }
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.9rem;
}

.progress-row strong {
  color: var(--text);
  font-weight: 760;
  white-space: nowrap;
}

.loading-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 38px 14px;
}

.loading-stats div {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 66px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.loading-stats div:nth-child(1) {
  --item-index: 0;
}

.loading-stats div:nth-child(2) {
  --item-index: 1;
}

.loading-stats div:nth-child(3) {
  --item-index: 2;
}

.loading-stats span,
.log-panel-head p,
.log-time {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 780;
  text-transform: uppercase;
}

.loading-stats strong {
  min-width: 0;
  color: var(--text);
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-panel {
  margin: 0 38px 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(5, 6, 7, 0.36), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.024);
}

.log-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.log-panel-head p {
  margin: 0;
  color: var(--accent-strong);
}

.log-panel-head span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.log-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 150px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.log-entry {
  display: grid;
  grid-template-columns: 74px 10px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.026);
  overflow: hidden;
}

.log-dot {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--text-muted);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.035);
}

.log-entry.download .log-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(94, 161, 255, 0.12);
}

.log-entry.process .log-dot {
  background: var(--warning);
  box-shadow: 0 0 0 5px rgba(244, 199, 107, 0.1);
}

.log-entry.done .log-dot {
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(66, 211, 146, 0.11);
}

.log-entry.error .log-dot {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(255, 107, 107, 0.11);
}

.log-message {
  color: var(--text-soft);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.result-layout {
  padding: 34px 0 72px;
}

@media (min-width: 901px) {
  .site-header {
    width: calc(100% - 80px);
  }

  .center-layout.loading-layout {
    align-items: center;
    padding-top: 0;
  }

  .result-layout {
    display: grid;
    align-items: center;
    min-height: calc(100vh - 74px);
    padding: 24px 0 72px;
  }
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(330px, 0.86fr) minmax(0, 1.14fr);
}

.result-preview {
  border-right: 1px solid var(--line);
}

.files-panel {
  padding: 30px 28px;
}

.file-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.file-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.file-link:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 161, 255, 0.38);
  background:
    linear-gradient(90deg, rgba(94, 161, 255, 0.08), transparent 72%),
    var(--surface-strong);
}

.file-info {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.file-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 680;
}

.file-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.file-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(94, 161, 255, 0.42);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(94, 161, 255, 0.1);
  font-size: 0.9rem;
  font-weight: 760;
  box-shadow: none;
  transition: color 0.24s ease, background 0.24s ease, border-color 0.24s ease, transform 0.24s ease;
}

.file-link:hover .file-action {
  color: var(--accent-text);
  border-color: transparent;
  background: var(--accent);
}

.file-action svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.secondary-link {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(94, 161, 255, 0.075);
}

.secondary-link:hover {
  border-color: rgba(94, 161, 255, 0.45);
  background: rgba(94, 161, 255, 0.12);
}

.error-box {
  margin: 14px 0;
  padding: 13px 15px;
  border: 1px solid rgba(255, 107, 107, 0.42);
  border-radius: var(--radius-sm);
  color: #ffd8d8;
  background: rgba(255, 107, 107, 0.08);
  overflow-wrap: anywhere;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .site-header,
  .home-layout,
  .center-layout,
  .result-layout {
    width: min(100% - 24px, 720px);
  }

  .home-layout {
    display: block;
    min-height: auto;
    padding: 30px 0 72px;
  }

  .header-tools {
    gap: 8px;
  }

  .platform-strip-header {
    display: none;
  }

  .platform-strip-mobile {
    display: flex;
    padding: 0 24px 24px;
  }

  .console-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 28px 24px 18px;
  }

  .console-head h1 {
    font-size: 3.45rem;
  }

  .search-form,
  .analysis-grid,
  .result-panel {
    grid-template-columns: 1fr;
  }

  .loading-topline {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px 24px 22px;
  }

  .loading-percent {
    justify-items: start;
    place-items: start;
    align-content: center;
    min-height: auto;
    padding: 16px;
  }

  .job-rail,
  .loading-progress-card,
  .loading-stats,
  .log-panel {
    margin-left: 24px;
    margin-right: 24px;
  }

  .search-form {
    padding: 0 24px 18px;
  }

  .format-column,
  .media-preview,
  .files-panel {
    padding-left: 24px;
    padding-right: 24px;
  }

  .format-column,
  .result-preview {
    border-right: 0;
  }

  .media-preview {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 14px 0;
  }

  .brand-copy small,
  .flow-pill {
    display: none;
  }

  .server-pill {
    min-height: 30px;
    padding: 0 10px;
  }

  .home-layout,
  .result-layout {
    padding-top: 8px;
  }

  .console-head h1 {
    font-size: 3.05rem;
  }

  .preview-copy h1,
  .preview-copy h2 {
    font-size: 1.45rem;
  }

  .process-panel h1 {
    font-size: 2rem;
  }

  .primary-button,
  .download-button,
  .url-box input {
    min-height: 54px;
  }

  .url-box input {
    height: 54px;
    padding-right: 14px;
  }

  .format-option > span {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 5px;
    min-height: 72px;
  }

  .media-format-option > span {
    grid-template-columns: 58px minmax(0, 1fr);
    padding-right: 40px;
  }

  .format-option small {
    justify-self: start;
  }

  .process-panel {
    padding: 0;
  }

  .center-layout.loading-layout {
    padding-top: 8px;
  }

  .loading-topline {
    padding: 24px 20px 20px;
  }

  .loading-percent strong {
    font-size: 1.7rem;
  }

  .job-rail,
  .loading-progress-card,
  .loading-stats,
  .log-panel {
    margin-left: 20px;
    margin-right: 20px;
  }

  .loading-stats {
    grid-template-columns: 1fr;
  }

  .progress-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .log-entry {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .log-dot {
    display: none;
  }

  .file-link {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 12px;
  }

  .file-action {
    width: 100%;
  }

}

/* Motion layer */
.motion-ribbons {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.78), transparent 86%);
}

.motion-ribbons span {
  position: absolute;
  left: -18%;
  width: 138%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 161, 255, 0.08), rgba(66, 211, 146, 0.035), transparent);
  opacity: 0.28;
  transform: rotate(-16deg);
}

.motion-ribbons span:nth-child(1) {
  top: 18%;
}

.motion-ribbons span:nth-child(2) {
  top: 42%;
  opacity: 0.2;
}

.motion-ribbons span:nth-child(3) {
  top: 68%;
  opacity: 0.16;
}

.ambient-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0 36%, rgba(94, 161, 255, 0.045) 48%, transparent 62% 100%);
  opacity: 0.38;
  transform: translateX(-120%);
}

.download-console,
.process-panel,
.result-panel,
.primary-button,
.download-button,
.secondary-link,
.file-link,
.file-action,
.photo-option,
.format-option > span,
.preview-image,
.loading-progress-card,
.log-panel,
.job-rail span {
  position: relative;
}

.download-console,
.process-panel,
.result-panel,
.primary-button,
.download-button,
.secondary-link,
.file-link,
.photo-option,
.preview-image,
.loading-progress-card,
.log-panel,
.file-action {
  overflow: hidden;
}

.download-console::before,
.process-panel::before,
.result-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(94, 161, 255, 0.035), transparent 42%);
  opacity: 0.7;
  pointer-events: none;
}

.download-console::after,
.process-panel::after,
.result-panel::after,
.loading-progress-card::after,
.log-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    120deg,
    rgba(94, 161, 255, 0.08),
    rgba(255, 255, 255, 0.2),
    rgba(66, 211, 146, 0.1),
    rgba(94, 161, 255, 0.08)
  );
  background-size: 260% 260%;
  opacity: 0.28;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.download-console > *,
.process-panel > *,
.result-panel > *,
.loading-progress-card > *,
.log-panel > * {
  position: relative;
  z-index: 1;
}

.platform-strip span,
.url-box input,
.secondary-link {
  transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.platform-strip span:hover {
  color: var(--text);
  border-color: rgba(94, 161, 255, 0.34);
  background: rgba(94, 161, 255, 0.065);
  transform: translateY(-1px);
}

.platform-strip span:nth-child(1) {
  --item-index: 0;
  --motion-enter: enter-left;
}

.platform-strip span:nth-child(2) {
  --item-index: 1;
  --motion-enter: enter-pop;
}

.platform-strip span:nth-child(3) {
  --item-index: 2;
  --motion-enter: enter-down;
}

.platform-strip span:nth-child(4) {
  --item-index: 3;
  --motion-enter: enter-right;
}

.primary-button::before,
.download-button::before,
.file-link::after,
.photo-option::after,
.format-option > span::after,
.preview-image::before,
.file-action::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, 0.11) 45%, transparent 58% 100%);
  opacity: 0;
  transform: translateX(-82%);
  pointer-events: none;
}

.format-option > span::after,
.file-link::after,
.photo-option::after {
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 0 32%, rgba(255, 255, 255, 0.07) 45%, transparent 58% 100%);
}

.preview-image::before {
  z-index: 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 34%);
  opacity: 0.55;
  transform: none;
}

.preview-image::after {
  content: "";
  position: absolute;
  inset: auto 16px 14px 16px;
  z-index: 2;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  opacity: 0.28;
}

.preview-image img {
  transition: transform 0.65s ease, filter 0.65s ease;
}

.preview-image:hover img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.025);
}

.wide-progress::after {
  content: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  pointer-events: none;
}

.tap-ripple {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: tap-ripple 0.56s ease-out forwards;
}

.is-tilting {
  transform: perspective(1200px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
}

.is-preview-updated {
  animation: preview-pop 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.is-progress-pulse {
  animation: text-pulse 0.65s ease both;
}

.language-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 38px;
  border: 1px solid rgba(94, 161, 255, 0.34);
  border-radius: 999px;
  color: var(--accent-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026)),
    rgba(8, 9, 10, 0.78);
  box-shadow: var(--shadow-tight), 0 0 0 1px rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 860;
  letter-spacing: 0;
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.language-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 161, 255, 0.58);
  background:
    linear-gradient(180deg, rgba(94, 161, 255, 0.16), rgba(255, 255, 255, 0.035)),
    rgba(8, 9, 10, 0.84);
  box-shadow: var(--shadow-tight), 0 0 24px rgba(94, 161, 255, 0.16);
}

body.is-working .download-console,
body.is-working .process-panel {
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(94, 161, 255, 0.12);
}

#analyze-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 4px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(94, 161, 255, 0.18) 18%,
    rgba(94, 161, 255, 0.92) 34%,
    rgba(255, 255, 255, 1) 48%,
    rgba(66, 211, 146, 0.95) 62%,
    rgba(66, 211, 146, 0.18) 80%,
    transparent 100%
  );
  background-size: 190% 100%;
  background-position: 120% 0;
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

body.is-working #analyze-button {
  box-shadow:
    0 14px 34px rgba(94, 161, 255, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 24px rgba(94, 161, 255, 0.26);
  animation: analyze-button-glow 1.9s ease-in-out infinite;
}

body.is-working #analyze-button::after {
  opacity: 1;
  animation: analyze-contour-glow 1.45s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

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

@keyframes soft-rise {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes enter-left {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes enter-right {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes enter-scale {
  from {
    opacity: 0;
    transform: scale(0.988);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes enter-pop {
  0% {
    opacity: 0;
    transform: scale(0.975) translateY(6px);
  }
  58% {
    opacity: 1;
    transform: scale(1.004) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes enter-tilt-left {
  from {
    opacity: 0;
    transform: translateX(-10px) rotate(-0.5deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0);
  }
}

@keyframes enter-tilt-right {
  from {
    opacity: 0;
    transform: translateX(10px) rotate(0.5deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0);
  }
}

@keyframes border-sweep {
  0% {
    opacity: 0;
    transform: translateX(-40%);
  }
  42% {
    opacity: 0.16;
  }
  100% {
    opacity: 0;
    transform: translateX(40%);
  }
}

@keyframes ribbon-drift {
  from {
    transform: translateX(-14%) rotate(-16deg);
  }
  to {
    transform: translateX(14%) rotate(-16deg);
  }
}

@keyframes ambient-scan {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }
  20% {
    opacity: 0.34;
  }
  48%,
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes background-drift {
  0% {
    background-position: 0% 44%, 100% 50%;
  }
  100% {
    background-position: 100% 56%, 0% 50%;
  }
}

@keyframes frame-glow {
  0% {
    background-position: 0% 50%;
    opacity: 0.2;
  }
  50% {
    background-position: 100% 50%;
    opacity: 0.42;
  }
  100% {
    background-position: 0% 50%;
    opacity: 0.2;
  }
}

@keyframes mark-breathe {
  0%,
  100% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 30px rgba(94, 161, 255, 0.1);
    transform: translateY(-0.5px);
  }
}

@keyframes status-dot {
  0%,
  100% {
    box-shadow: 0 0 0 5px rgba(66, 211, 146, 0.12);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(66, 211, 146, 0.05);
  }
}

@keyframes shimmer-line {
  0% {
    opacity: 0;
    transform: translateX(-70%);
  }
  42% {
    opacity: 0.42;
  }
  100% {
    opacity: 0;
    transform: translateX(70%);
  }
}

@keyframes preview-sweep {
  0% {
    opacity: 0;
    transform: translateX(-82%);
  }
  34% {
    opacity: 0.18;
  }
  100% {
    opacity: 0;
    transform: translateX(82%);
  }
}

@keyframes preview-pop {
  0% {
    filter: saturate(0.96);
    transform: scale(0.992);
  }
  55% {
    filter: saturate(1.04);
    transform: scale(1.003);
  }
  100% {
    filter: saturate(1);
    transform: scale(1);
  }
}

@keyframes progress-sheen {
  to {
    transform: translateX(100%);
  }
}

@keyframes tap-ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(18);
  }
}

@keyframes text-pulse {
  0% {
    color: var(--accent-strong);
  }
  100% {
    color: var(--text-soft);
  }
}

@keyframes analyze-contour-glow {
  0% {
    background-position: 120% 0;
    filter: brightness(1) drop-shadow(0 0 0 rgba(94, 161, 255, 0));
  }
  42%,
  58% {
    filter: brightness(1.25) drop-shadow(0 0 12px rgba(94, 161, 255, 0.58));
  }
  100% {
    background-position: -120% 0;
    filter: brightness(1) drop-shadow(0 0 0 rgba(94, 161, 255, 0));
  }
}

@keyframes analyze-button-glow {
  0%,
  100% {
    box-shadow:
      0 14px 34px rgba(94, 161, 255, 0.3),
      0 0 0 1px rgba(255, 255, 255, 0.16),
      0 0 24px rgba(94, 161, 255, 0.24);
  }
  50% {
    box-shadow:
      0 16px 38px rgba(94, 161, 255, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.24),
      0 0 34px rgba(66, 211, 146, 0.28);
  }
}

@media (prefers-reduced-motion: no-preference) {
  body::before {
    animation: background-drift 22s ease-in-out infinite alternate;
  }

  .ambient-grid {
    animation: grid-drift 60s linear infinite;
  }

  .ambient-grid::before {
    animation: background-drift 28s ease-in-out infinite alternate-reverse;
  }

  .ambient-grid::after {
    animation: ambient-scan 12s ease-in-out infinite;
  }

  .download-console::after,
  .process-panel::after,
  .result-panel::after,
  .loading-progress-card::after,
  .log-panel::after {
    animation: frame-glow 9s ease-in-out infinite;
  }

  .motion-ribbons span {
    animation: none;
  }

  .motion-ribbons span:nth-child(2) {
    animation-duration: 16s;
    animation-delay: -4s;
  }

  .motion-ribbons span:nth-child(3) {
    animation-duration: 20s;
    animation-delay: -7s;
  }

  .motion-chrome-intro .site-header {
    animation: enter-down 0.78s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .download-console,
  .process-panel,
  .result-panel {
    animation: enter-scale 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .motion-chrome-intro .brand-mark {
    animation: mark-breathe 10s ease-in-out infinite;
  }

  .motion-chrome-intro .server-pill span {
    animation: status-dot 5s ease-in-out infinite;
  }

  .console-head {
    animation: enter-left 0.78s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .search-form {
    animation: enter-down 0.78s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.1s;
  }

  .flow-pill {
    animation: enter-right 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.16s;
  }

  .motion-chrome-intro .platform-strip-header span,
  .motion-chrome-intro .platform-strip-mobile span {
    animation: var(--motion-enter, enter-pop) 0.68s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--item-index, 0) * 70ms + 0.12s);
  }

  .format-column {
    animation: enter-left 0.76s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .media-preview {
    animation: enter-right 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.14s;
  }

  .result-preview {
    animation: enter-left 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .files-panel {
    animation: enter-right 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.12s;
  }

  .loading-topline {
    animation: enter-left 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .loading-percent {
    animation: enter-right 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.12s;
  }

  .process-panel .job-rail {
    animation: enter-down 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .process-panel .eyebrow,
  .process-panel h1 {
    animation: enter-left 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .process-panel h1 {
    animation-delay: 0.06s;
  }

  .loading-progress-card,
  .wide-progress,
  .progress-row {
    animation: enter-right 0.78s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.18s;
  }

  .loading-stats div {
    animation: enter-pop 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--item-index, 0) * 75ms + 0.2s);
  }

  .log-panel {
    animation: enter-left 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.22s;
  }

  .log-entry {
    animation: enter-right 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--item-index, 0) * 35ms);
  }

  .analysis-grid:not(.hidden) .format-option {
    animation-name: var(--motion-enter, soft-rise);
    animation-duration: 0.68s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: both;
    animation-delay: calc(var(--item-index, 0) * 58ms);
  }

  .analysis-grid:not(.hidden) .photo-option {
    animation: enter-pop 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--item-index, 0) * 45ms);
  }

  .file-link {
    animation-name: var(--motion-enter, soft-rise);
    animation-duration: 0.62s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: both;
    animation-delay: calc(var(--item-index, 0) * 55ms);
  }

  .primary-button:hover:not(:disabled)::before,
  .download-button:hover:not(:disabled)::before {
    animation: shimmer-line 1.1s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .motion-ribbons {
    display: none;
  }

  body::before,
  .ambient-grid::after,
  .download-console::after,
  .process-panel::after,
  .result-panel::after,
  .loading-progress-card::after,
  .log-panel::after {
    animation: none !important;
  }
}

@media (max-width: 560px) {
  .language-toggle {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 36px;
  }
}

.motion-ribbons span {
  left: 0;
  width: 100%;
  background-size: 220% 100%;
  transform: none;
}

@keyframes ribbon-flow {
  from {
    background-position: 220% 0;
  }
  to {
    background-position: -220% 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .motion-ribbons span {
    animation: none;
  }
}
