:root {
  color-scheme: dark;
  --bg: #050817;
  --panel: rgba(9, 17, 42, 0.86);
  --panel-2: rgba(12, 14, 37, 0.9);
  --line: #22d3ee;
  --cyan: #26f7ff;
  --pink: #ff3df2;
  --pink-2: #8b5cff;
  --lime: #a7ff3d;
  --text: #f7fbff;
  --muted: #96a8cc;
  --soft: rgba(255, 255, 255, 0.08);
  --neon-cyan: 0 0 14px rgba(38, 247, 255, 0.42), 0 0 34px rgba(38, 247, 255, 0.12);
  --neon-pink: 0 0 16px rgba(255, 61, 242, 0.46), 0 0 36px rgba(255, 61, 242, 0.14);
  --neon-panel: inset 0 1px 0 rgba(255,255,255,0.09), 0 0 0 1px rgba(38,247,255,0.10), 0 22px 70px rgba(0,0,0,0.34), 0 0 38px rgba(38,247,255,0.07);
  --surface-border: rgba(38, 247, 255, 0.28);
  --surface-hover: rgba(38, 247, 255, 0.42);
  --focus-ring: 0 0 0 3px rgba(38, 247, 255, 0.16), 0 0 22px rgba(255, 61, 242, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 61, 242, 0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(38, 247, 255, 0.16), transparent 32%),
    radial-gradient(circle at 52% 92%, rgba(167, 255, 61, 0.08), transparent 26%),
    linear-gradient(180deg, #060818 0%, #070b1c 42%, #03050d 100%);
  color: var(--text);
  font-family: "Noto Sans", "Noto Sans Arabic", "Noto Naskh Arabic", "Noto Sans Devanagari", "Noto Sans Thai", "Noto Sans CJK KR", "Noto Sans CJK SC", "Noto Sans CJK JP", "Noto Sans KR", "Noto Sans SC", "Noto Sans JP", "Malgun Gothic", "Microsoft YaHei", "Yu Gothic", "Arial Unicode MS", system-ui, sans-serif;
  font-weight: 400;
}

body,
button,
input,
select,
textarea,
strong,
b,
h1,
h2,
h3,
h4,
.primary-button,
.secondary-button,
.seg,
.generated-file-state,
.generated-file-badge,
.preview-main-lyrics strong {
  font-weight: 400 !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(rgba(38,247,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,61,242,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.86), rgba(0,0,0,0.18));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 22% 30%, rgba(255,255,255,0.12) 0 1px, transparent 1px),
    radial-gradient(circle at 78% 68%, rgba(255,255,255,0.08) 0 1px, transparent 1px);
  background-size: 34px 34px, 47px 47px;
  mix-blend-mode: soft-light;
}

body.light-theme {
  color-scheme: light;
  --bg: #f7fbff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-2: rgba(248, 252, 255, 0.92);
  --line: #0ea5e9;
  --cyan: #0284c7;
  --pink: #db2777;
  --pink-2: #7c3aed;
  --lime: #16a34a;
  --text: #142033;
  --muted: #61708a;
  --soft: rgba(20, 32, 51, 0.08);
  --neon-cyan: 0 0 12px rgba(14, 165, 233, 0.24), 0 0 26px rgba(14, 165, 233, 0.08);
  --neon-pink: 0 0 14px rgba(219, 39, 119, 0.24), 0 0 28px rgba(219, 39, 119, 0.08);
  --neon-panel: inset 0 1px 0 rgba(255,255,255,0.92), 0 0 0 1px rgba(14,165,233,0.16), 0 18px 46px rgba(15, 23, 42, 0.12), 0 0 28px rgba(14,165,233,0.08);
  background:
    radial-gradient(circle at 16% 8%, rgba(219, 39, 119, 0.12), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(14, 165, 233, 0.16), transparent 34%),
    radial-gradient(circle at 52% 92%, rgba(22, 163, 74, 0.08), transparent 26%),
    linear-gradient(180deg, #fbfdff 0%, #eef7ff 46%, #f8fbff 100%);
}

body.light-theme::before {
  background:
    linear-gradient(rgba(14,165,233,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(219,39,119,0.055) 1px, transparent 1px);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.54), rgba(0,0,0,0.1));
}

.landing-page {
  width: min(1200px, calc(100% - 32px));
  min-height: calc(100vh - 84px);
  margin: 0 auto;
  display: grid;
  gap: 28px;
  padding: 0 0 42px;
}

.landing-hero {
  position: relative;
  width: 100%;
  min-height: min(650px, calc(100vh - 118px));
  padding: clamp(52px, 8vh, 104px) 18px 26px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 78, 45, 0.24), transparent 30%),
    radial-gradient(circle at 74% 76%, rgba(38, 247, 255, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(8, 8, 14, 0.12), rgba(3, 7, 18, 0.74));
  overflow: hidden;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 111, 63, 0.26);
  border-radius: 999px;
  background: rgba(255, 111, 63, 0.10);
  color: #ffb199;
  font-size: 11px;
  box-shadow: 0 0 22px rgba(255, 111, 63, 0.12);
}

.landing-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #18e0a3;
  box-shadow: 0 0 12px rgba(24, 224, 163, 0.72);
}

.landing-hero h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--text);
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.10);
}

