:root {
  color-scheme: dark;
  --text: rgba(255, 255, 255, 0.95);
  --muted: rgba(225, 245, 255, 0.72);
  --glass: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.2);
  --cyan: #9bd9ff;
  --violet: #b6a0ff;
  --pink: #ff72b6;
}

@font-face {
  font-family: "Milk Choco";
  src: url("assets/milk-choco/Milk%20Choco.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Infected";
  src: url("assets/infected/Infected.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  height: 100%;
  background: #05070a;
}

body {
  margin: 0;
  overflow: hidden;
  background: #05070a;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  height: 3px;
  background: linear-gradient(90deg, #ff4d6d, #ffb703, #7bd88f, #48cae4, #7b2ff7, #ff4dcb);
  box-shadow: 0 0 14px rgba(123, 47, 247, 0.38);
  pointer-events: none;
}

.youtube-background,
.background-video,
.background-image,
.video-fallback,
.shade {
  position: fixed;
  inset: -2px;
}

.youtube-background {
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.youtube-background.is-active {
  opacity: 0.72;
}

.youtube-background iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 177.78vh);
  height: max(56.25vw, 100vh);
  border: 0;
  transform: translate(-50%, -50%);
}

.background-video {
  z-index: 0;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  object-fit: cover;
  opacity: 0.74;
  transform: scale(1.01);
}

.background-video.is-hidden {
  display: none;
}

.background-image {
  z-index: 0;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  object-fit: cover;
  opacity: 0;
  transform: scale(1.01);
}

.music-background-image {
  opacity: 0.86;
  object-position: center center;
  filter: saturate(1.18) contrast(1.04) brightness(0.82);
}

.video-fallback {
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 25%, rgba(155, 217, 255, 0.24), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(255, 114, 182, 0.18), transparent 34%),
    linear-gradient(135deg, #05070a 0%, #111726 48%, #07080c 100%);
  animation: drift 12s ease-in-out infinite alternate;
}

.video-fallback::before {
  content: "";
  position: absolute;
  inset: -18%;
  background:
    linear-gradient(rgba(155, 217, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 217, 255, 0.08) 1px, transparent 1px);
  background-size: 4.8rem 4.8rem;
  transform: perspective(42rem) rotateX(58deg) translateY(3rem);
  transform-origin: center bottom;
  animation: grid-slide 8s linear infinite;
}

.shade {
  z-index: 1;
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.72)),
    radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.58) 78%);
  pointer-events: none;
}

.profile {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  padding: 28px 28px 110px;
  text-align: center;
  transform: translateY(-4vh);
}

.typed-name {
  display: none;
}

.typed-name::after {
  display: none;
}

.page-title {
  max-width: min(920px, 92vw);
  font-size: clamp(44px, 8vw, 96px);
  text-wrap: balance;
}

.page-title::after {
  display: none;
}

.social-links {
  position: fixed;
  left: 50%;
  top: calc(46% + 112px);
  bottom: auto;
  z-index: 3;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: min(260px, 92vw);
  transform: translateX(-50%);
}

.social-link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(14px);
  opacity: 0.78;
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  opacity: 1;
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(155, 217, 255, 0.58);
  box-shadow: 0 0 22px rgba(155, 217, 255, 0.16);
}

.social-link:focus-visible,
.sound-toggle:focus-visible,
.start-overlay:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.social-link svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.page-back {
  width: auto;
  min-width: 72px;
  padding: 0 16px;
  font: 700 12px/1 Arial, Helvetica, sans-serif;
  text-decoration: none;
  text-transform: uppercase;
}

/* Bottom-bar footer with legal links */
.site-footer {
  position: fixed;
  left: 0; right: 0;
  bottom: 12px;
  z-index: 4;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  pointer-events: auto;
}
.site-footer a {
  color: rgba(255,255,255,.62);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(10px);
  transition: all 160ms ease;
}
.site-footer a:hover, .site-footer a:focus-visible {
  color: #9bd9ff;
  border-color: rgba(155,217,255,.45);
  outline: none;
}
.site-footer span {
  color: rgba(255,255,255,.25);
  font-size: 0.8rem;
}
@media (max-width: 640px) {
  .site-footer { flex-wrap: wrap; gap: 6px; font-size: 0.72rem; bottom: 6px; }
  .site-footer span { display: none; }
}

.page-tab {
  position: fixed;
  top: 46%;
  left: 50%;
  z-index: 3;
  padding: 18px 28px;
  border: 1px solid rgba(155, 217, 255, 0.3);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--text);
  font: 900 15px/1 Arial, Helvetica, sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28), inset 0 0 26px rgba(155, 217, 255, 0.06);
  transform: translate(-50%, -50%);
  animation: pulse-tab 2.8s ease-in-out infinite;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.page-back-tab {
  top: 20px;
  left: 20px;
  padding: 13px 18px;
  font-size: 12px;
  transform: none;
  animation: none;
}

