# YTMP4 homepage styles
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  margin-left: auto;
}
.topbar-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.lang-menu {
  position: relative;
  flex-shrink: 0;
}
.auth-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.auth-nav[hidden] { display: none !important; }
.auth-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease;
}
.auth-link:hover { color: var(--text); background: color-mix(in srgb, var(--surface-2) 70%, transparent); text-decoration: none; }
.auth-link-accent {
  color: #fff;
  background: linear-gradient(135deg, var(--cta), var(--cta-hover));
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.28);
}
.auth-link-accent:hover { color: #fff; filter: brightness(1.05); }
.auth-user-menu { position: relative; flex-shrink: 0; display: flex; align-items: center; }
.auth-user-menu[hidden] { display: none !important; }
.auth-user-icon { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; fill: none; }
.auth-user-chevron { width: 14px; height: 14px; flex-shrink: 0; stroke: currentColor; fill: none; opacity: 0.75; }
.auth-username {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 96px;
  line-height: 1;
  color: inherit;
}
.auth-account-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  box-shadow: 0 16px 32px rgba(2, 10, 28, 0.45);
  padding: 8px;
  z-index: 10000;
}
.auth-account-dropdown.open { display: block; }
.auth-menu-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font-family: inherit;
}
.auth-menu-item:hover {
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  text-decoration: none;
  color: var(--text);
}
.auth-menu-item.accent {
  color: var(--cyan);
}
.auth-menu-item.danger {
  color: var(--muted);
}
.auth-menu-divider {
  height: 1px;
  margin: 6px 0;
  background: color-mix(in srgb, var(--border) 70%, transparent);
}
.auth-menu-item[hidden],
.auth-menu-divider[hidden] { display: none !important; }
body.user-premium .ad-slot,
body.user-premium .ad-sticky,
body.user-premium .ad-interstitial { display: none !important; }
.quality-label { margin: 0 0 4px; font-size: 0.82rem; color: var(--muted); font-weight: 600; text-align: center; }
.quality-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.quality-tag.free { background: rgba(59, 226, 180, 0.15); color: var(--ok); }
.quality-tag.pro { background: rgba(2, 200, 255, 0.15); color: var(--cyan); }
.action-btn-hd {
  background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 22%, var(--surface-2)), color-mix(in srgb, var(--blue) 18%, var(--surface-2)));
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--cyan) 35%, var(--border));
  box-shadow: 0 8px 22px rgba(2, 200, 255, 0.12);
}
.icon-btn { width:38px; height:38px; border-radius:11px; border:1px solid var(--border); background:rgba(13,25,54,.75); color:#9ec2ff; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; transition:transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.icon-btn:hover { transform:translateY(-1px); border-color:#4e9dff; background:rgba(15,31,69,.85); }
.icon-btn svg { width:17px; height:17px; stroke:currentColor; }
.auth-user-btn.icon-btn {
  width: auto;
  min-width: 38px;
  max-width: 176px;
  height: 38px;
  padding: 0 10px 0 8px;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  justify-content: flex-start;
  flex-shrink: 0;
}
.auth-user-btn.icon-btn.open {
  border-color: #4e9dff;
  background: rgba(15, 31, 69, 0.85);
}
body.light .icon-btn,
body.light .auth-user-btn.icon-btn {
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  color: var(--blue);
  border-color: var(--border);
}
body.light .icon-btn:hover,
body.light .auth-user-btn.icon-btn:hover,
body.light .auth-user-btn.icon-btn.open {
  border-color: var(--cyan);
  background: color-mix(in srgb, var(--surface-2) 90%, transparent);
}
.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 210px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  box-shadow: 0 16px 32px rgba(2, 10, 28, 0.45);
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 10000;
}
.lang-dropdown.open { opacity:1; transform:translateY(0) scale(1); pointer-events:auto; }
.lang-option { width:100%; border:0; background:transparent; color:var(--text); padding:9px 10px; border-radius:9px; font-size:.9rem; text-align:left; cursor:pointer; transition:background 140ms ease,color 140ms ease; }
.lang-option:hover,.lang-option.active { background:color-mix(in srgb,var(--button) 18%,transparent); }