.landing-hero h1 em {
  display: inline-block;
  font-style: normal;
  background: linear-gradient(90deg, #ff4f2e, #ff9a2f 58%, #ffd24a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-copy {
  max-width: 720px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.62;
}

.landing-notice {
  width: min(600px, 100%);
  margin: 0 0 22px;
  padding: 15px 18px;
  border: 1px solid rgba(255, 134, 64, 0.26);
  border-top-color: rgba(167, 255, 61, 0.42);
  border-radius: 18px;
  background: rgba(31, 22, 25, 0.72);
  color: var(--text);
  text-align: left;
  box-shadow: 0 0 34px rgba(255, 91, 48, 0.10);
}

.landing-notice strong,
.landing-notice span {
  display: block;
}

.landing-notice strong {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.landing-notice span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: clamp(34px, 10vh, 118px);
}

.landing-start-button,
.landing-link-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 21px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.landing-start-button {
  border: 0;
  background: linear-gradient(135deg, #ff2f3f, #ff7a2f 66%, #ffc13d);
  color: white;
  box-shadow: 0 0 26px rgba(255, 89, 43, 0.34), 0 16px 36px rgba(0, 0, 0, 0.28);
}

.landing-link-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.landing-metrics {
  width: min(820px, 100%);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.landing-metrics div {
  min-height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 42px rgba(0,0,0,0.22);
}

.landing-metrics strong {
  color: #ff6a3d;
  font-size: clamp(19px, 1.6vw, 25px);
  font-weight: 800;
  line-height: 1;
}

.landing-metrics span {
  color: var(--muted);
  font-size: 11px;
}

.landing-section {
  padding: 18px 0 18px;
}

.landing-section-head {
  margin: 0 0 16px;
  text-align: center;
}

.landing-section-head p {
  margin: 0 0 8px;
  color: #ff8b50;
  font-size: 12px;
}

.landing-section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 700;
  line-height: 1.18;
}

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

.landing-feature-grid div {
  min-height: 126px;
  padding: 16px;
  border: 1px solid rgba(38, 247, 255, 0.20);
  border-radius: 16px;
  background: rgba(9, 14, 31, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 18px 42px rgba(0,0,0,0.18);
}

.landing-feature-grid span,
.landing-feature-grid strong,
.landing-feature-grid small {
  display: block;
}

.landing-feature-grid span {
  font-size: 21px;
  margin-bottom: 12px;
}

.landing-feature-grid strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.landing-feature-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.landing-benefit-grid,
.landing-audience-grid {
  display: grid;
  gap: 14px;
}

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

.landing-benefit-grid article,
.landing-audience-grid div {
  min-height: 138px;
  padding: 17px;
  border: 1px solid rgba(255, 126, 62, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(150deg, rgba(255, 126, 62, 0.10), rgba(38, 247, 255, 0.05)),
    rgba(9, 14, 31, 0.76);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 18px 42px rgba(0,0,0,0.18);
}

.landing-benefit-grid b {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: rgba(255, 111, 63, 0.12);
  color: #ff8b50;
  font-size: 12px;
  box-shadow: 0 0 18px rgba(255, 111, 63, 0.12);
}

.landing-benefit-grid strong,
.landing-benefit-grid span,
.landing-audience-grid strong,
.landing-audience-grid span {
  display: block;
}

.landing-benefit-grid strong,
.landing-audience-grid strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.landing-benefit-grid span,
.landing-audience-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.62;
}

.landing-pipeline-list {
  counter-reset: pipeline;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-pipeline-list li {
  position: relative;
  min-height: 130px;
  padding: 16px 14px;
  border: 1px solid rgba(38, 247, 255, 0.22);
  border-radius: 16px;
  background: rgba(7, 12, 28, 0.76);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.landing-pipeline-list li::after {
  content: "";
  position: absolute;
  right: -13px;
  top: 50%;
  width: 14px;
  height: 1px;
  background: linear-gradient(90deg, rgba(38, 247, 255, 0.6), rgba(255, 126, 62, 0.4));
}

.landing-pipeline-list li:last-child::after {
  display: none;
}

.landing-pipeline-list span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4f2e, #ff9a2f);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.landing-pipeline-list strong,
.landing-pipeline-list small {
  display: block;
}

.landing-pipeline-list strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.landing-pipeline-list small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.52;
}

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

.landing-section-head > span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.landing-pricing {
  width: min(760px, 100%);
  justify-self: center;
  padding-bottom: 36px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: min(560px, 100%);
  margin: 20px auto 22px;
}

.pricing-grid article {
  position: relative;
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(18, 22, 36, 0.84);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 20px 46px rgba(0,0,0,0.2);
  text-align: center;
}

.pricing-grid article.featured {
  border-color: rgba(255, 77, 82, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 30px rgba(255, 77, 82, 0.12), 0 20px 46px rgba(0,0,0,0.24);
}

.pricing-grid b {
  position: absolute;
  right: 20px;
  top: -1px;
  padding: 5px 14px;
  border-radius: 0 0 10px 10px;
  background: #ff3448;
  color: white;
  font-size: 11px;
}

.pricing-grid span {
  color: var(--muted);
  font-size: 13px;
}

.pricing-grid strong {
  color: #ff3e4f;
  font-size: clamp(36px, 4vw, 46px);
  line-height: 1;
  font-weight: 800;
}

.pricing-grid small {
  margin-left: 3px;
  color: #ff5a66;
  font-size: 18px;
  font-weight: 700;
}

.pricing-grid p {
  margin: 0;
  color: #26e7a1;
  font-size: 12px;
}

.payment-guide {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 26px 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(18, 22, 36, 0.84);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 20px 46px rgba(0,0,0,0.2);
}

.payment-guide h3 {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  text-align: center;
}

.payment-guide p {
  margin: 9px 0;
  color: var(--text);
  font-size: 14px;
}

.payment-guide p strong {
  color: var(--text);
}

.payment-guide p:nth-of-type(2) {
  color: #4ea2ff;
}

.payment-guide small {
  display: block;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
  display: grid;
  grid-template-columns: minmax(720px, 1.12fr) minmax(420px, 0.88fr);
  grid-template-rows: auto auto auto auto;
  gap: 14px;
}

.site-footer {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid rgba(38, 247, 255, 0.22);
}

.site-footer strong {
  color: var(--text);
  font-weight: 500;
}

.site-footer a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 160ms ease, text-shadow 160ms ease;
}

.site-footer a:hover {
  color: #ffffff;
  text-shadow: var(--neon-cyan);
}

.hero {
  position: relative;
  grid-column: 1 / -1;
  text-align: center;
  padding: 6px 0 14px;
  border-bottom: 1px solid rgba(38, 247, 255, 0.26);
  box-shadow: 0 1px 0 rgba(255, 61, 242, 0.12), 0 14px 42px rgba(38,247,255,0.06);
}

.google-auth {
  position: absolute;
  right: 0;
  top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.google-login-button {
  height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(38, 247, 255, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(230,246,255,0.88));
  color: #172033;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(38, 247, 255, 0.18);
}

.google-login-button.connected {
  background: linear-gradient(135deg, rgba(38, 247, 255, 0.22), rgba(167, 255, 61, 0.18));
  color: var(--text);
}

.google-login-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.google-login-status {
  max-width: 190px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visitor-counter {
  height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(167, 255, 61, 0.35);
  border-radius: 999px;
  background: rgba(167, 255, 61, 0.08);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(167, 255, 61, 0.12);
}

.icon-action {
  width: 42px;
  min-width: 42px;
  height: 32px;
  padding: 0;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.home-button {
  height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(38, 247, 255, 0.34);
  border-radius: 999px;
  background: rgba(38, 247, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(38, 247, 255, 0.12);
}

.api-settings-button {
  height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(255, 61, 242, 0.42);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 61, 242, 0.22), rgba(38, 247, 255, 0.16));
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(255, 61, 242, 0.16);
}

.admin-login-button {
  height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(167, 139, 250, 0.42);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.24), rgba(38, 247, 255, 0.12));
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.google-auth .icon-action {
  width: 42px;
  min-width: 42px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.google-auth #visitorCounter.icon-action {
  width: auto;
  min-width: 58px;
  padding: 0 12px;
  gap: 5px;
  font-size: 12px;
}

.google-auth #googleLoginButton.icon-action {
  font-weight: 700;
}

.api-settings-panel,
.api-guide-panel,
.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 18px;
  border: 1px solid rgba(255, 61, 242, 0.42);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12, 14, 37, 0.96), rgba(7, 12, 31, 0.94));
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.68), var(--neon-panel), 0 0 46px rgba(255, 61, 242, 0.28);
  overflow: auto;
}

.api-settings-panel {
  top: 22px;
  bottom: auto;
  max-height: min(560px, calc(100vh - 44px));
  padding: 16px;
}

.api-settings-panel[hidden],
.api-guide-panel[hidden],
.admin-panel[hidden] {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.api-settings-head,
.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.api-settings-panel .api-settings-head {
  margin-bottom: 10px;
}

.api-guide-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-right: 4px;
}

.api-guide-content article {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(38, 247, 255, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(8, 18, 45, 0.94), rgba(4, 10, 28, 0.9)),
    radial-gradient(circle at 0% 0%, rgba(255, 61, 242, 0.1), transparent 35%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 0 26px rgba(38,247,255,0.06);
}

.api-guide-content article:first-child,
.api-guide-content article:last-child {
  grid-column: 1 / -1;
}

.api-guide-content h3 {
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(38, 247, 255, 0.16);
  color: var(--cyan);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.api-guide-content ol,
.api-guide-content ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.82;
}

.api-guide-content li + li {
  margin-top: 7px;
}

.api-guide-content a {
  color: #8eefff;
  text-decoration: none;
  border-bottom: 1px solid rgba(142, 239, 255, 0.3);
}

.api-guide-content a:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

.api-guide-content code {
  padding: 1px 5px;
  border: 1px solid rgba(38, 247, 255, 0.22);
  border-radius: 6px;
  background: rgba(3, 7, 22, 0.68);
  color: #c9fbff;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
}

.api-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.api-link-grid a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid rgba(38, 247, 255, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(38, 247, 255, 0.12), rgba(167, 255, 61, 0.06)),
    rgba(2, 8, 24, 0.78);
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 18px rgba(38,247,255,0.05);
}

.api-link-grid a:hover {
  border-color: rgba(38, 247, 255, 0.54);
  background:
    linear-gradient(135deg, rgba(38, 247, 255, 0.18), rgba(255, 61, 242, 0.1)),
    rgba(2, 8, 24, 0.86);
  box-shadow: var(--neon-cyan);
}