.page-tab:hover,
.page-tab:focus-visible {
  border-color: rgba(155, 217, 255, 0.65);
  background: rgba(155, 217, 255, 0.14);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28), 0 0 26px rgba(155, 217, 255, 0.18);
  outline: none;
  transform: translate(-50%, -52%);
}

.page-back-tab:hover,
.page-back-tab:focus-visible {
  transform: translateY(-2px);
}

.gematria-site-links {
  position: fixed;
  left: 20px;
  top: auto;
  bottom: 18px;
  z-index: 3;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: min(220px, calc(100vw - 150px));
}

.gematria-site-link {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(155, 217, 255, 0.24);
  border-radius: 9px;
  padding: 0;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.gematria-site-link:hover,
.gematria-site-link:focus-visible {
  border-color: rgba(182, 160, 255, 0.72);
  background: rgba(182, 160, 255, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.gematria-site-link img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  object-fit: cover;
}

.gematria-site-link span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.gematria-site-link.avatar-link img {
  border-radius: 50%;
}

.sound-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 3;
  min-width: 72px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.38);
  color: var(--muted);
  font: 700 12px/1 Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.sound-toggle.is-on {
  color: var(--text);
  border-color: rgba(155, 217, 255, 0.58);
}

.start-overlay {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  background: #000;
  color: var(--text);
  font: 400 28px/1 "Milk Choco", Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0;
  cursor: pointer;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.start-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes drift {
  from {
    filter: hue-rotate(0deg) saturate(1);
    transform: scale(1);
  }

  to {
    filter: hue-rotate(24deg) saturate(1.2);
    transform: scale(1.08);
  }
}

@keyframes grid-slide {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 0 4.8rem, 4.8rem 0;
  }
}

@keyframes pulse-tab {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28), 0 0 18px rgba(124, 58, 237, 0.16);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.045);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.32), 0 0 34px rgba(96, 165, 250, 0.24);
  }
}


@media (max-width: 520px) {
  body {
    overflow-y: auto;
  }

  .profile {
    gap: 22px;
    min-height: 68vh;
    padding: 20px;
  }

  .social-link {
    width: 42px;
    height: 42px;
  }

  .sound-toggle {
    right: 14px;
    bottom: 14px;
  }

  .gematria-site-links {
    left: 14px;
    right: 88px;
    bottom: 14px;
    max-width: calc(100vw - 118px);
  }

  .gematria-site-link {
    width: 38px;
    height: 38px;
  }

  .page-tab:not(.page-back-tab) {
    top: 44%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
  }

  .social-links {
    top: calc(44% + 112px);
  }

.page-back-tab {
    top: 14px;
    left: 14px;
    right: auto;
    bottom: auto;
    border-radius: 8px;
  }

  .page-tab:not(.page-back-tab):hover,
  .page-tab:not(.page-back-tab):focus-visible {
    transform: translate(-50%, -52%);
  }

  .page-back-tab:hover,
  .page-back-tab:focus-visible {
    transform: translateY(-2px);
  }
}

body.music-page {
  overflow-y: auto;
  font-family: "Segoe UI Variable", "Segoe UI", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 20% 15%, rgba(76, 110, 245, 0.28), transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(155, 92, 255, 0.22), transparent 32%),
    #040712;
}

.music-page .shade {
  background:
    linear-gradient(135deg, rgba(25, 18, 92, 0.58), rgba(4, 10, 28, 0.42) 42%, rgba(61, 90, 254, 0.22)),
    radial-gradient(circle at 22% 18%, rgba(123, 47, 247, 0.3), transparent 38%),
    radial-gradient(circle at 77% 12%, rgba(72, 202, 228, 0.18), transparent 34%),
    linear-gradient(rgba(5, 8, 24, 0.16), rgba(3, 5, 16, 0.78)),
    radial-gradient(circle at center, transparent 0%, rgba(3, 5, 16, 0.62) 78%);
}

.page-back-tab {
  left: 20px;
  right: auto;
}

.flawless-shell {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 560px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 88px 0 28px;
  text-align: left;
}

.flawless-panel,
.status-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 150px),
    linear-gradient(135deg, rgba(70, 54, 180, 0.2), rgba(28, 170, 220, 0.08)),
    rgba(5, 8, 28, 0.82);
  border: 1px solid rgba(182, 160, 255, 0.28);
  border-radius: 14px;
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.48),
    0 0 48px rgba(76, 110, 245, 0.16),
    inset 0 0 38px rgba(155, 217, 255, 0.055);
  backdrop-filter: blur(22px) saturate(1.1);
}

