/* Footer links (clean SaaS look) */
.tt-pill{
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid rgba(138,180,255,.34);
  background: linear-gradient(180deg, rgba(22, 34, 54, .96), rgba(14, 22, 35, .96));
  color: #ddeeff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  box-shadow:
    0 6px 18px rgba(0,0,0,.38),
    0 2px 6px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.07);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}

.tt-pill__text{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

.tt-pill--home{
  gap: 6px;
  padding-left: 12px;
  border-color: rgba(128, 156, 198, .38);
  background: linear-gradient(180deg, rgba(17, 25, 38, .86), rgba(11, 18, 29, .84));
}

.tt-pill__icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.tt-pill__icon svg,
.tt-pill__icon img{
  width: 16px;
  height: 16px;
  display: block;
}

.tt-pill__icon img{
  filter: brightness(0) invert(1);
}

/* Inline SVG icons placed directly inside a pill (e.g. trending-up on automations link) */
.tt-pill > svg{
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-left: 5px;
}

.tt-pill:hover{
  border-color: rgba(138,180,255,.56);
  background: linear-gradient(180deg, rgba(30, 46, 72, .98), rgba(20, 32, 52, .98));
  color: #f3f8ff;
  box-shadow:
    0 0 0 1px rgba(138,180,255,.20),
    0 10px 24px rgba(0,0,0,.40),
    inset 0 1px 0 rgba(255,255,255,.09);
  transform: translateY(-1px);
}

.tt-pill:focus-visible{
  outline: 2px solid rgba(138,180,255,.55);
  outline-offset: 2px;
}

/* TikTok CTA buttons (footer + in-app connect link) */
.tt-tiktok-btn{
  --tt-btn-h: 50px;
  margin: 0;
  width: auto;
  max-width: 100%;
  height: var(--tt-btn-h);
  padding: 0 16px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
  color: #ffffff;
  text-decoration: none;
  user-select: none;
  font-family: 'Inter', system-ui, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 120ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.tt-tiktok-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(37, 244, 238, 0.28),
    0 0 14px rgba(254, 44, 85, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.tt-tiktok-btn:active{
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(37, 244, 238, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tt-tiktok-btn:focus-visible{
  outline: 2px solid rgba(37, 244, 238, 0.58);
  outline-offset: 2px;
}

.tt-tiktok-btn__icon{
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: block;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  shape-rendering: geometricPrecision;
  filter: contrast(1.06) saturate(1.04);
}

.tt-tiktok-btn__text{
  line-height: 1;
  white-space: nowrap;
}

.tt-tiktok-btn.is-connected{
  gap: 8px;
  padding: 0 14px;
  border-color: rgba(255, 255, 255, 0.26);
}

.tt-tiktok-btn.is-connected .tt-tiktok-btn__text{
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}


.tiktok-login-btn{
  margin-left: auto;
}

/* Footer layout: floating pills + feedback, no card wrapper */
.tt-footer{
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 28px auto 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 700px){
  .tt-footer{
    margin-top: 18px;
  }
}

/* Pills left side */
.tt-footer__links{
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-width: 0;
  box-sizing: border-box;
}

/* Pills centered, feedback absolutely pinned to right edge */
.tt-footer.tt-footer--center .tt-footer__links{
  justify-content: center;
}

.tt-footer .cd-feedback-widget{
  display: inline-flex;
  align-items: center;
}

/* falls Layout zu schmal: Footer darf umbrechen statt overflow */
@media (max-width: 580px){
  .tt-footer{
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .tt-footer__links{
    justify-content: center;
  }
  .tt-footer .cd-feedback-widget{
    display: inline-flex;
  }
  .tiktok-login-btn{
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}



/* Animated card glow (constant-speed perimeter runner) */
.glow-card{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  box-shadow:
    0 12px 26px rgba(0,0,0,.26),
    0 2px 0 rgba(255,255,255,.02) inset;
}

.glow-card > *{
  position: relative;
  z-index: 1;
}

.cd-glow-ring{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.cd-glow-ring__track{
  display: none;
}

.cd-glow-ring__spark{
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: butt;
  stroke-linejoin: round;
  opacity: .95;
  filter:
    drop-shadow(0 0 5px rgba(243,208,96,.40))
    drop-shadow(0 0 8px rgba(165,40,44,.34));
}

@media (prefers-reduced-motion: reduce){
  .cd-glow-ring__spark{
    filter: none;
    opacity: .62;
  }
}

/* Audio toggle (Uiverse switch, scoped) */
.switch{
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 3.5em;
  height: 2em;
  margin-top: 6px; /* align with inputs */
}

.switch input{
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider{
  position: absolute;
  cursor: pointer;
  inset: 0;
  border: 2px solid rgba(138,180,255,.40);
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
  background: rgba(138,180,255,.06);
}

.switch .slider:before{
  position: absolute;
  content: "";
  height: 1.4em;
  width: 1.4em;
  left: 0.2em;
  bottom: 0.2em;
  background-color: #fff;
  border-radius: inherit;
  transition: all 0.4s cubic-bezier(0.23,1,0.320,1);
}

.switch input:checked + .slider{
  box-shadow: 0 0 20px rgba(63,233,255,.35), 0 0 16px rgba(255,34,51,.18);
  border: 2px solid rgba(63,233,255,.85);
}

.switch input:checked + .slider:before{
  transform: translateX(1.5em);
}

/* Generate button: hover-glow variant */
.glow-on-hover{
  width: 220px;
  height: 50px;
  border: none;
  outline: none;
  color: #eff7ff;
  background: #0d1119;
  cursor: pointer;
  position: relative;
  z-index: 0;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .015em;
}

.glow-on-hover::before{
  content: "";
  background: linear-gradient(45deg, #fe2c55, #3f7fff, #00d4ff, #38d39f, #fe2c55);
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 220%;
  z-index: -1;
  filter: blur(4px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing 10s linear infinite;
  opacity: .74;
  transition: opacity .3s ease-in-out;
  border-radius: 10px;
}

.glow-on-hover:hover{
  transform: translateY(-2px) scale(1.01);
}

.glow-on-hover:hover::before{
  opacity: 1;
  filter: blur(6px);
}

.glow-on-hover:active{
  color: #f4f9ff;
  transform: translateY(0) scale(.985);
}

.glow-on-hover:active::after{
  background: transparent;
}

.glow-on-hover{
  transition: transform 120ms ease, box-shadow 180ms ease;
}

.glow-on-hover::after{
  z-index: -1;
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #0d1119;
  border: 1px solid rgba(184,205,235,.34);
  box-sizing: border-box;
  left: 0;
  top: 0;
  border-radius: 10px;
}

@keyframes glowing{
  0% { background-position: 0 0; }
  50% { background-position: 220% 0; }
  100% { background-position: 0 0; }
}

/* Prompt textarea: stable input behavior + visible, subtle scrollbar */
#inputPrompt,
#inputImagePrompt{
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  height: 100%;
  min-height: 100%;
  resize: none;
  line-height: 1.5;
  font-size: 14px;
  padding: 12px 14px 14px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  scrollbar-width: thin;
  scrollbar-color: rgba(138,180,255,.45) rgba(255,255,255,.06);
  -webkit-overflow-scrolling: touch;
}

.cd-input-shell{
  min-height: 120px;
  max-height: 260px;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(98, 116, 150, .56);
  background: #0c111b;
  background-clip: padding-box;
}

.cd-input-shell:focus-within{
  border-color: rgba(138,180,255,.62);
  box-shadow: 0 0 0 1px rgba(138,180,255,.20), 0 0 12px rgba(138,180,255,.10);
}

#inputPrompt:focus,
#inputImagePrompt:focus{
  outline: none;
}

.cd-resize-bar{
  height: 12px;
  margin-top: 4px;
  border-radius: 8px;
  cursor: ns-resize;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(88, 102, 132, .35);
  position: relative;
  user-select: none;
  touch-action: none;
}

.cd-resize-bar::before{
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 3px;
  border-radius: 99px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, rgba(63,233,255,.45), rgba(138,180,255,.55));
}

.cd-resize-bar:hover,
.cd-resize-bar.is-dragging{
  border-color: rgba(63,233,255,.55);
  box-shadow: 0 0 0 1px rgba(63,233,255,.14), 0 0 10px rgba(63,233,255,.10);
}

#inputPrompt::-webkit-scrollbar,
#inputImagePrompt::-webkit-scrollbar{
  width: 8px;
  height: 8px;
}

#inputPrompt::-webkit-scrollbar-thumb,
#inputImagePrompt::-webkit-scrollbar-thumb{
  border-radius: 999px;
  background: rgba(138,180,255,.42);
}

#inputPrompt::-webkit-scrollbar-track,
#inputImagePrompt::-webkit-scrollbar-track{
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}

#inputPrompt::-webkit-scrollbar-button,
#inputImagePrompt::-webkit-scrollbar-button{
  display: none;
  width: 0;
  height: 0;
}

/* Core /app prompt field: fixed clean input with classic scrollbar (no resize grip) */
#corePrompt{
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin-top: 0;
  padding: 12px 14px 14px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 1.5;
  font-size: 14px;
  resize: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(138,180,255,.45) rgba(255,255,255,.06);
}

#corePrompt:focus{
  outline: none;
}

#corePrompt::-webkit-scrollbar{
  width: 8px;
  height: 8px;
}

#corePrompt::-webkit-scrollbar-thumb{
  border-radius: 999px;
  background: rgba(138,180,255,.42);
}

#corePrompt::-webkit-scrollbar-track{
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}

.cd-generate-row{
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  width: 100%;
  margin-top: 26px;
  margin-bottom: 8px;
}

.cd-mode-primary-hint{
  margin: 0;
  font-size: 11px;
  color: #bdd0ea;
  letter-spacing: .01em;
}

.cd-generate-row #go{
  margin-top: 0;
}