.api-capture-article {
  grid-column: 1 / -1;
}

.api-capture-note {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.api-capture-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(38, 247, 255, 0.24);
  border-radius: 13px;
  overflow: hidden;
  background: rgba(3, 9, 24, 0.72);
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 0 22px rgba(38,247,255,0.06);
}

.api-guide-content .api-capture-card {
  border-bottom: 1px solid rgba(38, 247, 255, 0.24);
}

.api-capture-button {
  width: 100%;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.api-capture-card:hover {
  border-color: rgba(255, 61, 242, 0.5);
  border-bottom-color: rgba(255, 61, 242, 0.5);
  box-shadow: var(--neon-pink), 0 0 22px rgba(38,247,255,0.12);
  transform: translateY(-1px);
}

.capture-browser-bar {
  min-width: 0;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
}

.capture-browser-bar i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ff4d6d;
}

.capture-browser-bar i:nth-child(2) {
  background: #ffd166;
}

.capture-browser-bar i:nth-child(3) {
  background: #2ef6a1;
}

.capture-browser-bar b {
  min-width: 0;
  overflow: hidden;
  color: rgba(230, 240, 255, 0.72);
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-screen {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 16px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,0.13), transparent 22%),
    linear-gradient(135deg, rgba(255,61,242,0.16), rgba(38,247,255,0.09));
}

.capture-screen strong,
.capture-screen em,
.capture-screen small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-screen strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

.capture-screen em {
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #c9fbff;
  font-size: 11px;
  font-style: normal;
}

.capture-screen small {
  color: rgba(230, 240, 255, 0.72);
  font-size: 11px;
}

.capture-openai {
  background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(38,247,255,0.08));
}

.capture-youtube {
  background: linear-gradient(135deg, rgba(255,45,85,0.2), rgba(255,255,255,0.06));
}

.capture-consent {
  background: linear-gradient(135deg, rgba(66,133,244,0.22), rgba(251,188,5,0.12));
}

.capture-credentials {
  background: linear-gradient(135deg, rgba(167,255,61,0.16), rgba(38,247,255,0.1));
}

.capture-playground {
  background: linear-gradient(135deg, rgba(255,61,242,0.18), rgba(124,58,237,0.13));
}

.capture-dashboard {
  background: linear-gradient(135deg, rgba(255,61,242,0.2), rgba(38,247,255,0.18));
}

.capture-caption {
  padding: 11px 12px 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
}

.api-variable-table {
  display: grid;
  gap: 7px;
}

.api-variable-table div {
  display: grid;
  grid-template-columns: minmax(160px, .7fr) minmax(0, 1.3fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(38, 247, 255, 0.16);
  border-radius: 10px;
  background: rgba(3, 7, 22, 0.48);
}

.api-variable-table strong {
  color: #c9fbff;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
}

.api-variable-table span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.api-settings-head h2,
.admin-panel-head h2 {
  margin: 0;
  color: var(--pink);
  font-size: 20px;
  font-weight: 500;
  text-shadow: var(--neon-pink);
}

.api-settings-head p,
.admin-panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.api-settings-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px 12px;
}

.admin-login-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(180px, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.admin-login-form .field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(38, 247, 255, 0.4);
  border-radius: 10px;
  background: rgba(3, 9, 24, 0.86);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  outline: none;
}

.admin-login-form span {
  color: var(--muted);
  font-size: 12px;
}

.member-admin-area {
  border-top: 1px solid rgba(38, 247, 255, 0.18);
  padding-top: 14px;
}

.member-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--text);
}

.member-list {
  display: grid;
  gap: 8px;
  max-height: 48vh;
  overflow: auto;
}

.member-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(190px, 1.35fr) minmax(86px, .65fr) minmax(150px, .95fr) minmax(150px, .95fr) minmax(86px, .65fr) minmax(86px, .65fr) minmax(54px, .45fr) minmax(84px, .55fr) minmax(220px, auto);
  min-width: 1260px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(38, 247, 255, 0.2);
  border-radius: 12px;
  background: rgba(3, 9, 24, 0.54);
}

.member-row-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(14, 25, 52, 0.96);
  color: var(--cyan);
  font-size: 11px;
}

.member-cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
}

.member-date-cell {
  overflow: visible;
}

.member-date-input {
  width: 100%;
  min-width: 144px;
  height: 32px;
  border: 1px solid rgba(38, 247, 255, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(5, 10, 30, 0.96), rgba(12, 14, 36, 0.9));
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  padding: 0 6px;
  outline: none;
}

.member-date-input:focus {
  border-color: rgba(255, 61, 242, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 61, 242, 0.14);
}

.member-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  min-width: 220px;
}

.member-empty {
  color: var(--muted);
  font-size: 12px;
}

.danger-button {
  border-color: rgba(255, 77, 109, 0.46);
  color: #ffd8df;
}

.api-settings-form .field input,
.api-settings-form .field select {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(38, 247, 255, 0.4);
  border-radius: 10px;
  background: rgba(3, 9, 24, 0.86);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  outline: none;
}

.api-settings-form .field small {
  display: block;
  min-height: 14px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.api-settings-form .field small.setting-present {
  color: var(--green);
}

.setting-reset-button {
  height: 19px;
  margin-top: 3px;
  padding: 0 9px;
  border: 1px solid rgba(255, 77, 95, 0.36);
  border-radius: 999px;
  background: rgba(255, 77, 95, 0.08);
  color: #ffd8de;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.setting-reset-button:hover {
  border-color: rgba(255, 77, 95, 0.62);
  background: rgba(255, 77, 95, 0.16);
  box-shadow: 0 0 14px rgba(255, 77, 95, 0.12);
}

.api-settings-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}

.api-settings-actions .primary-button {
  width: min(260px, 100%);
}

.api-settings-actions span {
  color: var(--muted);
  font-size: 12px;
}

.compact-button {
  min-width: auto;
  height: 32px;
  padding: 0 12px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--cyan);
  text-shadow: var(--neon-cyan);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 38px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0;
  background: linear-gradient(90deg, #ff4df6, #26f7ff, #a7ff3d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(255,61,242,0.28));
}

.subtitle {
  margin: 6px auto 0;
  max-width: 980px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.setup-alert {
  margin: 6px auto 0;
  color: #ff4d5f;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 0 14px rgba(255, 77, 95, 0.36);
}

.theme-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  gap: 6px;
  margin-top: 10px;
  padding: 4px;
  border: 1px solid rgba(38, 247, 255, 0.28);
  border-radius: 999px;
  background: rgba(3, 7, 22, 0.52);
  box-shadow: 0 0 18px rgba(38, 247, 255, 0.08);
}

.theme-button {
  height: 28px;
  min-width: 82px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.api-guide-button {
  height: 28px;
  min-width: 124px;
  padding: 0 13px;
  border: 1px solid rgba(167, 255, 61, 0.34);
  border-radius: 999px;
  background: rgba(167, 255, 61, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(167, 255, 61, 0.1);
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.theme-button:hover {
  transform: translateY(-1px);
}

.api-guide-button:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 255, 61, 0.54);
  background: rgba(167, 255, 61, 0.14);
  box-shadow: 0 0 20px rgba(167, 255, 61, 0.18);
}

.theme-button.active {
  border-color: rgba(255, 61, 242, 0.58);
  background: linear-gradient(135deg, rgba(255, 61, 242, 0.84), rgba(38, 247, 255, 0.72));
  color: #ffffff;
  box-shadow: var(--neon-pink), 0 0 18px rgba(38, 247, 255, 0.18);
}

.control-panel,
.layout-preview-panel,
.progress-panel {
  margin-top: 0;
  padding: 16px;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(13, 23, 54, 0.92), rgba(5, 9, 27, 0.93)),
    radial-gradient(circle at 0% 0%, rgba(255, 61, 242, 0.07), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(38, 247, 255, 0.06), transparent 26%);
  box-shadow: var(--neon-panel);
  backdrop-filter: blur(18px);
}