.flawless-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.flawless-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #312e81, #7c3aed, #60a5fa, #22d3ee, #a78bfa);
  pointer-events: none;
}

.flawless-brand {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.music-section-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 15px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 12px;
  padding: 5px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    rgba(4, 7, 24, 0.72);
}

.section-tab {
  min-width: 0;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(226, 236, 255, 0.76);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.section-tab.active,
.section-tab:hover {
  border-color: rgba(96, 165, 250, 0.58);
  color: var(--text);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.3), rgba(37, 99, 235, 0.14));
  box-shadow: inset 0 0 18px rgba(96, 165, 250, 0.1);
}

.section-tab:hover {
  transform: translateY(-1px);
}

.stack-guide {
  display: grid;
  gap: 13px;
  margin-bottom: 16px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 14px;
  padding: 15px;
  background:
    linear-gradient(135deg, rgba(49, 46, 129, 0.42), rgba(124, 58, 237, 0.16), rgba(34, 211, 238, 0.1)),
    rgba(5, 7, 24, 0.52);
  box-shadow: inset 0 0 30px rgba(96, 165, 250, 0.07), 0 12px 38px rgba(0, 0, 0, 0.18);
}

.stack-guide-copy {
  display: grid;
  gap: 6px;
}

.guide-kicker {
  color: #dbeafe;
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.stack-guide p,
.panel-note {
  margin: 0;
  color: rgba(226, 236, 255, 0.76);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.stack-guide-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.stack-guide-steps span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 10px;
  padding: 8px 6px;
  background: rgba(4, 7, 24, 0.62);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.stack-guide-steps b {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #60a5fa, #22d3ee);
  color: #08101d;
  font-size: 0.72rem;
  line-height: 1;
}

.flawless-eyebrow {
  margin: 0;
  color: #f4f7ff;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow:
    0 10px 32px rgba(0, 0, 0, 0.65),
    0 0 24px rgba(124, 58, 237, 0.36),
    0 0 34px rgba(96, 165, 250, 0.22);
}

.flawless-subtitle {
  max-width: 32rem;
  margin: 7px 0 0;
  color: rgba(226, 236, 255, 0.72);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.35;
}

.flawless-brand h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: 0;
  font-family: "Milk Choco", Arial, Helvetica, sans-serif;
  font-weight: 400;
  text-shadow: 0 4px 34px rgba(0, 0, 0, 0.75), 0 0 24px rgba(182, 160, 255, 0.18);
}

.flawless-badge {
  flex: 0 0 auto;
  min-width: 112px;
  border: 1px solid rgba(96, 165, 250, 0.38);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.62), rgba(124, 58, 237, 0.22), rgba(34, 211, 238, 0.14));
  font-size: 0.76rem;
  font-weight: 950;
  text-align: center;
  box-shadow: inset 0 0 16px rgba(96, 165, 250, 0.12), 0 0 24px rgba(124, 58, 237, 0.12);
}

.download-form {
  display: grid;
  gap: 15px;
}

.tool-panel {
  display: grid;
  gap: 15px;
}

.tool-panel[hidden],
.tab[hidden] {
  display: none;
}

.music-page label span,
.audio-head span,
.range-row output {
  font-weight: 850;
  color: var(--text);
}

.url-field {
  display: grid;
  gap: 8px;
}

.music-page input,
.music-page select,
.music-page button {
  font: inherit;
}

.music-page input,
.music-page select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 10px;
  background: rgba(3, 7, 24, 0.72);
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.music-page input {
  padding: 0 13px;
}

.music-page select {
  padding: 0 12px;
}

.music-page input:focus,
.music-page select:focus,
.music-page button:focus-visible {
  border-color: rgba(96, 165, 250, 0.8);
  outline: 3px solid rgba(96, 165, 250, 0.22);
  outline-offset: 2px;
}

.music-page input::placeholder {
  color: rgba(225, 245, 255, 0.48);
}

