:root {
  --bg: #090a0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.08);
  --line-hover: rgba(255, 255, 255, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-dark: #64748b;
  --cyan: #38bdf8;
  --indigo: #6366f1;
  --green: #10b981;
  --red: #f43f5e;
  --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  --card-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body {
  background: var(--bg);
  color-scheme: dark;
  overflow-x: hidden !important;
  max-width: 100vw;
  width: 100%;
}
body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  position: relative;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Language-specific typography */
:lang(zh-CN) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
:lang(zh-TW) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif; }
:lang(ko) { font-family: -apple-system, BlinkMacSystemFont, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
:lang(ar) { font-family: "Noto Sans Arabic", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, sans-serif; line-height: 1.75; }

/* Ambient background glow and fine grid textures */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(ellipse 960px 480px at 50% 160px, rgba(56, 189, 248, 0.14) 0%, rgba(99, 102, 241, 0.06) 50%, transparent 80%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  mask-image: radial-gradient(ellipse 95% 75% at 50% 0%, #000 40%, transparent 95%);
  z-index: -1;
}
.bg-glow { display: none; } /* Deprecate old harsh glow spheres */

/* Header Topbar */
.topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}
.brand a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: 10px;
  transition: opacity 0.2s ease;
}
.brand a:hover { opacity: 0.9; }
.brand-logo {
  display: block;
  height: 38px;
  width: 148px;
  flex-shrink: 0;
}
.topbar-right {
  display: flex;
  gap: 20px;
  align-items: center;
}
.topnav {
  display: flex;
  gap: 22px;
  align-items: center;
}
.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topnav a:hover {
  color: var(--text);
}
.nav-explore-highlight {
  color: #fb923c !important;
  font-weight: 700 !important;
}
.nav-explore-highlight:hover {
  color: #f97316 !important;
}
.nav-spkeepers-link {
  color: #38bdf8 !important;
  font-weight: 700 !important;
}
.nav-spkeepers-link:hover {
  color: #0ea5e9 !important;
}
.top-support-link {
  background: rgba(250, 204, 21, 0.08) !important;
  border: 1px solid rgba(250, 204, 21, 0.28) !important;
  box-shadow: inset 0 1px 0 rgba(250, 204, 21, 0.15) !important;
  border-radius: 99px !important;
  padding: 5px 14px !important;
  font-size: 13.5px !important;
  color: #fef08a !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
}
.top-support-link:hover {
  background: rgba(250, 204, 21, 0.16) !important;
  border-color: rgba(250, 204, 21, 0.5) !important;
}
.lang-pill-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  box-shadow: var(--card-highlight);
  border-radius: 99px;
  padding: 0 14px 0 30px;
  height: 32px;
  transition: var(--transition);
}
.lang-pill-wrap:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--line-hover);
}
.lang-pill-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
  line-height: 1;
}
.lang-pill {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  padding: 0;
  line-height: 32px;
  text-align: center;
  text-align-last: center;
}
.lang-pill option {
  background: #11141e;
  color: #fff;
}
.badge {
  font-size: 12px;
  font-weight: 500;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 99px;
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.01em;
}
.badge-hero { display: none; }

/* Main layout and Hero section */
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  position: relative;
}
.hero {
  text-align: center;
  padding: 32px 0 24px;
}
.hero-kicker-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}
.hero-kicker-wrap .kicker {
  margin: 0;
}
.hero-kicker-wrap .live-counter {
  padding: 4px 14px;
  font-size: 12px;
}
.kicker {
  display: inline-block;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
h1 {
  font-size: clamp(34px, 5.5vw, 54px);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 16px;
  letter-spacing: -0.025em;
  color: #fff;
}
h1 span {
  background: linear-gradient(180deg, #ffffff 10%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 600px;
  margin: 0 auto;
}

/* Live marketing download counter pill */
.live-counter-wrap {
  display: flex;
  justify-content: center;
  margin: 16px 0 28px;
}
.live-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  box-shadow: var(--card-highlight);
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--muted);
}
.live-counter strong {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

/* Core Hero Command Panel */
.panel {
  background: rgba(18, 20, 29, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: var(--card-highlight), var(--card-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 24px;
  transition: border-color 0.2s ease;
}
.field-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted-dark);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.input-field-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}
.input-field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-dark);
  pointer-events: none;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}