.control-panel {
  grid-column: 1;
  grid-row: 2 / 5;
  align-self: stretch;
}

.layout-preview-panel {
  grid-column: 2;
  grid-row: 2;
  padding-bottom: 12px;
}

.progress-panel {
  grid-column: 2;
  grid-row: 3 / 5;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow: hidden;
}

.progress-panel .panel-head,
.progress-panel .progress-track {
  flex: 0 0 auto;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.panel-head.compact {
  align-items: center;
}

h2 {
  margin: 0;
  color: #f2fbff;
  text-shadow: 0 0 18px rgba(38, 247, 255, 0.22);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.25;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.job-status-message {
  width: 100%;
  margin: 8px 0 0;
  padding: 6px 10px;
  border: 1px solid rgba(38, 247, 255, 0.18);
  border-radius: 999px;
  background: rgba(38, 247, 255, 0.07);
  color: #d7fbff;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 0 14px rgba(38, 247, 255, 0.18);
}

.status-pill,
.percent {
  flex: 0 0 auto;
  min-width: 82px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(38, 247, 255, 0.42);
  background: linear-gradient(180deg, rgba(38, 247, 255, 0.13), rgba(11, 22, 52, 0.62));
  color: #b6fbff;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
  box-shadow: 0 0 18px rgba(38, 247, 255, 0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}

.language-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 12px auto;
}

.mixed-language-row {
  grid-column: span 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 0;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid rgba(255, 61, 242, 0.34);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 61, 242, 0.12), rgba(38, 247, 255, 0.08));
  box-shadow: 0 0 18px rgba(255, 61, 242, 0.08);
}

.mixed-language-row[hidden] {
  display: none;
}

.style-options {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}

.seg[data-language="mixed"] {
  grid-column: span 2;
  font-size: 10px;
  line-height: 1.15;
  padding: 0 6px;
  min-width: 0;
  white-space: normal;
}