.permission-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(155, 217, 255, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(3, 7, 24, 0.34);
  color: rgba(235, 245, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.permission-row input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  flex: 0 0 auto;
  padding: 0;
  accent-color: #8b5cf6;
}

.tab-group {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 12px;
  background: rgba(3, 7, 24, 0.64);
  padding: 4px;
}

.source-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.format-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.format-tabs.compact {
  grid-template-columns: 1fr;
}

.tab {
  position: relative;
  min-width: 0;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(226, 236, 255, 0.78);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.tab span {
  max-width: 100%;
  padding: 0 5px;
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.source-tabs .tab {
  min-height: 40px;
  font-size: 0.8rem;
}

.format-tab {
  min-height: 64px;
}

.tab input,
.recipe input,
.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tab.active {
  border-color: rgba(96, 165, 250, 0.64);
  color: var(--text);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.28), rgba(37, 99, 235, 0.13));
  box-shadow: inset 0 0 18px rgba(96, 165, 250, 0.1);
}

.tab:hover {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(96, 165, 250, 0.08);
}

.bitrate-row,
.tone-row,
.select-row {
  display: grid;
  grid-template-columns: minmax(104px, 0.56fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.bitrate-row.disabled {
  opacity: 0.78;
  pointer-events: none;
}

.bitrate-row.disabled select {
  border-color: rgba(96, 165, 250, 0.12);
  background: rgba(4, 7, 24, 0.46);
  cursor: not-allowed;
}

.audio-board {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 14px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(96, 165, 250, 0.12), transparent),
    linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(34, 211, 238, 0.055)),
    rgba(4, 7, 24, 0.48);
  box-shadow: inset 0 0 30px rgba(96, 165, 250, 0.055);
}

.audio-board.disabled {
  border-color: rgba(96, 165, 250, 0.16);
  background:
    linear-gradient(180deg, rgba(96, 165, 250, 0.075), transparent),
    rgba(4, 7, 24, 0.38);
}

.audio-board.disabled > :not(.preview-row) {
  opacity: 0.76;
}

.audio-board.disabled .audio-mode-note {
  opacity: 1;
  color: rgba(226, 236, 255, 0.86);
}

.audio-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.solfeggio-head {
  grid-template-columns: minmax(0, 1fr) auto;
}

.preset-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.preset-head span {
  font-weight: 850;
}

.preset-head small {
  min-width: 0;
  color: rgba(225, 245, 255, 0.56);
  font-size: 0.74rem;
  font-weight: 850;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.audio-head output {
  min-width: 0;
  justify-self: end;
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: 999px;
  padding: 5px 9px;
  color: #edf6ff;
  background: rgba(96, 165, 250, 0.12);
  font-size: 0.78rem;
  font-weight: 850;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
}

.recipe {
  position: relative;
  min-width: 0;
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 12px;
  padding: 10px 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent), rgba(4, 7, 24, 0.72);
  color: rgba(225, 245, 255, 0.82);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.recipe:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.48);
}

.recipe span,
.recipe small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.recipe span {
  font-size: 0.9rem;
  line-height: 1.1;
}

.recipe small {
  color: rgba(225, 245, 255, 0.56);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.1;
}

.recipe.active {
  border-color: rgba(96, 165, 250, 0.9);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.3), rgba(34, 211, 238, 0.12)), rgba(5, 8, 28, 0.88);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.12), 0 10px 28px rgba(30, 64, 175, 0.14);
}

.recipe.active small {
  color: #e6ecff;
}

.tone-stack {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.tone-control {
  position: relative;
}

.tone-control input {
  padding-right: 42px;
}

.unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(225, 245, 255, 0.58);
  font-size: 0.84rem;
  font-weight: 850;
  pointer-events: none;
}

.freq-chips {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.freq-chips button,
.secondary {
  min-height: 38px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 10px;
  background: rgba(3, 7, 24, 0.66);
  color: rgba(225, 245, 255, 0.82);
  cursor: pointer;
  font-weight: 850;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.freq-chips button {
  padding: 0 4px;
  font-size: 0.77rem;
}

.freq-chips button.active {
  border-color: rgba(96, 165, 250, 0.88);
  color: var(--text);
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.22), rgba(124, 58, 237, 0.12));
}