.input-field-wrap:focus-within .input-field-icon {
  color: var(--cyan);
}
.input-field-wrap input[type="text"] {
  width: 100%;
  padding-left: 44px;
}
.paste-btn {
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  border-radius: 12px;
}
input[type="text"] {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  box-shadow: var(--card-highlight);
  transition: var(--transition);
}
input[type="text"]:focus {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.4);
}
input[type="text"]::placeholder {
  color: #475569;
}

/* Button system */
.btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-family: inherit;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--line-hover);
}
.btn:active {
  transform: scale(0.98);
}
.btn.primary {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff;
  font-weight: 600;
}
.btn.primary:hover {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 6px 22px rgba(2, 132, 199, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 12px;
}
.hint-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hint {
  color: var(--muted-dark);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}
.try-btn {
  margin: 0;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.try-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.4);
}

/* Audio trim inputs */
.trim-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.trim-row label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.trim-row input {
  width: 100px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13.5px;
  text-align: center;
  outline: none;
}
.trim-row input:focus {
  border-color: var(--cyan);
}
.trim-row > span {
  font-size: 14px;
  color: var(--muted-dark);
}

/* Bottom action bar and segmented format switcher */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.turnstile {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
}
.turnstile.hidden {
  display: none !important;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}
.fmt {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 12px;
  gap: 4px;
  height: 44px;
}
.fmt-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  padding: 0 16px;
  height: 36px;
  line-height: 36px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
}
.fmt-btn:hover {
  color: var(--text);
}
.fmt-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-weight: 600;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.actions .btn {
  height: 44px;
  line-height: 42px;
  padding: 0 20px;
}
.sponsor-inline-btn {
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.16) 0%, rgba(234, 179, 8, 0.08) 100%) !important;
  border: 1px solid rgba(250, 204, 21, 0.4) !important;
  color: #fef08a !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px -2px rgba(234, 179, 8, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px !important;
  padding: 0 18px !important;
  border-radius: 12px !important;
  transition: var(--transition);
}
.sponsor-inline-btn:hover {
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.25) 0%, rgba(234, 179, 8, 0.15) 100%) !important;
  border-color: rgba(250, 204, 21, 0.65) !important;
  box-shadow: 0 6px 20px rgba(234, 179, 8, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  transform: translateY(-1px);
}

/* Advanced fallback details */
.advanced {
  margin-top: 16px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.advanced summary {
  cursor: pointer;
  color: var(--muted-dark);
  font-size: 13px;
  font-weight: 500;
  user-select: none;
  transition: color 0.2s ease;
}
.advanced summary:hover {
  color: var(--muted);
}
.advanced textarea {
  width: 100%;
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  outline: none;
  resize: vertical;
}

/* Status display and progress bar panel */
.panel .status {
  margin-top: 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 20px;
}
.steps {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted-dark);
}
.step {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 4px 10px;
  font-weight: 500;
}
.step.on {
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
  font-weight: 600;
}
.step-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.meta {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.5;
  color: #f1f5f9;
}
.meta small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 14px;
  position: relative;
}
.bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 99px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar.run {
  width: 100% !important;
  background: linear-gradient(
    90deg,
    rgba(56, 189, 248, 0.15) 0%,
    rgba(56, 189, 248, 0.85) 50%,
    rgba(129, 140, 248, 0.15) 100%
  );
  background-size: 200% 100%;
  animation: barShimmer 1.4s infinite linear;
}
@keyframes barShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
  to { width: 85%; }
}
.detail {
  color: var(--muted);
  font-size: 13.5px;
  min-height: 20px;
  margin: 10px 0 0;
}
.error {
  color: var(--red);
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin: 12px 0 0;
}
.hidden { display: none !important; }

/* Pipeline status dots */
.pipeline {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}
.pipeline li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-dark);
}
.p-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}
.pipeline li.active { color: var(--text); }
.pipeline li.active .p-dot {
  border-color: var(--cyan);
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}
.pipeline li.done { color: #cbd5e1; }
.pipeline li.done .p-dot {
  border-color: var(--green);
  background: var(--green);
  color: #04121a;
  font-weight: 700;
}
.pipeline li.done .p-dot::after { content: "✓"; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Done actions and audio preview */
.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.preview-wrap audio {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  outline: none;
  filter: invert(1) hue-rotate(180deg); /* Native control dark-mode adaptation */
}

/* Bento Grid cards (How it works & FAQ) */
.how, .faq-section {
  margin-top: 36px;
}
.how h2, .faq-section h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: #f1f5f9;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.how-steps > div {
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--card-highlight), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  border-radius: 18px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.step-num {
  position: absolute;
  top: 14px;
  inset-inline-end: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 26px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  line-height: 1;
}
.how-steps > div:hover {
  background: var(--bg-card-hover);
  border-color: var(--line-hover);
  transform: translateY(-2px);
}
.how-steps h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
}
.how-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.how-note {
  margin: 16px 0 0;
  color: var(--muted-dark);
  font-size: 13px;
  text-align: center;
}