.language-select-card {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
  height: 36px;
  padding: 3px 7px;
  border: 1px solid rgba(38, 247, 255, 0.26);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(10, 26, 62, 0.92), rgba(7, 12, 34, 0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 14px rgba(38, 247, 255, 0.04);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.language-select-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-select-card.active {
  border-color: rgba(255, 61, 242, 0.72);
  background: linear-gradient(135deg, rgba(255, 61, 242, 0.34), rgba(139, 92, 255, 0.28), rgba(38, 247, 255, 0.22));
  box-shadow: var(--neon-pink), 0 0 22px rgba(38, 247, 255, 0.18);
}

.language-select-card.active span {
  color: #ffffff;
}

.language-select {
  width: 100%;
  min-width: 0;
  height: 17px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 10.5px;
  outline: none;
}

.language-select option {
  background: #202534;
  color: #ffffff;
  font-size: 11px;
}

.mixed-language-row .field label {
  margin-bottom: 3px;
  font-size: 10px;
}

.mixed-language-row .field select {
  width: 100%;
  height: 30px;
  font-size: 11px;
  padding: 0 8px;
}

.mixed-language-row .field select option {
  font-size: 11px;
}

.field label {
  display: block;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.field select {
  position: relative;
  width: 100%;
  height: 36px;
  border: 1px solid rgba(38, 247, 255, 0.28);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(6, 13, 34, 0.96), rgba(10, 15, 38, 0.92));
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  outline: none;
  padding: 0 10px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 18px rgba(38, 247, 255, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field select option {
  background: #080e22;
  color: #f7fbff;
  font-size: 12px;
  font-weight: 400;
}

.field select:focus {
  border-color: rgba(38, 247, 255, 0.72);
  box-shadow: var(--focus-ring);
}

.custom-topic {
  margin: 0 0 10px;
}

.custom-topic label {
  display: block;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.custom-topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.output-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(250px, 40%);
  gap: 8px;
  align-items: stretch;
}

.output-path-row {
  display: contents;
  min-width: 0;
}

.delete-after-upload {
  width: 100%;
  min-width: 0;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  justify-self: start;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(38, 247, 255, 0.32);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(5, 10, 30, 0.94), rgba(12, 14, 36, 0.86));
  color: var(--text);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 0 18px rgba(38, 247, 255, 0.05);
  white-space: nowrap;
}

.custom-topic label.delete-after-upload {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.delete-after-upload input[type="checkbox"] {
  position: static;
  display: inline-block;
  flex: 0 0 14px;
  order: 0;
  width: 14px;
  height: 14px;
  margin: 0;
  transform: none;
}

.delete-after-upload span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  order: 1;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.output-setting-row .output-path-row input,
.output-setting-row .output-path-row button,
.output-setting-row .delete-after-upload {
  align-self: stretch;
  height: 36px;
}

.output-setting-row .output-path-row button {
  font-size: 11px;
}

.custom-topic input,
.custom-topic textarea {
  width: 100%;
  border: 1px solid rgba(38, 247, 255, 0.28);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(6, 13, 34, 0.96), rgba(10, 15, 38, 0.92));
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  padding: 0 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 18px rgba(38, 247, 255, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.custom-topic input {
  height: 36px;
}

.custom-topic textarea {
  min-height: 70px;
  line-height: 1.45;
  resize: vertical;
}

.custom-topic .delete-after-upload input {
  appearance: auto;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  accent-color: #ff3df2;
}

.custom-topic input:focus,
.custom-topic textarea:focus {
  border-color: rgba(38, 247, 255, 0.72);
  box-shadow: var(--focus-ring);
}

.custom-topic input::placeholder,
.custom-topic textarea::placeholder {
  color: rgba(170, 180, 200, 0.62);
}

.secondary-button {
  height: 36px;
  border: 1px solid rgba(38, 247, 255, 0.34);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(9, 31, 56, 0.96), rgba(26, 21, 58, 0.92));
  color: #d8fdff;
  font-size: 13px;
  font-weight: 400;
  padding: 0 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 0 18px rgba(38, 247, 255, 0.12), 0 10px 22px rgba(0,0,0,0.2);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.seg {
  width: 100%;
  height: 36px;
  border: 1px solid rgba(38, 247, 255, 0.24);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(10, 25, 58, 0.9), rgba(7, 12, 34, 0.94));
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 14px rgba(38, 247, 255, 0.04);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.seg.active {
  background: linear-gradient(135deg, rgba(231, 58, 220, 0.9), rgba(111, 92, 216, 0.86) 52%, rgba(38, 205, 224, 0.78));
  border-color: rgba(38, 247, 255, 0.58);
  color: white;
  box-shadow: var(--neon-pink), 0 0 22px rgba(38, 247, 255, 0.18);
}

.seg:hover,
.topic-select-card:hover,
.topic:hover,
.secondary-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.seg:active,
.topic-select-card:active,
.topic:active,
.secondary-button:active,
.primary-button:active {
  transform: translateY(0);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

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

.topic-section-title {
  margin: 12px 0 8px;
  color: #f2fbff;
  font-size: 15px;
  font-weight: 400;
  text-shadow: 0 0 18px rgba(255, 61, 242, 0.2);
}

.topic-select-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(38, 247, 255, 0.2);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(9, 25, 56, 0.86), rgba(5, 10, 28, 0.9)),
    radial-gradient(circle at 14% 0%, rgba(38, 247, 255, 0.08), transparent 38%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 14px rgba(38, 247, 255, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.topic-select-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topic-select-card.active {
  border-color: rgba(38, 247, 255, 0.66);
  background:
    linear-gradient(135deg, rgba(231, 58, 220, 0.16), rgba(38, 247, 255, 0.14)),
    rgba(7, 13, 32, 0.9);
  box-shadow: inset 0 0 0 1px rgba(38, 247, 255, 0.16), 0 0 20px rgba(38, 247, 255, 0.1);
}

.topic-select {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(38, 247, 255, 0.32);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(5, 10, 30, 0.94), rgba(12, 14, 36, 0.86));
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 400;
  outline: none;
  padding: 0 8px;
  cursor: pointer;
}

.topic-select option {
  background: #080e22;
  color: #f7fbff;
  font-size: 12px;
}

.topic {
  height: 28px;
  border: 1px solid rgba(38, 247, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 24, 54, 0.84), rgba(6, 11, 30, 0.88));
  color: var(--text);
  font-size: 10.5px;
  font-weight: 400;
  cursor: pointer;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.topic.active {
  border-color: rgba(255, 61, 242, 0.9);
  background: linear-gradient(135deg, rgba(255, 61, 242, 0.28), rgba(38, 247, 255, 0.16));
  box-shadow: inset 0 0 0 1px rgba(255, 61, 242, 0.3), 0 0 18px rgba(255, 61, 242, 0.13);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.primary-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(38, 247, 255, 0.52);
  border-radius: 10px;
  background: linear-gradient(135deg, #db38d2, #7359dd 56%, #24cfe2);
  color: white;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 61, 242, 0.26), 0 0 24px rgba(38, 247, 255, 0.16), inset 0 1px 0 rgba(255,255,255,0.22);
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

#startButton {
  min-width: 260px;
  white-space: nowrap;
}

.secondary-button:disabled,
.seg:disabled,
.topic:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.button-icon {
  margin-right: 6px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.auto-panel {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(0, 1.8fr);
  gap: 8px 12px;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(38, 247, 255, 0.24);
}

.auto-copy {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auto-copy strong {
  color: var(--pink);
  text-shadow: var(--neon-pink);
  font-size: 14px;
  font-weight: 400;
}

.auto-copy span,
.auto-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.auto-copy span {
  white-space: nowrap;
}

.auto-style-options {
  grid-column: 2;
  position: relative;
  z-index: 5;
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.auto-style-options .field label {
  font-size: 11px;
}

.auto-style-options .field select {
  height: 32px;
  font-size: 11px;
}

.auto-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 46px auto auto 50px auto minmax(128px, auto) 106px auto auto;
  gap: 6px;
  align-items: center;
}

.auto-controls label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.auto-controls input {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(38, 247, 255, 0.32);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(5, 10, 30, 0.94), rgba(12, 14, 36, 0.86));
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  outline: none;
  padding: 0 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 0 18px rgba(38, 247, 255, 0.05);
}

.auto-controls input[type="time"] {
  min-width: 104px;
  font-size: 12px;
}

.schedule-upload-row {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(220px, 0.5fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.schedule-upload-row input {
  height: 36px;
  border: 1px solid rgba(38, 247, 255, 0.32);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(5, 10, 30, 0.94), rgba(12, 14, 36, 0.86));
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  padding: 0 10px;
}

.daily-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 7px;
  border: 1px solid rgba(38, 247, 255, 0.28);
  border-radius: 8px;
  background: rgba(8, 14, 34, 0.62);
  box-shadow: 0 0 14px rgba(38, 247, 255, 0.05);
  white-space: nowrap;
}

.daily-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--pink);
}

.auto-unit {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.auto-controls .secondary-button {
  min-width: 72px;
  white-space: nowrap;
}

.auto-controls .auto-start {
  min-width: 84px;
}

.auto-start {
  background: linear-gradient(135deg, rgba(255, 61, 242, 0.94), rgba(38, 247, 255, 0.78));
  color: white;
  border-color: rgba(255, 61, 242, 0.62);
}

.auto-status {
  grid-column: 1 / -1;
  padding: 6px 9px;
  border: 1px solid rgba(167, 255, 61, 0.18);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(167, 255, 61, 0.08), rgba(38, 247, 255, 0.06), rgba(255, 61, 242, 0.07));
}

.auto-song-list {
  grid-column: 1 / -1;
  margin-top: -2px;
  padding: 9px 10px 10px;
  border: 1px solid rgba(255, 61, 242, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 14, 56, 0.72), rgba(5, 12, 31, 0.58));
  box-shadow: 0 0 20px rgba(255, 61, 242, 0.07);
}

.auto-song-list-title {
  color: #ffc2fb;
  text-shadow: var(--neon-pink);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  margin-bottom: 6px;
}

.auto-song-items {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 12px;
}

.auto-song-items li::marker {
  color: rgba(255, 61, 242, 0.86);
}

.auto-song-language {
  color: var(--cyan);
  margin-right: 8px;
}

.auto-song-title {
  color: #eef4ff;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.admin-stat-card {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(38, 247, 255, 0.24);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(8, 14, 34, 0.78), rgba(5, 8, 24, 0.66));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 18px rgba(38, 247, 255, 0.06);
}

.admin-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.admin-stat-card strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 18px;
  font-weight: 400;
}

.generated-files-panel {
  grid-column: 1 / -1;
  margin-top: 0;
  padding: 10px;
  border: 1px solid rgba(38, 247, 255, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(7, 14, 36, 0.74), rgba(3, 7, 22, 0.66)),
    radial-gradient(circle at 8% 0%, rgba(255, 61, 242, 0.12), transparent 36%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 22px rgba(38, 247, 255, 0.06);
}

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

.generated-files-head strong {
  display: inline;
  color: #f2fbff;
  font-size: 13px;
  font-weight: 400;
  text-shadow: 0 0 18px rgba(255, 61, 242, 0.18);
}

.generated-files-head span {
  display: inline;
  margin-left: 8px;
  color: var(--muted);
  font-size: 11px;
}

.generated-files-list {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
}

.generated-file-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  align-items: start;
  min-height: 50px;
  padding: 6px;
  border: 1px solid rgba(38, 247, 255, 0.18);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(8, 18, 42, 0.74), rgba(3, 8, 24, 0.64));
  color: var(--muted);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.generated-file-item:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 247, 255, 0.4);
  box-shadow: 0 0 18px rgba(38, 247, 255, 0.08);
}

.generated-file-item.is-ready {
  border-color: rgba(167, 255, 61, 0.3);
  color: var(--text);
  box-shadow: 0 0 16px rgba(167, 255, 61, 0.06);
}

.generated-file-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(38, 247, 255, 0.13);
  color: #b6fbff;
  font-size: 10px;
  box-shadow: 0 0 12px rgba(38, 247, 255, 0.08);
}

.generated-file-text {
  min-width: 0;
}

.generated-file-text strong,
.generated-file-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generated-file-text strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 400;
}

.generated-file-text small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9.5px;
}

.generated-file-state {
  display: none;
  color: rgba(150, 168, 204, 0.78);
  font-size: 10px;
}

.generated-file-item.is-ready .generated-file-state {
  color: var(--lime);
  text-shadow: 0 0 12px rgba(167, 255, 61, 0.28);
}

body.light-theme .hero {
  border-bottom-color: rgba(14, 165, 233, 0.34);
  box-shadow: 0 1px 0 rgba(219, 39, 119, 0.12), 0 12px 30px rgba(14, 165, 233, 0.08);
}

body.light-theme h1 {
  background: linear-gradient(90deg, #db2777, #0284c7, #16a34a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.light-theme .theme-switch,
body.light-theme .google-login-button.connected,
body.light-theme .control-panel,
body.light-theme .layout-preview-panel,
body.light-theme .progress-panel,
body.light-theme .generated-files-panel,
body.light-theme .auto-song-list {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(242, 248, 255, 0.86)),
    radial-gradient(circle at 0% 0%, rgba(219, 39, 119, 0.08), transparent 34%);
}

body.light-theme .field select,
body.light-theme .custom-topic input,
body.light-theme .custom-topic textarea,
body.light-theme .auto-controls input {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.92));
  color: var(--text);
}

body.light-theme .field select option {
  background: #ffffff;
  color: #142033;
}

body.light-theme .language-select-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(235, 245, 255, 0.82));
}

body.light-theme .language-select {
  color: var(--text);
}