.hz-lock-note {
  margin: 0;
  border: 1px solid rgba(182, 160, 255, 0.24);
  border-radius: 9px;
  padding: 9px 10px;
  background: rgba(49, 46, 129, 0.28);
  color: rgba(225, 245, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}

.audio-board.hz-locked .tone-control input,
.audio-board.hz-locked .freq-chips button {
  cursor: not-allowed;
}

.compact-action {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.solfeggio-board {
  gap: 15px;
}

.solfeggio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.solfeggio-card {
  min-height: 136px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 12px;
  padding: 13px;
  background:
    linear-gradient(145deg, rgba(49, 46, 129, 0.34), rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.16)),
    rgba(3, 7, 24, 0.62);
  color: rgba(235, 245, 255, 0.82);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.solfeggio-card span {
  color: #f8fbff;
  font-size: 1rem;
  font-weight: 950;
}

.solfeggio-card small {
  color: rgba(225, 245, 255, 0.68);
  font-size: 0.76rem;
  line-height: 1.38;
}

.solfeggio-card:hover,
.solfeggio-card:focus-visible,
.solfeggio-card.active {
  border-color: rgba(182, 160, 255, 0.78);
  background:
    linear-gradient(145deg, rgba(49, 46, 129, 0.48), rgba(37, 99, 235, 0.2), rgba(124, 58, 237, 0.28)),
    rgba(3, 7, 24, 0.72);
  outline: none;
  transform: translateY(-1px);
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.video-sync-row {
  grid-column: 1 / -1;
}

.switch-row {
  position: relative;
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 11px;
  padding: 8px 10px;
  background: rgba(4, 7, 24, 0.52);
  cursor: pointer;
}

.switch-row > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.switch-track {
  width: 38px;
  height: 20px;
  border: 1px solid rgba(205, 214, 255, 0.32);
  border-radius: 999px;
  background: rgba(225, 245, 255, 0.16);
  position: relative;
}

.switch-track::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: rgba(225, 245, 255, 0.58);
  transition: transform 160ms ease, background 160ms ease;
}

.switch-row input:checked + .switch-track {
  border-color: rgba(96, 165, 250, 0.84);
  background: rgba(96, 165, 250, 0.24);
}

.switch-row input:checked + .switch-track::after {
  transform: translateX(18px);
  background: #8b5cf6;
}

.switch-row.disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.range-row {
  display: grid;
  gap: 7px;
}

.range-row span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.range-row input {
  min-height: 28px;
  padding: 0;
  accent-color: var(--violet);
}

.mix-graph {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 12px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(49, 46, 129, 0.22), rgba(124, 58, 237, 0.12), rgba(37, 99, 235, 0.1)),
    rgba(3, 7, 24, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.graph-row {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  color: rgba(225, 245, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 850;
}

.graph-row span,
.graph-row output {
  min-width: 0;
}

.graph-row output {
  color: var(--text);
  text-align: right;
}

.graph-track {
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 999px;
  background: rgba(225, 245, 255, 0.08);
}

.graph-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #312e81, #7c3aed, #38bdf8);
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.42);
  transition: width 160ms ease;
}

.preview-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.secondary:hover {
  border-color: rgba(96, 165, 250, 0.76);
  color: var(--text);
  background: rgba(96, 165, 250, 0.12);
}

.preview-player {
  width: 100%;
  min-width: 0;
  height: 38px;
}

.preview-panel {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.preview-tool .audio-board {
  min-height: 240px;
}

.preview-video {
  width: 100%;
  max-height: 240px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 12px;
  background: rgba(3, 7, 24, 0.86);
  object-fit: contain;
}

.preview-panel.is-shorts-preview .preview-video {
  width: min(100%, 280px);
  max-height: 520px;
  aspect-ratio: 9 / 16;
  justify-self: center;
}

.preview-open-link {
  justify-self: start;
  border: 1px solid rgba(155, 217, 255, 0.28);
  border-radius: 8px;
  padding: 9px 12px;
  background: rgba(155, 217, 255, 0.1);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.preview-open-link:hover,
.preview-open-link:focus-visible {
  border-color: rgba(182, 160, 255, 0.72);
  background: rgba(182, 160, 255, 0.15);
  outline: none;
  transform: translateY(-1px);
}

.primary {
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #312e81, #7c3aed, #2563eb, #22d3ee);
  color: white;
  font-weight: 950;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.28), 0 0 30px rgba(124, 58, 237, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 58px rgba(37, 99, 235, 0.36), 0 0 38px rgba(124, 58, 237, 0.22);
}

.primary:disabled,
.secondary:disabled {
  cursor: progress;
  opacity: 0.64;
}

.audio-board input:disabled,
.audio-board button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.button-icon {
  width: 0;
  height: 0;
  border-left: 8px solid white;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.status-panel {
  height: min(720px, calc(100vh - 96px));
  min-height: 520px;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.status-head {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(96, 165, 250, 0.18);
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(49, 46, 129, 0.28), rgba(37, 99, 235, 0.12)),
    rgba(4, 7, 24, 0.86);
}

.job-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 900;
  color: white;
  background: rgba(225, 245, 255, 0.28);
}

.job-badge.running {
  background: #60a5fa;
  color: #07111a;
}

.job-badge.complete {
  background: #34d399;
  color: #06110d;
}

.job-badge.failed {
  background: #fb7185;
}

.path {
  min-width: 0;
  color: rgba(225, 245, 255, 0.62);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-link {
  flex: 0 1 auto;
  max-width: 260px;
  border: 1px solid rgba(182, 160, 255, 0.42);
  border-radius: 8px;
  padding: 8px 11px;
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.62), rgba(124, 58, 237, 0.36));
  color: #f7fbff;
  font-size: 0.75rem;
  font-weight: 950;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.download-link:hover,
.download-link:focus-visible {
  border-color: rgba(155, 217, 255, 0.72);
  outline: none;
}

.log {
  min-height: 0;
  margin: 0;
  padding: 18px;
  overflow: auto;
  background:
    linear-gradient(rgba(96, 165, 250, 0.045) 50%, transparent 50%) 0 0 / 100% 34px,
    rgba(3, 7, 24, 0.92);
  color: #eaf1ff;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .flawless-shell {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 78px 0 18px;
  }

  .status-panel {
    min-height: 360px;
  }
}

@media (max-width: 680px) {
  .flawless-shell {
    width: min(100% - 20px, 1240px);
  }

  .flawless-panel {
    padding: 16px;
  }

  .flawless-brand {
    flex-direction: column;
    margin-bottom: 18px;
  }

  .music-section-tabs,
  .stack-guide-steps {
    grid-template-columns: 1fr;
  }

  .source-tabs,
  .format-tabs,
  .recipe-grid,
  .solfeggio-grid,
  .toggle-grid,
  .preview-row {
    grid-template-columns: 1fr;
  }

  .bitrate-row,
  .tone-row,
  .select-row {
    grid-template-columns: 1fr;
  }

  .graph-row {
    grid-template-columns: 82px minmax(0, 1fr) 52px;
    gap: 8px;
  }

  .freq-chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .audio-head {
    grid-template-columns: 1fr;
  }

  .audio-head output {
    justify-self: stretch;
    text-align: left;
    white-space: normal;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   PRESET FILTER TABS
   ═══════════════════════════════════════════════════════════════════ */

.preset-filter-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.pf-tab {
  padding: 5px 13px;
  min-height: 28px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 999px;
  background: rgba(4, 7, 24, 0.64);
  color: rgba(225, 245, 255, 0.68);
  cursor: pointer;
  font: 800 0.69rem/1 inherit;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all 160ms ease;
}

.pf-tab:hover {
  border-color: rgba(96, 165, 250, 0.5);
  color: var(--text);
  background: rgba(96, 165, 250, 0.1);
  transform: translateY(-1px);
}

.pf-tab.active {
  color: #fff;
  font-weight: 950;
  border-color: transparent;
  transform: none;
}

.pf-tab[data-filter="all"].active    { background: linear-gradient(135deg, #312e81, #7c3aed, #2563eb); box-shadow: 0 0 16px rgba(124,58,237,0.38); }
.pf-tab[data-filter="flawless"].active { background: linear-gradient(135deg, #0e7490, #0891b2, #38bdf8); box-shadow: 0 0 16px rgba(56,189,248,0.38); }
.pf-tab[data-filter="myhron"].active  { background: linear-gradient(135deg, #4c1d95, #7c3aed, #a78bfa); box-shadow: 0 0 16px rgba(167,139,250,0.38); }
.pf-tab[data-filter="ricco"].active   { background: linear-gradient(135deg, #92400e, #d97706, #fbbf24); box-shadow: 0 0 16px rgba(251,191,36,0.28); }
.pf-tab[data-filter="vibezz"].active  { background: linear-gradient(135deg, #064e3b, #059669, #34d399); box-shadow: 0 0 16px rgba(52,211,153,0.28); }


/* ═══════════════════════════════════════════════════════════════════
   CREATOR COLOR CODING ON RECIPE CARDS
   ═══════════════════════════════════════════════════════════════════ */

.recipe[data-creator]::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  opacity: 0.8;
}

.recipe[data-creator="myhron"]::after   { background: #a78bfa; box-shadow: 0 0 5px #a78bfa; }
.recipe[data-creator="ricco"]::after    { background: #fbbf24; box-shadow: 0 0 5px #fbbf24; }
.recipe[data-creator="vibezz"]::after   { background: #34d399; box-shadow: 0 0 5px #34d399; }
.recipe[data-creator="flawless"]::after { background: #38bdf8; box-shadow: 0 0 5px #38bdf8; }

.recipe[data-creator="myhron"].active {
  border-color: rgba(167, 139, 250, 0.9);
  background: linear-gradient(180deg, rgba(124,58,237,0.3), rgba(76,29,149,0.16)), rgba(5,8,28,0.9);
  box-shadow: 0 0 20px rgba(124,58,237,0.2), inset 0 0 0 1px rgba(167,139,250,0.12);
}
.recipe[data-creator="ricco"].active {
  border-color: rgba(251, 191, 36, 0.88);
  background: linear-gradient(180deg, rgba(217,119,6,0.22), rgba(146,64,14,0.12)), rgba(5,8,28,0.9);
  box-shadow: 0 0 20px rgba(251,191,36,0.16), inset 0 0 0 1px rgba(251,191,36,0.1);
}
.recipe[data-creator="vibezz"].active {
  border-color: rgba(52, 211, 153, 0.88);
  background: linear-gradient(180deg, rgba(5,150,105,0.22), rgba(6,78,59,0.12)), rgba(5,8,28,0.9);
  box-shadow: 0 0 20px rgba(52,211,153,0.16), inset 0 0 0 1px rgba(52,211,153,0.1);
}
.recipe[data-creator="flawless"].active {
  border-color: rgba(56, 189, 248, 0.88);
  background: linear-gradient(180deg, rgba(14,116,144,0.22), rgba(3,105,161,0.1)), rgba(5,8,28,0.9);
  box-shadow: 0 0 20px rgba(56,189,248,0.16), inset 0 0 0 1px rgba(56,189,248,0.1);
}

/* Subtle glow on hover per creator */
.recipe[data-creator="myhron"]:hover   { border-color: rgba(167,139,250,0.48); }
.recipe[data-creator="ricco"]:hover    { border-color: rgba(251,191,36,0.48); }
.recipe[data-creator="vibezz"]:hover   { border-color: rgba(52,211,153,0.48); }
.recipe[data-creator="flawless"]:hover { border-color: rgba(56,189,248,0.48); }


/* ═══════════════════════════════════════════════════════════════════
   CHANNELS CREDIT SECTION
   ═══════════════════════════════════════════════════════════════════ */

.preset-channels {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 14px;
  padding: 13px 14px;
  background:
    linear-gradient(135deg, rgba(49,46,129,0.2), rgba(124,58,237,0.08)),
    rgba(3, 7, 24, 0.6);
  margin-top: 2px;
}

.preset-channels::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed66, #38bdf855, #34d39944, #fbbf2444, #7c3aed66);
}

.channels-header {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 11px;
}

.channels-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(182, 160, 255, 0.36);
  flex: 0 0 auto;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.3);
  margin-top: 1px;
}

.channels-copy {
  min-width: 0;
}

.channels-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(225, 245, 255, 0.9);
  margin-bottom: 3px;
}

.channels-label::before {
  content: "⚠";
  color: #fbbf24;
  font-style: normal;
}

.channels-note {
  margin: 0;
  color: rgba(225, 245, 255, 0.52);
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.38;
}

.channel-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.channel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 30, 30, 0.2);
  border-radius: 10px;
  padding: 9px 6px 8px;
  background: rgba(255, 0, 0, 0.06);
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  text-align: center;
  transition: all 180ms ease;
}

.channel-card:hover,
.channel-card:focus-visible {
  border-color: rgba(255, 50, 50, 0.7);
  background: rgba(255, 30, 30, 0.14);
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 0, 0, 0.12);
  outline: none;
}

.cc-yt-icon {
  width: 18px;
  height: 18px;
  fill: #ff3333;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 4px rgba(255,50,50,0.4));
}

.cc-name {
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.cc-tag {
  font-size: 0.6rem;
  font-weight: 750;
  color: rgba(225, 245, 255, 0.5);
  text-transform: uppercase;
}

.channel-myhron:hover .cc-yt-icon  { fill: #a78bfa; filter: drop-shadow(0 0 5px rgba(167,139,250,0.5)); }
.channel-ricco:hover .cc-yt-icon   { fill: #fbbf24; filter: drop-shadow(0 0 5px rgba(251,191,36,0.5)); }
.channel-vibezz:hover .cc-yt-icon  { fill: #34d399; filter: drop-shadow(0 0 5px rgba(52,211,153,0.5)); }

.channel-myhron:hover  { border-color: rgba(167,139,250,0.7); background: rgba(124,58,237,0.12); box-shadow: 0 8px 22px rgba(124,58,237,0.14); }
.channel-ricco:hover   { border-color: rgba(251,191,36,0.7);  background: rgba(217,119,6,0.1);  box-shadow: 0 8px 22px rgba(251,191,36,0.12); }
.channel-vibezz:hover  { border-color: rgba(52,211,153,0.7);  background: rgba(5,150,105,0.1);  box-shadow: 0 8px 22px rgba(52,211,153,0.12); }


/* ═══════════════════════════════════════════════════════════════════
   NEXT-LEVEL UI ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════ */

/* Animated shimmer sweep on the main panel top edge */
@keyframes border-sweep {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.flawless-panel::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(155,217,255,0.05) 20%,
    rgba(182,160,255,0.6) 40%,
    rgba(96,165,250,0.9) 50%,
    rgba(34,211,238,0.6) 60%,
    rgba(155,217,255,0.05) 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: border-sweep 3.6s linear infinite;
  pointer-events: none;
}

/* Floating micro-orbs in panel background */
.flawless-panel {
  background:
    radial-gradient(circle at 8% 12%, rgba(124,58,237,0.12), transparent 38%),
    radial-gradient(circle at 92% 88%, rgba(34,211,238,0.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.13), transparent 150px),
    linear-gradient(135deg, rgba(70,54,180,0.2), rgba(28,170,220,0.08)),
    rgba(5, 8, 28, 0.82);
}

/* Pulsing glow on active section tabs */
@keyframes tab-pulse {
  0%, 100% { box-shadow: inset 0 0 18px rgba(96,165,250,0.1); }
  50%       { box-shadow: inset 0 0 28px rgba(96,165,250,0.2), 0 0 18px rgba(124,58,237,0.12); }
}

.section-tab.active {
  animation: tab-pulse 2.8s ease-in-out infinite;
}

/* Recipe card active pulse */
@keyframes recipe-glow {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(96,165,250,0.12), 0 10px 28px rgba(30,64,175,0.14); }
  50%       { box-shadow: inset 0 0 0 1px rgba(96,165,250,0.18), 0 14px 34px rgba(30,64,175,0.22); }
}

.recipe.active {
  animation: recipe-glow 2.4s ease-in-out infinite;
}

/* Neon glow on the primary download button */
@keyframes btn-breathe {
  0%, 100% { box-shadow: 0 18px 48px rgba(37,99,235,0.28), 0 0 30px rgba(124,58,237,0.18); }
  50%       { box-shadow: 0 22px 62px rgba(37,99,235,0.4), 0 0 46px rgba(124,58,237,0.32); }
}

.primary {
  animation: btn-breathe 3s ease-in-out infinite;
  background-size: 200% 100%;
  position: relative;
  overflow: hidden;
}

.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
  background-size: 200% 100%;
  background-position: -100% center;
  transition: background-position 0.4s ease;
  pointer-events: none;
}

.primary:hover::after {
  background-position: 200% center;
}

/* Enhanced status panel */
.status-panel {
  background:
    radial-gradient(circle at 10% 5%, rgba(76,110,245,0.1), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.1), transparent 120px),
    linear-gradient(135deg, rgba(70,54,180,0.18), rgba(28,170,220,0.06)),
    rgba(5, 8, 28, 0.82);
}

/* Glowing log lines */
.log {
  background:
    linear-gradient(rgba(96,165,250,0.04) 50%, transparent 50%) 0 0 / 100% 34px,
    rgba(3,7,24,0.94);
  color: #c8deff;
  text-shadow: 0 0 8px rgba(96,165,250,0.2);
}

/* Solfeggio card enhancements */
.solfeggio-card:hover span {
  color: #38bdf8;
  text-shadow: 0 0 12px rgba(56,189,248,0.4);
}

/* Better running badge */
.job-badge.running {
  animation: btn-breathe 1.6s ease-in-out infinite;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
}

/* Graph track neon glow */
.graph-track i {
  background: linear-gradient(90deg, #312e81, #7c3aed, #38bdf8, #22d3ee);
  box-shadow: 0 0 18px rgba(56,189,248,0.38);
}

/* Section tab icon label polish */
.section-tab {
  position: relative;
}

/* Enhanced switch track active state */
.switch-row input:checked + .switch-track::after {
  background: radial-gradient(circle, #c4b5fd, #7c3aed);
  box-shadow: 0 0 6px rgba(124,58,237,0.5);
}

/* Enhanced freq chips active */
.freq-chips button.active {
  box-shadow: 0 0 10px rgba(96,165,250,0.3);
  text-shadow: 0 0 6px rgba(155,217,255,0.5);
}

/* Noise texture overlay on both panels for depth */
.flawless-panel,
.status-panel {
  isolation: isolate;
}

.flawless-panel::before,
.status-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.016;
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

/* Ensure content is above noise */
.flawless-panel > *,
.status-panel > * {
  position: relative;
  z-index: 1;
}

/* Mobile adjustments for new elements */
@media (max-width: 680px) {
  .preset-filter-tabs {
    gap: 4px;
  }
  .pf-tab {
    font-size: 0.64rem;
    padding: 5px 10px;
  }
  .channel-cards {
    grid-template-columns: 1fr;
  }
  .channels-header {
    gap: 9px;
  }
}