.hero { width:min(1100px,94vw); margin:0 auto; text-align:center; padding:56px 0 24px; position:relative; z-index:1; }
.hero h1 { margin:0; font-size:clamp(2.2rem,5.6vw,3.6rem); line-height:1.08; letter-spacing:-0.03em; font-weight:700; font-family:var(--font-display); background:linear-gradient(90deg, var(--text) 20%, var(--cyan) 100%); -webkit-background-clip:text; background-clip:text; color:transparent; }
.search-wrap { margin:24px auto 0; width:min(760px,100%); border-radius:var(--radius-lg); border:1px solid var(--border); background:var(--surface-glass); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); box-shadow:var(--shadow); padding:10px; position:relative; z-index:1; }
.converter-form { display:grid; grid-template-columns:1fr auto; gap:8px; }
.input { width:100%; border:1px solid transparent; background:var(--surface-2); color:var(--text); border-radius:12px; padding:13px 14px; outline:none; font-size:.98rem; }
.input::placeholder { color:#7287bb; }
.input:focus { border-color:#2e96ff; box-shadow:0 0 0 4px var(--ring); }
.btn { border:0; background:linear-gradient(135deg, var(--cta), var(--cta-hover)); color:#fff; font-weight:700; border-radius:12px; min-width:56px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; transition:transform 180ms ease, filter 180ms ease; }
.btn:hover { transform:translateY(-1px); filter:brightness(1.05); }
.btn svg { width:20px; height:20px; stroke:currentColor; }

.loading-wrap { margin:18px auto 0; display:none; align-items:center; justify-content:center; gap:12px; color:var(--muted); }
.loading-wrap.active { display:flex; }
.spinner { width:42px; height:42px; border-radius:50%; border:4px solid color-mix(in srgb,var(--button) 22%, transparent); border-top-color:var(--button); animation:spin .9s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

.results-list { display:none; margin:16px auto 0; width:min(760px,100%); gap:10px; }
.results-list.show { display:grid; }
.result-card { text-align:left; border:1px solid var(--border); border-radius:14px; background:color-mix(in srgb,var(--surface) 86%, transparent); overflow:hidden; transform:translateY(8px); opacity:0; transition:opacity 220ms ease, transform 220ms ease; display:grid; grid-template-columns:160px 1fr; }
.result-card.show { opacity:1; transform:translateY(0); }
.thumb { width:100%; height:100%; min-height:90px; object-fit:cover; display:block; }
.result-content { padding:12px 14px; }
.result-title { margin:0 0 6px; font-size:1rem; line-height:1.35; }
.result-meta { color:var(--muted); font-size:.85rem; margin-bottom:10px; }
.download-actions { display:flex; gap:8px; flex-wrap:wrap; }
.dl-btn { border:1px solid var(--border); background:var(--surface-2); color:var(--text); border-radius:10px; padding:8px 12px; cursor:pointer; font-weight:600; transition:transform .18s ease,border-color .18s ease; }
.dl-btn:hover { transform:translateY(-1px); border-color:#4ea0ff; }

.progress-wrap { margin-top:12px; display:none; }
.progress-wrap.active { display:block; }
.progress-head { display:flex; justify-content:space-between; font-size:.84rem; color:var(--muted); margin-bottom:6px; }
.progress-bar { width:100%; height:9px; border-radius:999px; background:color-mix(in srgb,var(--surface-2) 70%, transparent); overflow:hidden; border:1px solid color-mix(in srgb,var(--border) 80%, transparent); }
.progress-value { height:100%; width:0%; border-radius:999px; background:linear-gradient(90deg,var(--cyan),var(--ok)); transition:width 280ms ease; }

.video-panel { display:none; margin:16px auto 0; width:min(820px,100%); text-align:left; border:1px solid var(--border); border-radius:18px; background:color-mix(in srgb,var(--surface) 94%, #fff 6%); overflow:hidden; animation:fadeUp .35s ease; box-shadow:0 16px 40px rgba(0,8,24,.35); }
.video-panel.show { display:block; }
.preview-layout { display:grid; grid-template-columns:minmax(220px,1fr) minmax(220px,280px); gap:16px; padding:16px; align-items:start; }
.preview-stack { grid-template-columns:1fr; max-width:560px; margin:0 auto; }
.preview-stack .actions-col { padding-top:4px; }
.player-col { min-width:0; }
.thumb-frame { position:relative; width:100%; max-width:560px; margin:0 auto; aspect-ratio:16/9; border-radius:14px; overflow:hidden; background:#0a1020; border:1px solid color-mix(in srgb,var(--border) 70%, transparent); box-shadow:0 10px 28px rgba(0,8,24,.28); }
.video-thumb { width:100%; height:100%; object-fit:cover; display:block; }
.video-title { margin:12px 0 4px; font-size:1rem; line-height:1.35; text-align:center; font-weight:700; }
.video-channel { margin:0; color:var(--muted); font-size:.84rem; text-align:center; }
.actions-col { display:flex; flex-direction:column; gap:10px; padding-top:8px; }
.action-btn { width:100%; border:0; border-radius:12px; padding:14px 16px; font-weight:700; font-size:.95rem; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; transition:transform .18s ease, filter .18s ease, opacity .18s ease; box-sizing:border-box; text-decoration:none; }
button.action-btn { font-family:inherit; }
button.action-btn:disabled { opacity:.55; cursor:not-allowed; transform:none; }
.action-btn svg { width:18px; height:18px; stroke:currentColor; fill:none; }
.action-btn.primary { background:linear-gradient(135deg, var(--cta), var(--cta-hover)); color:#fff; box-shadow:0 8px 22px rgba(225, 29, 72,.35); }
.action-btn.secondary { background:color-mix(in srgb,var(--blue) 22%, var(--surface-2)); color:var(--text); border:1px solid var(--border); }
.action-btn.ghost { background:color-mix(in srgb,var(--surface-2) 88%, transparent); color:var(--muted); border:1px solid var(--border); }
.action-btn:hover:not(:disabled) { transform:translateY(-1px); filter:brightness(1.04); }
.action-btn:disabled { opacity:.6; cursor:not-allowed; transform:none; }
.panel-download-progress { display:none; margin-top:14px; padding:14px 16px; border-radius:14px; border:1px solid color-mix(in srgb,var(--border) 75%, transparent); background:color-mix(in srgb,var(--surface-2) 55%, transparent); }
.panel-download-progress.active { display:block; animation:fadeUp .35s ease; }
.panel-progress-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; font-size:.84rem; }
.panel-progress-title { color:var(--text); font-weight:600; }
.panel-progress-pct { color:var(--cyan); font-weight:700; font-variant-numeric:tabular-nums; min-width:2.5rem; text-align:right; }
.panel-progress-bar { position:relative; height:10px; border-radius:999px; background:color-mix(in srgb,var(--surface-2) 85%, transparent); overflow:hidden; border:1px solid color-mix(in srgb,var(--border) 65%, transparent); }
.panel-progress-value { position:relative; z-index:1; height:100%; width:0%; border-radius:999px; background:linear-gradient(90deg,var(--cta),var(--cyan),var(--ok)); background-size:200% 100%; animation:progressShimmer 1.4s linear infinite; transition:width .45s cubic-bezier(.22,1,.36,1); box-shadow:0 0 16px color-mix(in srgb,var(--cyan) 50%, transparent); }
.panel-progress-glow { position:absolute; inset:0; background:linear-gradient(90deg,transparent,rgba(255,255,255,.18),transparent); transform:translateX(-100%); animation:progressGlow 1.8s ease-in-out infinite; pointer-events:none; }
.panel-progress-label { margin:8px 0 0; font-size:.8rem; color:var(--muted); text-align:center; }
@keyframes progressShimmer { 0% { background-position:100% 0; } 100% { background-position:-100% 0; } }
@keyframes progressGlow { 0% { transform:translateX(-100%); opacity:0; } 40% { opacity:1; } 100% { transform:translateX(200%); opacity:0; } }
@keyframes fadeUp { from { opacity:0; transform:translateY(8px);} to { opacity:1; transform:translateY(0);} }
.status { margin-top:0; min-height:0; color:#ff5d79; font-size:.9rem; line-height:1.4; }
.status .download-fallback-link { color:var(--cyan); font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.status .download-fallback-link:hover { color:var(--ok); }
body.guard-modal-open { overflow:hidden; }

.guard-overlay {
  display:none;
  position:fixed;
  inset:0;
  z-index:1350;
  background:rgba(4,10,24,.82);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  align-items:center;
  justify-content:center;
  padding:20px;
  animation:guardFadeIn 320ms ease;
}
.guard-overlay.show { display:flex; }
.guard-overlay[hidden] { display:none !important; }
.guard-overlay.show[hidden] { display:flex !important; }

@keyframes guardFadeIn {
  from { opacity:0; }
  to { opacity:1; }
}
@keyframes guardCardIn {
  from { opacity:0; transform:translateY(16px) scale(0.98); }
  to { opacity:1; transform:translateY(0) scale(1); }
}

.guard-card-wrap {
  width:min(460px,100%);
  animation:guardCardIn 420ms cubic-bezier(0.22,1,0.36,1);
}
.guard-card {
  border-radius:18px;
  border:1px solid color-mix(in srgb,var(--cyan) 32%, var(--border));
  background:
    radial-gradient(420px circle at 100% 0%, rgba(225,29,72,.1), transparent 55%),
    linear-gradient(165deg, color-mix(in srgb,var(--surface-solid) 94%, #0a1838 6%), var(--surface-solid));
  padding:0;
  overflow:hidden;
  text-align:center;
  box-shadow:0 28px 64px rgba(0,8,24,.58), 0 0 0 1px rgba(56,189,248,.1);
}
.guard-header {
  position:relative;
  padding:20px 22px 14px;
  background:
    linear-gradient(135deg, rgba(225,29,72,.14) 0%, rgba(56,189,248,.08) 55%, transparent 100%),
    color-mix(in srgb, var(--surface-2) 55%, transparent);
  border-bottom:1px solid color-mix(in srgb, var(--border) 75%, transparent);
}
.guard-header-band {
  display:flex;
  justify-content:center;
  margin-bottom:14px;
}
.guard-mock-window {
  width:148px;
  border-radius:10px;
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
  background:var(--surface-solid);
  box-shadow:0 10px 28px rgba(0,8,24,.22);
  overflow:hidden;
  animation:guardWindowFloat 4s ease-in-out infinite;
}
@keyframes guardWindowFloat {
  0%, 100% { transform:translateY(0); }
  50% { transform:translateY(-4px); }
}
.guard-mock-bar {
  display:flex;
  align-items:center;
  gap:5px;
  padding:7px 10px;
  background:color-mix(in srgb, var(--surface-2) 80%, transparent);
  border-bottom:1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.guard-mock-bar span {
  width:7px;
  height:7px;
  border-radius:50%;
  background:color-mix(in srgb, var(--muted) 45%, transparent);
}
.guard-mock-bar span:first-child { background:#f87171; }
.guard-mock-bar span:nth-child(2) { background:#fbbf24; }
.guard-mock-bar span:nth-child(3) { background:#34d399; }
.guard-mock-content {
  position:relative;
  height:56px;
  display:grid;
  place-items:center;
  padding:8px;
}
.guard-mock-ad {
  width:100%;
  height:100%;
  border-radius:6px;
  border:1px dashed color-mix(in srgb, var(--muted) 50%, transparent);
  background:repeating-linear-gradient(
    -45deg,
    color-mix(in srgb, var(--surface-2) 70%, transparent),
    color-mix(in srgb, var(--surface-2) 70%, transparent) 6px,
    color-mix(in srgb, var(--surface-2) 45%, transparent) 6px,
    color-mix(in srgb, var(--surface-2) 45%, transparent) 12px
  );
  display:grid;
  place-items:center;
}
.guard-mock-ad span {
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.14em;
  color:color-mix(in srgb, var(--muted) 75%, transparent);
}
.guard-mock-slash {
  position:absolute;
  inset:14px 12px;
  border-radius:4px;
  background:linear-gradient(135deg, transparent 46%, var(--cta) 48%, var(--cta) 52%, transparent 54%);
  opacity:.92;
  animation:guardSlashPulse 2.2s ease-in-out infinite;
}
@keyframes guardSlashPulse {
  0%, 100% { opacity:.75; }
  50% { opacity:1; }
}
.guard-header-status {
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:6px 14px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--text);
  background:color-mix(in srgb, var(--cta) 12%, var(--surface-solid));
  border:1px solid color-mix(in srgb, var(--cta) 28%, var(--border));
}
.guard-pulse-dot {
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--cta);
  box-shadow:0 0 0 0 rgba(225,29,72,.45);
  animation:guardDotPulse 1.8s ease-out infinite;
}
@keyframes guardDotPulse {
  0% { box-shadow:0 0 0 0 rgba(225,29,72,.45); }
  70% { box-shadow:0 0 0 8px rgba(225,29,72,0); }
  100% { box-shadow:0 0 0 0 rgba(225,29,72,0); }
}
.guard-body {
  padding:18px 22px 22px;
}
.guard-card h3 {
  margin:0 0 10px;
  font-size:1.22rem;
  font-family:var(--font-display);
  letter-spacing:-0.02em;
}
.guard-lead {
  margin:0 0 14px;
  color:var(--muted);
  font-size:.92rem;
  line-height:1.55;
}
.guard-lead strong { color:var(--text); }
.guard-steps {
  margin:0 0 18px;
  padding:14px 16px 14px 28px;
  border-radius:12px;
  background:color-mix(in srgb,var(--surface-2) 72%, transparent);
  border:1px solid var(--border);
  text-align:left;
  color:var(--muted);
  font-size:.86rem;
  line-height:1.55;
}
.guard-steps li { margin-bottom:8px; }
.guard-steps li:last-child { margin-bottom:0; }
.guard-steps strong { color:var(--text); }
.guard-actions {
  display:grid;
  gap:8px;
}
.guard-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  border-radius:12px;
  padding:13px 16px;
  font-weight:700;
  font-size:.92rem;
  font-family:inherit;
  cursor:pointer;
  text-decoration:none;
  transition:transform 180ms ease, filter 180ms ease, background 180ms ease;
  box-sizing:border-box;
}
.guard-btn:hover { transform:translateY(-1px); }
.guard-btn.primary {
  border:0;
  background:linear-gradient(135deg, var(--cta), var(--cta-hover));
  color:#fff;
  box-shadow:0 8px 22px rgba(225,29,72,.32);
}
.guard-btn.secondary {
  border:1px solid color-mix(in srgb,var(--cyan) 35%, var(--border));
  background:color-mix(in srgb,var(--cyan) 10%, var(--surface-2));
  color:var(--text);
}
.guard-btn.ghost {
  border:0;
  background:transparent;
  color:var(--muted);
  padding:8px;
  font-weight:600;
  font-size:.84rem;
}
.guard-btn.ghost:hover { color:var(--text); transform:none; }
.guard-status {
  margin: 12px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}
.guard-status.is-error { color: var(--error); }
body.user-premium .guard-overlay { display:none !important; }

.popup-tip-overlay {
  display:none;
  position:fixed;
  inset:0;
  z-index:1200;
  background:rgba(4,10,24,.72);
  align-items:center;
  justify-content:center;
  padding:20px;
}
.popup-tip-overlay.show { display:flex; }
.popup-tip-card {
  width:min(400px,100%);
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--surface);
  padding:20px 18px;
  text-align:center;
  box-shadow:0 20px 50px rgba(0,8,24,.5);
}
.popup-tip-card h3 { margin:0 0 8px; font-size:1.05rem; }
.popup-tip-card p { margin:0 0 14px; color:var(--muted); font-size:.9rem; line-height:1.45; }
.popup-tip-card button {
  border:0;
  border-radius:10px;
  padding:10px 18px;
  font-weight:700;
  cursor:pointer;
  background:linear-gradient(135deg, var(--cta), var(--cta-hover));
  color:#fff;
}
.daily-limit-overlay {
  display:none;
  position:fixed;
  inset:0;
  z-index:1300;
  background:rgba(4,10,24,.78);
  align-items:center;
  justify-content:center;
  padding:20px;
}
.daily-limit-overlay.show { display:flex; }
.daily-limit-card {
  width:min(420px,100%);
  border-radius:18px;
  border:1px solid color-mix(in srgb,var(--cyan) 35%, var(--border));
  background:linear-gradient(165deg, color-mix(in srgb,var(--surface) 92%, #0a1838 8%), var(--surface));
  padding:24px 22px 20px;
  text-align:center;
  box-shadow:0 24px 60px rgba(0,8,24,.55), 0 0 0 1px rgba(2,200,255,.08);
}
.daily-limit-badge {
  display:inline-block;
  margin:0 0 10px;
  padding:5px 12px;
  border-radius:999px;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--cyan);
  background:color-mix(in srgb,var(--cyan) 12%, transparent);
  border:1px solid color-mix(in srgb,var(--cyan) 28%, transparent);
}
.daily-limit-card h3 { margin:0 0 8px; font-size:1.2rem; }
.daily-limit-card p { margin:0 0 10px; color:var(--muted); font-size:.92rem; line-height:1.5; }
.daily-limit-reset { font-size:.82rem !important; margin-bottom:16px !important; opacity:.9; }
.daily-limit-features {
  margin:0 0 18px;
  padding:12px 14px;
  border-radius:12px;
  background:color-mix(in srgb,var(--surface-2) 70%, transparent);
  border:1px solid var(--border);
  text-align:left;
  list-style:none;
}
.daily-limit-features li {
  margin:0;
  padding:6px 0 6px 22px;
  position:relative;
  color:var(--text);
  font-size:.88rem;
}
.daily-limit-features li::before {
  content:"";
  position:absolute;
  left:0;
  top:11px;
  width:10px;
  height:10px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--cyan),var(--blue));
}
.daily-limit-actions { display:flex; flex-direction:column; gap:8px; }
.daily-limit-cta {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:12px;
  padding:13px 18px;
  font-weight:800;
  font-size:.95rem;
  font-family:inherit;
  text-decoration:none;
  cursor:pointer;
  width:100%;
  background:linear-gradient(135deg, var(--cta), var(--cta-hover));
  color:#fff;
  box-shadow:0 10px 28px rgba(225, 29, 72,.4);
  transition:transform .18s ease, filter .18s ease;
}
.daily-limit-cta:hover { transform:translateY(-1px); filter:brightness(1.05); }
.daily-limit-dismiss {
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:.86rem;
  cursor:pointer;
  padding:8px;
}
.daily-limit-dismiss:hover { color:var(--text); }
.daily-limit-close {
  position:absolute;
  top:14px;
  right:14px;
  width:32px;
  height:32px;
  border:1px solid var(--border);
  border-radius:9px;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-size:1.1rem;
  line-height:1;
}
.daily-limit-card-wrap { position:relative; width:min(420px,100%); }
.results-actions { margin-top:12px; display:none; justify-content:center; gap:10px; flex-wrap:wrap; }
.results-actions.show { display:flex; }
.ghost-btn {
  border:1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 84%, transparent);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease;
}
.ghost-btn:hover { transform: translateY(-1px); border-color: #4ea0ff; }
.result-card.compact { opacity: .16; filter: saturate(.5); pointer-events: none; }
.seo-block {
  width: min(860px, 94vw);
  margin: 18px auto 0;
  text-align: left;
  color: var(--muted);
  line-height: 1.72;
  font-size: 0.98rem;
}
.seo-block h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.3px;
  text-align: center;
}
.seo-block p {
  margin: 0 0 14px;
}
.why-block {
  width: min(960px, 94vw);
  margin: 26px auto 40px;
  padding: 28px 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(8, 17, 38, 0.95), rgba(5, 12, 28, 0.95));
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(130, 162, 240, 0.08),
    0 20px 42px rgba(1, 6, 18, 0.46);
}
.why-block h2 {
  margin: 0 0 16px;
  text-align: center;
  color: var(--text);
  font-size: clamp(1.45rem, 2.9vw, 2.1rem);
  letter-spacing: -0.4px;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.why-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17, 30, 63, 0.88), rgba(13, 23, 50, 0.88));
  border-radius: 14px;
  padding: 14px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.why-card:hover {
  transform: translateY(-2px);
}
.why-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  background: color-mix(in srgb, var(--cyan) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent);
  color: var(--cyan);
}
.why-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}
.why-card h3 {
  margin: 0 0 7px;
  font-size: 1rem;
  color: var(--text);
}
.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.why-card.c1 { border-color: rgba(46, 214, 161, 0.42); box-shadow: 0 8px 24px rgba(46, 214, 161, 0.08); }
.why-card.c1 .why-icon { background: rgba(46, 214, 161, 0.15); border-color: rgba(46, 214, 161, 0.45); color: #2ed6a1; }
.why-card.c2 { border-color: rgba(70, 149, 255, 0.42); box-shadow: 0 8px 24px rgba(70, 149, 255, 0.08); }
.why-card.c2 .why-icon { background: rgba(70, 149, 255, 0.16); border-color: rgba(70, 149, 255, 0.46); color: #4695ff; }
.why-card.c3 { border-color: rgba(56, 189, 248, 0.42); box-shadow: 0 8px 24px rgba(56, 189, 248, 0.08); }
.why-card.c3 .why-icon { background: rgba(56, 189, 248, 0.16); border-color: rgba(56, 189, 248, 0.46); color: var(--cyan); }
.why-card.c4 { border-color: rgba(68, 214, 219, 0.42); box-shadow: 0 8px 24px rgba(68, 214, 219, 0.08); }
.why-card.c4 .why-icon { background: rgba(68, 214, 219, 0.16); border-color: rgba(68, 214, 219, 0.46); color: #44d6db; }
.why-card.c5 { border-color: rgba(255, 196, 72, 0.42); box-shadow: 0 8px 24px rgba(255, 196, 72, 0.08); }
.why-card.c5 .why-icon { background: rgba(255, 196, 72, 0.16); border-color: rgba(255, 196, 72, 0.46); color: #ffc448; }
.why-card.c6 { border-color: rgba(255, 95, 165, 0.42); box-shadow: 0 8px 24px rgba(255, 95, 165, 0.08); }
.why-card.c6 .why-icon { background: rgba(255, 95, 165, 0.16); border-color: rgba(255, 95, 165, 0.46); color: #ff5fa5; }
.info-section {
  width: min(960px, 94vw);
  margin: 18px auto 0;
  padding: 34px 18px 26px;
  border-radius: 18px;
  background:
    radial-gradient(700px circle at 15% -20%, rgba(56, 189, 248, 0.16), transparent 45%),
    linear-gradient(140deg, rgba(18, 26, 43, 0.94), rgba(13, 18, 32, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 16px 32px rgba(32, 10, 65, 0.34);
  text-align: center;
}
.info-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan);
}
.info-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
.info-section h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(1.35rem, 2.7vw, 2rem);
  letter-spacing: -0.3px;
}
.info-section p {
  margin: 0 auto;
  width: min(760px, 100%);
  color: var(--muted);
  line-height: 1.72;
  font-size: 0.97rem;
  text-align: left;
}
.steps-section {
  width: min(960px, 94vw);
  margin: 18px auto 48px;
  padding: 30px 16px 20px;
  border-radius: 18px;
  background:
    radial-gradient(680px circle at 85% -20%, rgba(53, 188, 255, 0.18), transparent 46%),
    linear-gradient(155deg, rgba(7, 29, 55, 0.96), rgba(5, 16, 36, 0.96));
  border: 1px solid rgba(53, 188, 255, 0.32);
  box-shadow: 0 16px 34px rgba(2, 16, 38, 0.36);
  text-align: center;
}
.steps-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(61, 159, 255, 0.13);
  border: 1px solid rgba(61, 159, 255, 0.46);
  color: #56a8ff;
}
.steps-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
.steps-section h2 {
  margin: 0 0 20px;
  color: var(--text);
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  letter-spacing: -0.35px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.step-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 12px 14px;
  background: linear-gradient(180deg, rgba(17, 30, 63, 0.88), rgba(13, 23, 50, 0.88));
  text-align: center;
}
.step-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #18def0, #1f8fff);
  color: #051b2f;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(20, 166, 255, 0.3);
}
.step-icon {
  width: 36px;
  height: 36px;
  margin: 4px auto 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 218, 201, 0.12);
  border: 1px solid rgba(43, 218, 201, 0.38);
  color: #2bdac9;
}
.step-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}
.step-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text);
}
.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.animate-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}
.animate-in.show {
  opacity: 1;
  transform: translateY(0);
}
.topbar, .seo-block, .why-block, .info-section, .steps-section {
  animation: softFadeIn 520ms ease both;
}
.search-wrap {
  animation: fadeInOnly 520ms ease both;
}
@keyframes fadeInOnly {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes softFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-card, .why-card, .step-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, opacity .2s ease;
}
.result-card:hover, .step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(2, 12, 30, 0.25);
}
.footer {
  border-top: 1px solid color-mix(in srgb, var(--border) 62%, transparent);
  margin-top: 24px;
  padding: 18px 0 26px;
}
.footer-inner {
  width: min(1100px, 94vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.93rem;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-links a,
.footer-links button {
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  transition: color .16s ease, transform .16s ease;
}
.footer-links a:hover,
.footer-links button:hover {
  color: var(--text);
  transform: translateY(-1px);
}
.ad-slot {
  width: min(1100px, 94vw);
  margin: 10px auto;
  border: 1px dashed color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  min-height: 94px;
  display: none;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.86rem;
  position: relative;
  overflow: hidden;
}
.ad-slot::before {
  content: attr(data-ad-label);
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 0.7rem;
  color: transparent;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
body.ad-debug .ad-slot {
  display: flex;
  color: var(--muted);
  border-style: dashed;
}
body.ad-debug .ad-slot::before {
  color: color-mix(in srgb, var(--muted) 85%, transparent);
}
.ad-inline { min-height: 118px; }
.ad-large { min-height: 152px; }
.ad-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  margin: 0 auto;
  width: min(1100px, 100vw);
  border-radius: 12px 12px 0 0;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-bottom: 0;
  background: color-mix(in srgb, var(--surface) 88%, #050b18 12%);
  min-height: 76px;
  display: none;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.86rem;
}
.ad-sticky-close {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.ad-sticky-close:hover { color: var(--text); border-color: #6aa9ff; }
.ad-interstitial {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 16, 0.72);
  backdrop-filter: blur(4px);
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.ad-interstitial.show { display: flex; }
.ad-interstitial-card {
  width: min(560px, 95vw);
  min-height: 300px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 84%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, #071127 8%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: transparent;
  text-align: center;
  padding: 20px;
}
body.ad-debug .ad-sticky,
body.ad-debug .ad-interstitial-card {
  color: var(--muted);
}
body.ad-debug .ad-sticky {
  display: flex;
}
.ad-slot.is-live {
  display: flex;
  border-color: transparent;
  background: transparent;
  min-height: auto;
  padding: 2px 0;
}
.ad-slot.is-live::before {
  display: none;
}
.ad-slot.is-live .adsbygoogle {
  display: block;
  width: 100%;
}
.ad-sticky.is-live {
  display: flex;
}
.ad-interstitial-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 94%, #050b18 6%);
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  padding: 12px;
  display: none;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cookie-banner.show { display: flex; }
.cookie-text {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1 1 380px;
}
.cookie-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cookie-btn {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}
.cookie-btn.primary {
  border-color: color-mix(in srgb, var(--button) 62%, transparent);
  background: color-mix(in srgb, var(--button) 20%, transparent);
}
button, input, select, textarea {
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

@media (max-width:700px) {
  .topbar { padding:10px 0 4px; }
  .brand span { font-size:.95rem; }
  .top-actions { gap: 6px; }
  .topbar-icons { gap: 6px; flex-wrap: nowrap; }
  .auth-link { height: 40px; padding: 0 10px; font-size: 0.8rem; }
  .auth-nav { gap: 4px; }
  .icon-btn { width: 40px; height: 40px; }
  .auth-user-btn.icon-btn {
    height: 40px;
    max-width: 140px;
    padding: 0 8px 0 6px;
  }
  .auth-username { max-width: 64px; font-size: 0.78rem; }
  .converter-form { grid-template-columns:1fr; }
  .search-wrap { padding: 10px; border-radius: 14px; }
  .btn { min-height:46px; }
  .input { font-size: 16px; min-height: 46px; }
  .dl-btn, .ghost-btn { min-height: 42px; }
  .result-content { padding: 12px; }
  .result-title { font-size: .98rem; }
  .lang-dropdown { width:180px; }
  .result-card { grid-template-columns:1fr; }
  .preview-layout { grid-template-columns:1fr; }
  .thumb-frame { max-width:100%; aspect-ratio:16/9; }
  .action-btn { min-height:46px; }
  .why-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .why-block {
    padding: 20px 12px 14px;
  }
  .info-section, .steps-section {
    padding: 20px 12px 14px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-links {
    gap: 14px;
  }
  .ad-slot {
    border-radius: 10px;
    min-height: 82px;
  }
  .ad-interstitial-card {
    min-height: 260px;
  }
  .ad-sticky {
    min-height: 70px;
  }
  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
}
@supports (padding: max(0px)) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
  .topbar {
    padding-top: max(14px, env(safe-area-inset-top));
  }
  .footer {
    padding-bottom: max(26px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) { * { transition:none !important; animation:none !important; } }

/* ── Light mode ── */
body.light .input::placeholder { color: var(--muted); }
body.light .hero h1 {
  background: linear-gradient(90deg, #0f172a 18%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
body.light .search-wrap {
  background: var(--surface-solid);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
body.light .video-panel {
  background: var(--surface-solid);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
body.light .thumb-frame {
  background: #e2e8f0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}
body.light .why-block {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-color: color-mix(in srgb, var(--border) 100%, transparent);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}
body.light .why-card,
body.light .step-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
body.light .why-card:hover,
body.light .step-card:hover {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}
body.light .info-section {
  background:
    radial-gradient(700px circle at 15% -20%, rgba(14, 165, 233, 0.08), transparent 45%),
    linear-gradient(140deg, #ffffff 0%, #f0f6fc 100%);
  border-color: rgba(14, 165, 233, 0.22);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}
body.light .steps-section {
  background:
    radial-gradient(680px circle at 85% -20%, rgba(14, 165, 233, 0.1), transparent 46%),
    linear-gradient(155deg, #ffffff 0%, #edf4fb 100%);
  border-color: rgba(14, 165, 233, 0.24);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}
body.light .guard-overlay {
  background: rgba(241, 245, 249, 0.88);
}
body.light .guard-card {
  background:
    radial-gradient(420px circle at 100% 0%, rgba(225, 29, 72, 0.06), transparent 55%),
    linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}
body.light .guard-header {
  background:
    linear-gradient(135deg, rgba(225, 29, 72, 0.08) 0%, rgba(14, 165, 233, 0.06) 55%, transparent 100%),
    #f1f5f9;
}
body.light .guard-mock-window {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}
body.light .guard-steps {
  background: #f1f5f9;
}
body.light .popup-tip-overlay,
body.light .daily-limit-overlay {
  background: rgba(241, 245, 249, 0.9);
}
body.light .popup-tip-card,
body.light .daily-limit-card {
  background: var(--surface-solid);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}
body.light .daily-limit-features,
body.light .panel-download-progress {
  background: #f1f5f9;
}
body.light .ad-sticky {
  background: color-mix(in srgb, var(--surface-solid) 96%, #e2e8f0 4%);
}
body.light .cookie-banner {
  background: var(--surface-solid);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}
body.light .lang-dropdown,
body.light .auth-account-dropdown {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}
body.light .result-card:hover,
body.light .step-card:hover {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