body.light-theme .language-select option {
  background: #ffffff;
  color: #142033;
}

body.light-theme .topic-select-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(235, 245, 255, 0.82));
}

body.light-theme .topic-select {
  background: #ffffff;
  color: #142033;
}

body.light-theme .topic-select option {
  background: #ffffff;
  color: #142033;
}

body.light-theme .seg,
body.light-theme .topic,
body.light-theme .secondary-button,
body.light-theme .daily-check,
body.light-theme .auto-status,
body.light-theme .generated-file-item,
body.light-theme .log-box {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(235, 245, 255, 0.82));
  color: var(--text);
}

body.light-theme .seg.active,
body.light-theme .primary-button,
body.light-theme .auto-start,
body.light-theme .theme-button.active {
  background: linear-gradient(135deg, #db2777, #7c3aed 55%, #0ea5e9);
  color: #ffffff;
}

body.light-theme .topic.active {
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.14), rgba(14, 165, 233, 0.14));
}

body.light-theme .log-box {
  color: #22324a;
}

body.light-theme .preview-stage {
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    radial-gradient(circle at 78% 24%, rgba(255, 61, 242, 0.13), transparent 24%),
    radial-gradient(circle at 20% 78%, rgba(38, 247, 255, 0.1), transparent 24%),
    radial-gradient(circle at 42% 18%, rgba(226, 170, 94, 0.18), transparent 30%),
    linear-gradient(90deg, rgba(3, 5, 7, 0.96) 0%, rgba(8, 9, 12, 0.92) 44%, rgba(3, 5, 8, 0.98) 100%);
}

.layout-preview {
  margin-top: 10px;
}

.preview-stage {
  position: relative;
  height: 430px;
  overflow: hidden;
  border: 1px solid rgba(38, 247, 255, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    radial-gradient(circle at 78% 24%, rgba(255, 61, 242, 0.13), transparent 24%),
    radial-gradient(circle at 20% 78%, rgba(38, 247, 255, 0.1), transparent 24%),
    radial-gradient(circle at 42% 18%, rgba(226, 170, 94, 0.18), transparent 30%),
    linear-gradient(90deg, rgba(3, 5, 7, 0.96) 0%, rgba(8, 9, 12, 0.92) 44%, rgba(3, 5, 8, 0.98) 100%);
  background-size: 36px 36px, 36px 36px, auto, auto, auto, auto;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.72), 0 0 24px rgba(38, 247, 255, 0.1), 0 0 32px rgba(255, 61, 242, 0.06);
}

.preview-left,
.preview-right {
  position: absolute;
  inset-block: 0;
}

.preview-left {
  left: 0;
  width: 47%;
}

.preview-right {
  right: 0;
  width: 48%;
}

.preview-cover-art {
  position: absolute;
  left: 24px;
  top: 96px;
  z-index: 3;
  width: 180px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.14)),
    radial-gradient(circle at 48% 48%, rgba(255, 192, 109, 0.4), transparent 13%),
    linear-gradient(135deg, #2b2f2e, #11151a 46%, #5b321e);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 61, 242, 0.16);
}

.preview-cover-art::before {
  opacity: 0.92;
}

.preview-cover-art img,
.preview-label img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-cover-art img {
  z-index: 1;
}

.preview-cover-art.has-cover::before,
.preview-cover-art.has-cover::after {
  display: none;
}

.preview-cover-art::before,
.preview-cover-art::after {
  content: "";
  position: absolute;
}