/* FAQ Bento Grid */
.faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.faq > div {
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--card-highlight), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  border-radius: 18px;
  padding: 20px;
  transition: var(--transition);
}
.faq > div:hover {
  background: var(--bg-card-hover);
  border-color: var(--line-hover);
  transform: translateY(-2px);
}
.faq h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
}
.faq p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* Recent downloads history card */
.history {
  margin-top: 32px;
}
.history h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  color: #cbd5e1;
}
.history ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.history li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--card-highlight);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  transition: var(--transition);
}
.history li:hover {
  border-color: var(--line-hover);
}
.hist-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hist-date {
  color: var(--muted-dark);
  font-size: 12px;
  white-space: nowrap;
}
.hist-more-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--cyan);
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.hist-more-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Recent downloads modal dialog */
.hist-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hist-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}
.hist-modal-panel {
  position: relative;
  background: #11141e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), var(--card-highlight);
  border-radius: 18px;
  padding: 24px;
  max-width: 440px;
  width: 100%;
  z-index: 2;
}
.hist-modal-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.hist-modal-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  word-break: break-all;
}
.hist-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hist-modal-actions a, .hist-modal-actions button {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--cyan);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}
.hist-modal-actions a:hover, .hist-modal-actions button:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Transfer progress note */
.transfer {
  margin-top: 16px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.t-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.t-note { color: var(--muted); }
#transferClose {
  margin-inline-start: auto;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
}

/* Global Site Footer */
.site-footer {
  max-width: 860px;
  margin: 50px auto 0;
  padding: 36px 20px 48px;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.footer-brand .brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.footer-tagline {
  margin: 6px 0 0;
  color: var(--muted-dark);
  font-size: 13px;
}
.footer-nav {
  display: flex;
  gap: 40px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease;
}
.footer-col a:hover {
  color: var(--text);
}
.footer-contact {
  text-align: center;
  color: var(--muted-dark);
  font-size: 12.5px;
  padding: 16px 0 8px;
}
.footer-contact a {
  color: var(--muted);
  text-decoration: none;
}
.footer-contact a:hover {
  color: var(--cyan);
}
.langnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 12px;
  margin: 12px 0 0;
}
.langnav a {
  color: var(--muted-dark);
  text-decoration: none;
  font-size: 12.5px;
  white-space: nowrap;
}
.langnav a:hover {
  color: var(--text);
}

/* RTL layout rules */
[dir="rtl"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}
[dir="rtl"] .brand a,
[dir="rtl"] .brand-logo,
[dir="rtl"] .guide-hub-header .brand a,
[dir="rtl"] .top a svg {
  direction: ltr !important;
  unicode-bidi: isolate;
  text-align: left;
}
[dir="rtl"] .lang-pill-wrap {
  padding: 0 30px 0 14px !important;
}
[dir="rtl"] .lang-pill-icon {
  left: auto !important;
  right: 10px !important;
}
[dir="rtl"] #trimRow {
  direction: ltr !important;
}
[dir="rtl"] .live-counter {
  direction: rtl;
}
[dir="rtl"] .actions {
  margin-inline-start: 0;
}
[dir="rtl"] .step-num {
  left: 18px !important;
  right: auto !important;
}

@media (max-width: 640px) {
  [dir="rtl"] .lang-pill-wrap {
    padding: 0 24px 0 8px !important;
  }
  [dir="rtl"] .lang-pill-icon {
    left: auto !important;
    right: 8px !important;
  }
}