.preview-cover-art::before {
  inset: 42% 0 0;
  background:
    linear-gradient(95deg, transparent 0 20%, rgba(255, 159, 82, 0.28) 21% 24%, transparent 25% 44%, rgba(255, 146, 73, 0.26) 45% 49%, transparent 50%),
    linear-gradient(#15100d, #2c1b12);
}

.preview-cover-art::after {
  left: 78px;
  bottom: 27px;
  width: 66px;
  height: 86px;
  border-radius: 48% 48% 6px 6px;
  background: linear-gradient(90deg, #1d2227 0 45%, #12171d 46% 54%, #2a3036 55%);
  box-shadow: -20px 2px 0 -4px rgba(36, 40, 43, 0.95), 18px 2px 0 -5px rgba(24, 28, 34, 0.95);
}

.preview-cover-art span {
  position: relative;
  z-index: 3;
  display: block;
  padding: 16px 14px 0;
  color: rgba(255, 244, 217, 0.92);
  font-size: 13px;
  line-height: 1.22;
  text-shadow: 0 2px 12px rgba(255, 204, 143, 0.44), 0 0 16px rgba(38, 247, 255, 0.12);
}

.preview-cover-art.has-cover span {
  display: none;
}

.preview-vinyl {
  position: absolute;
  left: 112px;
  top: 84px;
  z-index: 1;
  width: 205px;
  height: 205px;
  border-radius: 50%;
  background:
    conic-gradient(from 18deg, transparent 0 62deg, rgba(255, 255, 255, 0.12) 72deg, transparent 92deg, transparent 178deg, rgba(226, 170, 94, 0.1) 190deg, transparent 214deg, transparent 360deg),
    repeating-radial-gradient(circle, #111 0 4px, #1b1b1b 5px 7px, #090909 8px 12px),
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.12), transparent 26%);
  box-shadow: 0 42px 90px rgba(0, 0, 0, 0.58), inset 0 0 36px rgba(255, 255, 255, 0.08), 0 0 26px rgba(38, 247, 255, 0.13);
  animation: previewLpSpin 5.8s linear infinite;
  transform-origin: center;
  will-change: transform;
}

.preview-vinyl[data-lp-color="brown"] {
  background:
    conic-gradient(from 18deg, transparent 0 62deg, rgba(255, 255, 255, 0.12) 72deg, transparent 92deg, transparent 178deg, rgba(226, 170, 94, 0.1) 190deg, transparent 214deg, transparent 360deg),
    repeating-radial-gradient(circle, #2a160d 0 4px, #4a2a18 5px 7px, #1a0d08 8px 12px),
    radial-gradient(circle at 34% 28%, rgba(255, 214, 161, 0.16), transparent 26%);
}

.preview-vinyl[data-lp-color="black"] {
  background:
    conic-gradient(from 18deg, transparent 0 62deg, rgba(255, 255, 255, 0.14) 72deg, transparent 92deg, transparent 178deg, rgba(170, 190, 255, 0.1) 190deg, transparent 214deg, transparent 360deg),
    repeating-radial-gradient(circle, #08090c 0 4px, #1a1d24 5px 7px, #030407 8px 12px),
    radial-gradient(circle at 34% 28%, rgba(200, 220, 255, 0.12), transparent 26%);
}

.preview-vinyl[data-lp-color="ruby"] {
  background:
    conic-gradient(from 18deg, transparent 0 62deg, rgba(255, 214, 224, 0.16) 72deg, transparent 92deg, transparent 178deg, rgba(255, 92, 132, 0.14) 190deg, transparent 214deg, transparent 360deg),
    repeating-radial-gradient(circle, #3a0714 0 4px, #6e1530 5px 7px, #17030a 8px 12px),
    radial-gradient(circle at 34% 28%, rgba(255, 92, 132, 0.16), transparent 26%);
}

.preview-vinyl[data-lp-color="blue"] {
  background:
    conic-gradient(from 18deg, transparent 0 62deg, rgba(190, 238, 255, 0.16) 72deg, transparent 92deg, transparent 178deg, rgba(70, 190, 255, 0.14) 190deg, transparent 214deg, transparent 360deg),
    repeating-radial-gradient(circle, #061c33 0 4px, #123e6c 5px 7px, #03101f 8px 12px),
    radial-gradient(circle at 34% 28%, rgba(70, 190, 255, 0.16), transparent 26%);
}

.preview-vinyl[data-lp-color="emerald"] {
  background:
    conic-gradient(from 18deg, transparent 0 62deg, rgba(197, 255, 230, 0.16) 72deg, transparent 92deg, transparent 178deg, rgba(76, 255, 180, 0.13) 190deg, transparent 214deg, transparent 360deg),
    repeating-radial-gradient(circle, #06251b 0 4px, #14543c 5px 7px, #02110c 8px 12px),
    radial-gradient(circle at 34% 28%, rgba(76, 255, 180, 0.15), transparent 26%);
}

.preview-vinyl[data-lp-color="purple"] {
  background:
    conic-gradient(from 18deg, transparent 0 62deg, rgba(230, 205, 255, 0.16) 72deg, transparent 92deg, transparent 178deg, rgba(186, 120, 255, 0.14) 190deg, transparent 214deg, transparent 360deg),
    repeating-radial-gradient(circle, #21103b 0 4px, #442072 5px 7px, #0d061b 8px 12px),
    radial-gradient(circle at 34% 28%, rgba(186, 120, 255, 0.16), transparent 26%);
}

.preview-vinyl {
  opacity: 0.92;
}

.preview-vinyl::before,
.preview-vinyl::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.preview-vinyl::before {
  inset: 23px;
}

.preview-vinyl::after {
  inset: 45px;
}

.preview-label {
  position: absolute;
  inset: 74px;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(238, 191, 118, 0.95) 0 17%, #0b0b0b 18% 100%);
  border: 8px solid #0b0b0b;
}

.preview-label::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 236, 194, 0.92);
  box-shadow: 0 0 10px rgba(255, 218, 148, 0.7);
}

.preview-label.has-cover::after {
  right: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translate(50%, -50%);
  background: rgba(8, 8, 8, 0.92);
  box-shadow: 0 0 0 2px rgba(255, 236, 194, 0.72), 0 0 10px rgba(255, 218, 148, 0.55);
}

.preview-tonearm {
  position: absolute;
  left: 248px;
  top: 112px;
  z-index: 4;
  width: 126px;
  height: 70px;
  transform: rotate(17deg);
  transform-origin: 106px 20px;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.42));
}

.preview-tonearm::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 22px;
  width: 90px;
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.2) 44%, rgba(80, 60, 44, 0.55) 100%),
    linear-gradient(90deg, #a97950 0%, #fff0c8 24%, #e8d19c 66%, #8b6546 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -1px 0 rgba(44, 28, 18, 0.48),
    0 3px 7px rgba(0, 0, 0, 0.42);
}

.preview-tonearm::after {
  content: "";
  position: absolute;
  right: 0;
  top: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 236, 190, 0.98) 0 9%, #7b4b2d 10% 22%, transparent 23%),
    radial-gradient(circle at 50% 50%, #d59b58 0 39%, #613a24 40% 65%, rgba(17, 12, 10, 0.92) 66% 100%);
  box-shadow:
    inset 0 3px 8px rgba(255, 238, 196, 0.26),
    inset 0 -5px 10px rgba(26, 16, 12, 0.42),
    0 0 0 3px rgba(8, 8, 10, 0.2);
}

.preview-tonearm i {
  position: absolute;
  left: 1px;
  top: 15px;
  width: 27px;
  height: 16px;
  border-radius: 8px 3px 4px 9px;
  background:
    linear-gradient(145deg, rgba(255, 214, 154, 0.18), transparent 42%),
    linear-gradient(135deg, #654024 0%, #2c1c13 45%, #08090b 100%);
  transform: rotate(-10deg);
  box-shadow:
    inset 0 1px 0 rgba(255, 216, 160, 0.24),
    inset 0 -5px 8px rgba(0, 0, 0, 0.42),
    0 3px 8px rgba(0, 0, 0, 0.48);
}

.preview-tonearm i::before {
  content: "";
  position: absolute;
  right: -8px;
  top: 5px;
  width: 12px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9a6f48, #f6dfae 58%, #7b5639);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.preview-tonearm i::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: -8px;
  width: 7px;
  height: 12px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(180deg, #d4b07d, #3b2519 70%, #070707 71% 100%);
  clip-path: polygon(26% 0, 74% 0, 62% 74%, 50% 100%, 38% 74%);
  transform: rotate(5deg);
  box-shadow: 0 4px 6px rgba(0,0,0,0.46);
}

.preview-title-block {
  position: absolute;
  left: 24px;
  top: 300px;
  z-index: 4;
}

.preview-title-block span,
.preview-meta {
  color: rgba(255, 255, 255, 0.64);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.preview-title-block strong {
  display: block;
  max-width: 286px;
  color: rgba(255, 244, 225, 0.88);
  font-size: 16px;
  line-height: 1.14;
  margin-top: 4px;
  text-shadow: 0 0 18px rgba(255, 61, 242, 0.18);
}

.preview-title-block p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  line-height: 1.4;
}

.preview-meta {
  display: flex;
  justify-content: space-between;
  margin: 62px 24px 0 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(38, 247, 255, 0.24);
}

.preview-main-lyrics {
  margin: 96px 28px 0 0;
}

.preview-main-lyrics strong {
  display: block;
  color: rgba(255, 248, 236, 0.92);
  font-size: 17px;
  line-height: 1.32;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.62), 0 0 24px rgba(255, 248, 236, 0.12);
}

.preview-main-lyrics p,
.preview-main-lyrics small {
  display: block;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.22);
  font-size: 9.5px;
}

.preview-main-lyrics .preview-ghost {
  color: rgba(246, 239, 229, 0.28);
  font-size: 10px;
  line-height: 1.45;
  white-space: pre-line;
}

.preview-progress {
  position: absolute;
  left: 0;
  right: 24px;
  bottom: 112px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 61, 242, 0.52), rgba(38, 247, 255, 0.38), rgba(255,255,255,0.1));
  box-shadow: 0 0 14px rgba(38, 247, 255, 0.16);
}

.preview-wave {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  height: 58px;
  display: flex;
  gap: 0;
  align-items: center;
  opacity: 0.82;
}

.preview-wave::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 126, 62, 0.34), rgba(38, 247, 255, 0.38), rgba(255, 61, 242, 0.34));
  box-shadow: 0 0 18px rgba(38, 247, 255, 0.16);
}

.preview-wave span {
  display: block;
  flex: 1;
  height: 4px;
  min-width: 8px;
  border-radius: 999px;
  background: var(--c);
  box-shadow: 0 0 12px color-mix(in srgb, var(--c), transparent 42%);
  transform: translateY(var(--wave-y, 0));
  animation: previewWaveLine 2.8s ease-in-out infinite;
  animation-delay: calc(var(--wave-index, 0) * -0.11s);
}

.preview-wave span:nth-child(1) { --wave-y: 8px; --wave-y-alt: -6px; --wave-index: 1; }
.preview-wave span:nth-child(2) { --wave-y: 3px; --wave-y-alt: -9px; --wave-index: 2; }
.preview-wave span:nth-child(3) { --wave-y: -5px; --wave-y-alt: 7px; --wave-index: 3; }
.preview-wave span:nth-child(4) { --wave-y: -12px; --wave-y-alt: 10px; --wave-index: 4; }
.preview-wave span:nth-child(5) { --wave-y: -17px; --wave-y-alt: 13px; --wave-index: 5; }
.preview-wave span:nth-child(6) { --wave-y: -12px; --wave-y-alt: 9px; --wave-index: 6; }
.preview-wave span:nth-child(7) { --wave-y: -4px; --wave-y-alt: 8px; --wave-index: 7; }
.preview-wave span:nth-child(8) { --wave-y: 6px; --wave-y-alt: -8px; --wave-index: 8; }
.preview-wave span:nth-child(9) { --wave-y: 14px; --wave-y-alt: -12px; --wave-index: 9; }
.preview-wave span:nth-child(10) { --wave-y: 17px; --wave-y-alt: -14px; --wave-index: 10; }
.preview-wave span:nth-child(11) { --wave-y: 11px; --wave-y-alt: -10px; --wave-index: 11; }
.preview-wave span:nth-child(12) { --wave-y: 2px; --wave-y-alt: -7px; --wave-index: 12; }
.preview-wave span:nth-child(13) { --wave-y: -8px; --wave-y-alt: 10px; --wave-index: 13; }
.preview-wave span:nth-child(14) { --wave-y: -16px; --wave-y-alt: 13px; --wave-index: 14; }
.preview-wave span:nth-child(15) { --wave-y: -13px; --wave-y-alt: 11px; --wave-index: 15; }
.preview-wave span:nth-child(16) { --wave-y: -3px; --wave-y-alt: 8px; --wave-index: 16; }
.preview-wave span:nth-child(17) { --wave-y: 7px; --wave-y-alt: -7px; --wave-index: 17; }
.preview-wave span:nth-child(18) { --wave-y: 12px; --wave-y-alt: -9px; --wave-index: 18; }