@media (max-width: 440px) {
  [dir="rtl"] .lang-pill-wrap {
    padding: 0 20px 0 6px !important;
  }
  [dir="rtl"] .lang-pill-icon {
    left: auto !important;
    right: 6px !important;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .topbar {
    padding: 12px 14px;
    gap: 10px;
    max-width: 100%;
  }
  .brand a {
    min-width: 0;
    flex-shrink: 0;
  }
  .brand-logo {
    height: 26px;
    width: 101px;
    max-width: 100%;
    flex-shrink: 0;
  }
  .topbar-right {
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
  }
  /* Hide bookmarklet link on mobile */
  .topnav a[data-i18n="nav_bookmarklet"],
  .topnav a.nav-bookmarklet-link,
  .topnav .hide-mobile {
    display: none;
  }
  .topnav {
    gap: 10px;
  }
  .topnav a {
    font-size: 13px;
  }
  .lang-pill-wrap {
    height: 28px;
    padding: 0 8px 0 24px;
    max-width: 115px;
  }
  .lang-pill {
    font-size: 12px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .badge { display: none; }
  .badge-hero {
    display: inline-flex;
    margin-top: 12px;
    font-size: 12px;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 99px;
    padding: 4px 12px;
  }
  .wrap {
    padding: 10px 14px 40px;
    max-width: 100%;
  }
  .hero {
    padding: 20px 0 16px;
  }
  .hero-kicker-wrap {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
  }
  .kicker {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    font-size: 11px;
    padding: 4px 10px;
  }
  .live-counter {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    font-size: 12px;
    padding: 4px 10px;
  }
  h1 { font-size: 30px; letter-spacing: -0.01em; }
  .sub { font-size: 14.5px; }
  .panel {
    padding: 16px 14px;
    border-radius: 16px;
    max-width: 100%;
  }
  .input-row {
    flex-direction: column;
    gap: 8px;
  }
  .input-row .btn {
    width: 100%;
    height: 44px;
  }
  .input-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .meta-actions {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
  .trim-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .trim-row input {
    width: 100%;
  }
  .row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .fmt {
    width: 100%;
  }
  .fmt-btn {
    flex: 1;
    text-align: center;
  }
  .actions {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .actions #dlBtn {
    flex: 1;
    min-width: 0;
    height: 46px;
  }
  .actions .sponsor-inline-btn {
    flex: none;
    height: 46px;
    padding: 0 14px !important;
  }
  .steps {
    flex-wrap: wrap;
    gap: 4px;
  }
  .step {
    font-size: 11px;
    padding: 3px 8px;
  }
  .done-actions {
    flex-direction: column;
    width: 100%;
  }
  .done-actions .btn {
    width: 100%;
    height: 44px;
  }
  .how-steps { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .footer-top {
    flex-direction: column;
    gap: 20px;
  }
  .footer-nav {
    width: 100%;
    gap: 24px;
  }
  .legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; }
  .legal-links a { margin: 0; }
}

@media (max-width: 380px) {
  .topbar {
    padding: 10px 12px;
  }
  .brand-logo {
    height: 24px;
    width: 93px;
    flex-shrink: 0;
  }
  .topnav a {
    font-size: 12px;
  }
  .topnav {
    gap: 6px;
  }
  .lang-pill-wrap {
    max-width: 95px;
    padding: 0 6px 0 20px;
  }
  .lang-pill {
    font-size: 11.5px;
    max-width: 65px;
  }
  h1 {
    font-size: 26px;
  }
}

body, .panel, .faq > div, .how-steps > div {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Sponsor & Donation Component */
.top-support-link {
  color: #facc15 !important;
  font-weight: 600 !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sponsor-done-card {
  margin-top: 18px;
  background: rgba(250, 204, 21, 0.04);
  border: 1px solid rgba(250, 204, 21, 0.2);
  box-shadow: inset 0 1px 0 rgba(250, 204, 21, 0.15);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sponsor-card-info {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.sponsor-icon {
  font-size: 24px;
  line-height: 1;
}
.sponsor-title {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: #fef08a;
}
.sponsor-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.sponsor-card-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sponsor-bmac-btn {
  background: linear-gradient(180deg, #facc15 0%, #eab308 100%) !important;
  color: #1c1917 !important;
  border: 1px solid rgba(250, 204, 21, 0.5) !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.25) !important;
}
.sponsor-bmac-btn:hover {
  background: linear-gradient(180deg, #fde047 0%, #facc15 100%) !important;
}
.sponsor-stripe-btn {
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(165, 180, 252, 0.4) !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  text-decoration: none;
}
.sponsor-stripe-btn:hover {
  background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%) !important;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45) !important;
}
.sponsor-crypto-btn {
  border-color: rgba(250, 204, 21, 0.3) !important;
  color: #fef08a !important;
}
.sponsor-crypto-btn:hover {
  background: rgba(250, 204, 21, 0.08) !important;
  border-color: rgba(250, 204, 21, 0.6) !important;
}

/* Crypto Modal */
.crypto-modal-panel {
  max-width: 480px !important;
}
.crypto-header {
  margin-bottom: 16px;
}
.crypto-title {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
}
.crypto-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.crypto-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.crypto-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.crypto-chain {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 8px;
}
.chain-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.chain-badge.sol { background: #9945ff; color: #fff; }
.chain-badge.eth { background: #627eea; color: #fff; }
.chain-badge.btc { background: #f7931a; color: #fff; }
.crypto-row {
  display: flex;
  gap: 8px;
}
.crypto-addr {
  flex: 1;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  color: #cbd5e1 !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
  font-family: ui-monospace, monospace;
}
.copy-btn {
  padding: 8px 12px !important;
  font-size: 12px !important;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .sponsor-card-btns {
    flex-direction: column;
  }
  .sponsor-card-btns .btn {
    width: 100%;
  }
}

/* ==== standard unified nav CSS ==== */
/* Base desktop topbar */
.topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

.brand {
  flex: 0 0 auto;
  min-width: 0;
}

.brand a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: 10px;
  transition: opacity 0.2s ease;
  min-width: 0;
  flex-shrink: 0;
}
.brand a:hover { opacity: 0.9; }

.brand-logo {
  display: block;
  height: 38px;
  width: 148px;
  flex-shrink: 0;
}

.topbar-right {
  display: flex;
  gap: 20px;
  align-items: center;
}

.topnav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.topnav a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topnav a:hover {
  color: #f8fafc;
}

.lang-pill-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  padding: 0 10px 0 28px;
  height: 32px;
}
.lang-pill-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  pointer-events: none;
}
.lang-pill {
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  padding-right: 4px;
}
.lang-pill option {
  background: #0f172a;
  color: #f8fafc;
}

.top-support-link {
  background: rgba(250, 204, 21, 0.08) !important;
  border: 1px solid rgba(250, 204, 21, 0.28) !important;
  box-shadow: inset 0 1px 0 rgba(250, 204, 21, 0.15) !important;
  border-radius: 99px !important;
  padding: 5px 14px !important;
  color: #facc15 !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.top-support-link:hover {
  background: rgba(250, 204, 21, 0.16) !important;
  border-color: rgba(250, 204, 21, 0.5) !important;
}

/* ==== Mobile 2-Row Responsive Layout (<= 768px) ==== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .topbar {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 14px 10px !important;
    gap: 10px 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Row 1 Left: Brand Logo (never squished, never hidden) */
  .brand,
  .brand-link {
    order: 1 !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  .brand a {
    display: inline-flex !important;
    align-items: center !important;
  }
  .brand-logo {
    height: 28px !important;
    width: 109px !important;
    max-width: 100% !important;
    display: block !important;
    flex-shrink: 0 !important;
  }

  /* Row 1 Right: Support Pill */
  .top-support-link {
    order: 2 !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
  }

  /* Row 2: Full width container for Navigation & Language */
  .topbar-right {
    order: 3 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin: 0 !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Row 2 Left: Nav Links */
  .topnav,
  .nav-links {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .topnav a,
  .nav-links a {
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 6px 0 !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }

  /* Hide secondary items on mobile to prevent overflow */
  .topnav a[href="/bookmarklet"],
  .topnav a.nav-bookmarklet-link,
  .topnav a[data-i18n="nav_bookmarklet"],
  .topnav a[href="/#faq"],
  .topnav a[href="#faq"],
  .hide-mobile {
    display: none !important;
  }

  /* Row 2 Right: Compact Language Pill */
  .lang-pill-wrap {
    height: 28px !important;
    padding: 0 6px 0 22px !important;
    max-width: 105px !important;
    flex: 0 0 auto !important;
  }
  .lang-pill-icon {
    left: 7px !important;
    font-size: 11.5px !important;
  }
  .lang-pill {
    font-size: 11.5px !important;
    max-width: 72px !important;
    padding-right: 0 !important;
  }
}

/* Extra small devices (<= 380px) */
@media (max-width: 380px) {
  .topbar {
    padding: 10px 10px 8px !important;
  }
  .brand-logo {
    height: 25px !important;
    width: 98px !important;
  }
  .topnav,
  .nav-links {
    gap: 7px !important;
  }
  .topnav a,
  .nav-links a {
    font-size: 12px !important;
  }
  .lang-pill-wrap {
    max-width: 90px !important;
    padding: 0 4px 0 18px !important;
  }
  .lang-pill {
    font-size: 11px !important;
    max-width: 62px !important;
  }
}