@keyframes previewWaveLine {
  0%, 100% {
    transform: translateY(var(--wave-y, 0)) scaleX(0.94);
    opacity: 0.72;
  }

  50% {
    transform: translateY(var(--wave-y-alt, 0)) scaleX(1.08);
    opacity: 1;
  }
}

@keyframes previewLpSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.progress-track {
  height: 8px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(38, 247, 255, 0.12);
  box-shadow: inset 0 0 12px rgba(38, 247, 255, 0.12);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--cyan), var(--lime));
  box-shadow: 0 0 18px rgba(38, 247, 255, 0.34);
  transform-origin: left center;
  transition: width 220ms ease;
}

.log-box {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  max-height: 100%;
  margin: 12px 0 0;
  padding: 12px;
  overflow-y: auto;
  overflow-x: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(38, 247, 255, 0.48) rgba(3, 7, 22, 0.7);
  border: 1px solid rgba(38, 247, 255, 0.32);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(2, 5, 18, 0.96), rgba(6, 10, 29, 0.94));
  color: #d3d8e8;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  box-shadow: inset 0 0 28px rgba(38, 247, 255, 0.04), 0 0 18px rgba(38, 247, 255, 0.05);
}

.log-box::-webkit-scrollbar {
  width: 8px;
}

.log-box::-webkit-scrollbar-track {
  background: rgba(3, 7, 22, 0.72);
  border-radius: 999px;
}

.log-box::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 61, 242, 0.6), rgba(38, 247, 255, 0.6));
  border-radius: 999px;
}

@media (max-height: 780px) and (min-width: 981px) {
  .shell {
    padding-top: 10px;
    gap: 10px;
  }

  .hero {
    padding-bottom: 8px;
  }

  .subtitle {
    display: none;
  }

  .control-panel,
  .layout-preview-panel,
  .progress-panel {
    padding: 12px;
  }

  .topic {
    height: 25px;
    font-size: 10px;
  }

  .generated-files-panel {
    padding: 10px;
  }

  .generated-files-list {
    gap: 6px;
  }

  .generated-file-item {
    min-height: 40px;
    padding: 6px;
  }

  .log-box {
    height: 100%;
  }
}

@media (max-width: 980px) {
  .landing-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .landing-benefit-grid,
  .landing-pipeline-list,
  .landing-audience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-pipeline-list li::after {
    display: none;
  }

  .shell {
    display: block;
    width: min(100% - 24px, 1480px);
    min-height: auto;
    padding: 18px 0 32px;
  }

  .hero {
    padding: 10px 0 20px;
  }

  .control-panel,
  .layout-preview-panel,
  .progress-panel {
    margin-top: 18px;
  }

  .topic-grid,
  .style-options,
  .generated-files-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-head,
  .action-row,
  .auto-panel,
  .auto-controls {
    flex-direction: column;
  }

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

  .schedule-upload-row {
    grid-template-columns: 1fr;
  }

  .google-auth {
    position: static;
    justify-content: center;
    margin-top: 8px;
    flex-wrap: wrap;
  }

  .api-settings-form {
    grid-template-columns: 1fr;
  }

  .api-settings-head,
  .admin-panel-head,
  .admin-login-form,
  .api-settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .api-guide-content,
  .api-link-grid {
    grid-template-columns: 1fr;
  }

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

  .api-guide-content article {
    grid-column: 1;
  }

  .admin-login-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .member-row {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .member-row-head {
    display: none;
  }

  .member-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .auto-panel,
  .auto-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .auto-style-options {
    grid-column: 1;
    grid-template-columns: 1fr;
  }

  .progress-panel {
    height: 360px;
    max-height: 360px;
  }
}

@media (max-width: 620px) {
  .landing-page {
    width: min(100% - 20px, 560px);
    min-height: auto;
    padding-top: 22px;
  }

  .landing-hero {
    padding: 30px 18px;
    border-radius: 18px;
  }

  .landing-hero h1 {
    font-size: clamp(30px, 11vw, 42px);
  }

  .landing-section-head h2 {
    font-size: clamp(21px, 7vw, 28px);
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .landing-benefit-grid,
  .landing-pipeline-list,
  .landing-audience-grid,
  .pricing-grid,
  .api-variable-table div {
    grid-template-columns: 1fr;
  }

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

  .landing-actions,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .landing-start-button,
  .landing-link-button {
    width: 100%;
  }

  .shell {
    width: min(100% - 24px, 1480px);
  }

  .language-row,
  .style-options,
  .custom-topic-row,
  .topic-grid,
  .generated-files-list,
  .api-capture-grid {
    grid-template-columns: 1fr;
  }

  .language-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 16px, 1480px);
    padding: 8px 0 24px;
  }

  .hero {
    padding: 8px 0 12px;
  }

  .hero h1 {
    font-size: clamp(24px, 8vw, 34px);
  }

  .google-auth {
    gap: 6px;
  }

  .control-panel,
  .layout-preview-panel,
  .progress-panel {
    padding: 11px;
    border-radius: 9px;
  }

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

  .seg[data-language="mixed"],
  .mixed-language-row {
    grid-column: 1 / -1;
  }

  .mixed-language-row {
    grid-template-columns: 1fr;
    padding: 7px;
  }

  .style-options,
  .output-setting-row,
  .custom-topic-row,
  .topic-grid,
  .generated-files-list {
    grid-template-columns: 1fr;
  }

  .output-path-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .delete-after-upload {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .action-row .primary-button,
  .auto-controls .primary-button,
  .auto-controls .secondary-button {
    width: 100%;
  }

  #startButton {
    min-width: 0;
    font-size: 13px;
  }

  .layout-preview-panel {
    overflow: hidden;
  }

  .preview-stage {
    height: 330px;
  }

  .preview-cover-art {
    left: 14px;
    top: 86px;
    width: 124px;
  }

  .preview-cover-art span {
    padding: 10px 9px 0;
    font-size: 10px;
  }

  .preview-vinyl {
    left: 76px;
    top: 94px;
    width: 140px;
    height: 140px;
  }

  .preview-label {
    inset: 50px;
    border-width: 5px;
  }

  .preview-tonearm {
    left: 166px;
    top: 96px;
    transform: scale(0.76) rotate(17deg);
    transform-origin: 106px 20px;
  }

  .preview-title-block {
    left: 14px;
    top: 236px;
    max-width: 46%;
  }

  .preview-title-block strong {
    max-width: 160px;
    font-size: 12px;
  }

  .preview-right {
    width: 50%;
  }

  .preview-meta {
    margin: 48px 14px 0 0;
    font-size: 8px;
  }

  .preview-main-lyrics {
    margin: 70px 14px 0 0;
  }

  .preview-main-lyrics strong {
    font-size: 12px;
  }

  .preview-main-lyrics p,
  .preview-main-lyrics small,
  .preview-main-lyrics .preview-ghost {
    font-size: 8px;
  }

  .preview-progress {
    right: 14px;
    bottom: 88px;
  }

  .preview-wave {
    left: 14px;
    right: 14px;
    bottom: 14px;
    height: 44px;
  }
}
