:root {
  --bg: #050509;
  --panel: rgba(15, 15, 24, 0.88);
  --border: rgba(167, 103, 255, 0.22);
  --text: #f3f0ff;
  --muted: #a7a1bf;
  --soft: #cfc7e8;
  --purple: #a855f7;
  --purple-2: #c084fc;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius-lg: 26px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(168,85,247,.18), transparent 25%),
    radial-gradient(circle at top right, rgba(111,50,255,.12), transparent 25%),
    linear-gradient(180deg, #030306, #06070b 32%, #05050a 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,.25));
}

.app {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 18px;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(12,12,18,.94), rgba(9,9,15,.88));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(192,132,252,.9), transparent);
  box-shadow: 0 0 16px rgba(192,132,252,.8);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  padding: 4px;
}

.brand-title {
  font-family: Orbitron, sans-serif;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.brand-title span:first-child {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255,255,255,.12);
}

.brand-title span:last-child {
  color: var(--purple-2);
  text-shadow: 0 0 18px rgba(192,132,252,.45);
}

.brand-subtitle {
  margin-top: 6px;
  color: var(--soft);
  font-size: 15px;
}

.layout {
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 18px;
}

.panel {
  background: linear-gradient(180deg, rgba(13,13,22,.95), rgba(10,10,18,.92));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 16px;
  height: fit-content;
}

.card {
  background: linear-gradient(180deg, rgba(16,16,28,.98), rgba(11,11,21,.95));
  border: 1px solid rgba(168,85,247,.18);
  border-radius: 18px;
  padding: 16px;
  box-shadow: inset 0 0 30px rgba(168,85,247,.03);
}

.card-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .4px;
  color: #f3eaff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
}

.icon-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--purple-2);
  box-shadow: 0 0 12px rgba(192,132,252,.9);
}

.upload-zone {
  border: 1px dashed rgba(192,132,252,.35);
  border-radius: 18px;
  min-height: 140px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  background: radial-gradient(circle at center, rgba(168,85,247,.08), rgba(255,255,255,.02));
  cursor: pointer;
  transition: .2s ease;
}

.upload-zone:hover {
  border-color: rgba(192,132,252,.7);
  box-shadow: 0 0 20px rgba(168,85,247,.08);
}

.upload-zone strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  color: #f5edff;
}

.upload-zone span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.upload-zone button {
  pointer-events: none;
}

input[type="file"] {
  display: none;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--soft);
  margin-bottom: 8px;
  font-weight: 600;
}

.input,
.textarea,
.select {
  width: 100%;
  background: rgba(255,255,255,.03);
  color: white;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  outline: none;
  transition: .2s ease;
  font-family: inherit;
}

.input,
.select {
  height: 44px;
  padding: 0 14px;
}

.textarea {
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.45;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(192,132,252,.5);
  box-shadow: 0 0 0 4px rgba(168,85,247,.08);
}

.select option {
  background: #101018;
  color: white;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-group {
  display: grid;
  gap: 10px;
}

.radio-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  color: #e9ddff;
}

.radio-item small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.radio-item input {
  accent-color: var(--purple-2);
  margin-top: 3px;
}

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  color: var(--soft);
  font-size: 14px;
  font-weight: 600;
}

.switch input {
  width: 44px;
  height: 22px;
  accent-color: var(--purple);
}

.btn {
  border: 0;
  border-radius: 15px;
  height: 52px;
  padding: 0 18px;
  cursor: pointer;
  transition: .2s ease;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
}

.btn-primary {
  width: 100%;
  color: white;
  background: linear-gradient(135deg, #8b45ff, #c084fc);
  box-shadow: 0 10px 30px rgba(168,85,247,.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(168,85,247,.35);
}

.btn-secondary {
  color: #f0e8ff;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(192,132,252,.28);
}

.btn-secondary:hover {
  background: rgba(168,85,247,.07);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.preview-panel {
  padding: 14px;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 14px;
  border-bottom: 1px solid rgba(168,85,247,.16);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.preview-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.control-btn,
.control-select {
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.03);
  color: white;
  padding: 0 14px;
  font-family: inherit;
}

.control-select option {
  background: #101018;
}

.preview-wrap {
  background: linear-gradient(180deg, rgba(11,11,20,.9), rgba(8,8,15,.95));
  border: 1px solid rgba(192,132,252,.18);
  border-radius: 22px;
  padding: 14px;
  box-shadow: inset 0 0 60px rgba(168,85,247,.04);
}

.canvas-shell {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid rgba(192,132,252,.5);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.05),
    0 0 30px rgba(168,85,247,.22),
    inset 0 0 40px rgba(168,85,247,.08);
  background: #050509;
  aspect-ratio: 16 / 9;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #090909;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  background: linear-gradient(rgba(4,4,8,.55), rgba(4,4,8,.75));
  pointer-events: none;
}

.empty-state h3 {
  font-size: 24px;
  margin-bottom: 8px;
  color: #f6edff;
}

.empty-state p {
  color: var(--muted);
  max-width: 480px;
  line-height: 1.6;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
  line-height: 1.55;
}

@media (max-width: 1280px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .button-row,
  .row-2 {
    grid-template-columns: 1fr;
  }

  .preview-controls {
    width: 100%;
  }

  .control-btn,
  .control-select {
    width: 100%;
  }
}


/* SLIDER CONTROL */
.slider-grid {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  margin-bottom: 12px;
}

.slider-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.slider-head label {
  margin-bottom: 0;
  font-size: 13px;
  color: var(--soft);
  font-weight: 700;
}

.slider-head span {
  min-width: 82px;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: #f3eaff;
  background: rgba(168,85,247,.10);
  border: 1px solid rgba(192,132,252,.22);
  border-radius: 999px;
  padding: 5px 10px;
  box-shadow: inset 0 0 14px rgba(168,85,247,.06);
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  outline: none;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: inset 0 0 12px rgba(0,0,0,.45);
}

.range-slider::-webkit-slider-runnable-track {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(124,58,237,.95), rgba(192,132,252,.95));
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid #a855f7;
  margin-top: -6px;
  box-shadow: 0 0 0 5px rgba(168,85,247,.18), 0 0 18px rgba(192,132,252,.55);
}

.range-slider::-moz-range-track {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(124,58,237,.95), rgba(192,132,252,.95));
}

.range-slider::-moz-range-thumb {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid #a855f7;
  box-shadow: 0 0 0 5px rgba(168,85,247,.18), 0 0 18px rgba(192,132,252,.55);
}

.creator-watermark {
  margin: 18px auto 0;
  text-align: center;
  color: rgba(243, 234, 255, .62);
  font-size: 12px;
  letter-spacing: .3px;
  padding: 12px 16px;
}

.creator-watermark b {
  color: #c084fc;
  font-weight: 800;
}


/* AUTO TRANSLATE UI */
.translate-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(168,85,247,.08), rgba(255,255,255,.025));
  border: 1px solid rgba(192,132,252,.18);
}

.translate-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #f3eaff;
  margin-bottom: 12px;
}

.compact-switch {
  padding: 8px 0 12px;
  font-size: 13px;
}

.translate-btn {
  width: 100%;
  height: 44px;
}

.translate-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.translate-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.translate-note.success {
  color: #a7f3d0;
}

.translate-note.error {
  color: #fca5a5;
}


.translate-box .select {
  margin-bottom: 4px;
}


/* PREMIUM SMOOTH ANIMATION */
.ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(34px);
  opacity: .35;
  mix-blend-mode: screen;
}

.orb-one {
  width: 420px;
  height: 420px;
  left: -160px;
  top: 130px;
  background: radial-gradient(circle, rgba(168,85,247,.38), transparent 70%);
  animation: orbOne 14s ease-in-out infinite;
}

.orb-two {
  width: 520px;
  height: 520px;
  right: -210px;
  top: 70px;
  background: radial-gradient(circle, rgba(192,132,252,.24), transparent 72%);
  animation: orbTwo 17s ease-in-out infinite;
}

.orb-three {
  width: 340px;
  height: 340px;
  right: 28%;
  bottom: -140px;
  background: radial-gradient(circle, rgba(124,58,237,.22), transparent 72%);
  animation: orbThree 19s ease-in-out infinite;
}

.moving-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(192,132,252,.06) 46%, transparent 64%);
  transform: translateX(-70%);
  animation: movingLine 10s ease-in-out infinite;
}

@keyframes orbOne {
  0%,100% { transform: translate3d(0,0,0) scale(1); opacity: .25; }
  45% { transform: translate3d(58px,-28px,0) scale(1.08); opacity: .46; }
  75% { transform: translate3d(22px,42px,0) scale(.96); opacity: .34; }
}

@keyframes orbTwo {
  0%,100% { transform: translate3d(0,0,0) scale(1); opacity: .22; }
  50% { transform: translate3d(-70px,40px,0) scale(1.07); opacity: .40; }
  80% { transform: translate3d(-18px,-30px,0) scale(.98); opacity: .28; }
}

@keyframes orbThree {
  0%,100% { transform: translate3d(0,0,0) scale(1); opacity: .17; }
  50% { transform: translate3d(-42px,-50px,0) scale(1.14); opacity: .33; }
}

@keyframes movingLine {
  0%,55% { transform: translateX(-80%); opacity: 0; }
  70% { opacity: .75; }
  100% { transform: translateX(80%); opacity: 0; }
}

.reveal-item {
  opacity: 0;
  transform: translateY(16px) scale(.992);
}

body.page-ready .reveal-item {
  animation: revealUp .72s cubic-bezier(.16,1,.3,1) both;
}

body.page-ready .topbar { animation-delay: .03s; }
body.page-ready .sidebar .reveal-item:nth-child(1) { animation-delay: .08s; }
body.page-ready .sidebar .reveal-item:nth-child(2) { animation-delay: .14s; }
body.page-ready .sidebar .reveal-item:nth-child(3) { animation-delay: .20s; }
body.page-ready .sidebar .reveal-item:nth-child(4) { animation-delay: .26s; }
body.page-ready .sidebar .reveal-item:nth-child(5) { animation-delay: .32s; }
body.page-ready .preview-panel { animation-delay: .14s; }

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.topbar,
.card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.topbar::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx,50%) var(--my,0%), rgba(192,132,252,.13), transparent 36%);
  opacity: 0;
  transition: opacity .25s ease;
  z-index: -1;
}

.topbar:hover::before,
.card:hover::before {
  opacity: 1;
}

.topbar::after {
  background: linear-gradient(90deg, transparent, rgba(124,58,237,.35), rgba(192,132,252,.98), rgba(124,58,237,.35), transparent);
  background-size: 220% 100%;
  animation: headerFlow 5.8s linear infinite;
}

@keyframes headerFlow {
  from { background-position: 0% 50%; }
  to { background-position: 220% 50%; }
}

.brand img {
  transition: transform .35s ease, filter .35s ease, border-color .35s ease;
}

.brand:hover img {
  transform: translateY(-2px) scale(1.025);
  filter: drop-shadow(0 0 18px rgba(192,132,252,.45));
  border-color: rgba(192,132,252,.35);
}

.brand-title span:last-child {
  animation: titleGlow 4.8s ease-in-out infinite;
}

@keyframes titleGlow {
  0%,100% { text-shadow: 0 0 14px rgba(192,132,252,.38); }
  50% { text-shadow: 0 0 26px rgba(192,132,252,.70), 0 0 52px rgba(124,58,237,.24); }
}

.card,
.panel,
.upload-zone,
.preview-wrap,
.canvas-shell,
.btn,
.select,
.textarea,
.control-select {
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease, background .24s ease, opacity .24s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(192,132,252,.34);
  box-shadow: inset 0 0 30px rgba(168,85,247,.055), 0 14px 34px rgba(0,0,0,.22);
}

.icon-bullet {
  animation: bulletPulse 2.6s ease-in-out infinite;
}

@keyframes bulletPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 10px rgba(192,132,252,.75); }
  50% { transform: scale(1.18); box-shadow: 0 0 18px rgba(192,132,252,.96), 0 0 32px rgba(168,85,247,.30); }
}

.upload-zone {
  position: relative;
  overflow: hidden;
}

.upload-zone::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 20%, rgba(192,132,252,.18), transparent 48%);
  transform: translateX(-120%);
  animation: uploadSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}

.upload-zone::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(192,132,252,.14), transparent 70%);
  animation: uploadPulse 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes uploadSweep {
  0%,58% { transform: translateX(-120%); opacity: 0; }
  72% { opacity: .85; }
  100% { transform: translateX(120%); opacity: 0; }
}

@keyframes uploadPulse {
  0%,100% { transform: translate(-50%, -50%) scale(.88); opacity: .24; }
  50% { transform: translate(-50%, -50%) scale(1.14); opacity: .54; }
}

.upload-zone:hover,
.btn:hover,
.control-select:hover {
  transform: translateY(-1px);
}

.range-slider {
  background-size: 220% 100%;
  animation: sliderFlow 6s linear infinite;
}

@keyframes sliderFlow {
  from { background-position: 0% 50%; }
  to { background-position: 220% 50%; }
}

.range-slider::-webkit-slider-thumb {
  transition: transform .18s ease, box-shadow .18s ease;
}

.range-slider:hover::-webkit-slider-thumb {
  transform: scale(1.08);
  box-shadow: 0 0 0 6px rgba(168,85,247,.22), 0 0 24px rgba(192,132,252,.68);
}

.range-slider::-moz-range-thumb {
  transition: transform .18s ease, box-shadow .18s ease;
}

.range-slider:hover::-moz-range-thumb {
  transform: scale(1.08);
  box-shadow: 0 0 0 6px rgba(168,85,247,.22), 0 0 24px rgba(192,132,252,.68);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  animation: downloadBreath 3.8s ease-in-out infinite;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.24), transparent);
  transform: translateX(-120%);
  transition: transform .7s ease;
  pointer-events: none;
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

@keyframes downloadBreath {
  0%,100% { box-shadow: 0 10px 30px rgba(168,85,247,.25); }
  50% { box-shadow: 0 14px 42px rgba(192,132,252,.38); }
}

.textarea:focus,
.select:focus,
.control-select:focus {
  transform: translateY(-1px);
}

.textarea:focus {
  min-height: 138px;
}

.preview-wrap {
  position: relative;
  overflow: hidden;
}

.preview-wrap::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 22%, rgba(192,132,252,.09), transparent 44%);
  transform: translateX(-110%);
  animation: previewSweep 7.2s ease-in-out infinite;
}

.preview-wrap::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 22px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.035), transparent);
  opacity: .55;
  animation: previewLightMove 8s ease-in-out infinite;
}

@keyframes previewSweep {
  0%,55% { transform: translateX(-110%); opacity: 0; }
  72% { opacity: .9; }
  100% { transform: translateX(110%); opacity: 0; }
}

@keyframes previewLightMove {
  0%,100% { opacity: .38; transform: translateX(-12px); }
  50% { opacity: .70; transform: translateX(12px); }
}

.canvas-shell {
  will-change: transform, box-shadow;
  animation: canvasBreath 4.5s ease-in-out infinite;
}

.canvas-shell:hover {
  transform: translateY(-2px);
  border-color: rgba(216,180,254,.72);
}

.canvas-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.055) 42%, transparent 58%);
  transform: translateX(-120%);
  animation: canvasSweep 6.5s ease-in-out infinite;
}

@keyframes canvasBreath {
  0%,100% {
    box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 0 24px rgba(168,85,247,.18), inset 0 0 40px rgba(168,85,247,.07);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 0 38px rgba(192,132,252,.30), inset 0 0 50px rgba(168,85,247,.10);
  }
}

@keyframes canvasSweep {
  0%,62% { transform: translateX(-120%); opacity: 0; }
  72% { opacity: .75; }
  100% { transform: translateX(120%); opacity: 0; }
}

.translate-box {
  position: relative;
  overflow: hidden;
}

.translate-box::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 0%, rgba(192,132,252,.11), transparent 45%);
  opacity: .75;
}

.translate-note.success {
  animation: statusPulse 1.8s ease-in-out infinite;
}

@keyframes statusPulse {
  0%,100% { opacity: .82; }
  50% { opacity: 1; }
}

.creator-watermark {
  animation: watermarkBreath 5.5s ease-in-out infinite;
}

@keyframes watermarkBreath {
  0%,100% { opacity: .62; transform: translateY(0); }
  50% { opacity: .92; transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}



/* FIX: Jangan sampai elemen kosong kalau JS error / page-ready belum aktif */
.reveal-item {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  animation: safeReveal .55s cubic-bezier(.16, 1, .3, 1) both;
}

.topbar.reveal-item {
  animation-delay: .03s;
}

.sidebar .reveal-item:nth-child(1) { animation-delay: .06s; }
.sidebar .reveal-item:nth-child(2) { animation-delay: .10s; }
.sidebar .reveal-item:nth-child(3) { animation-delay: .14s; }
.sidebar .reveal-item:nth-child(4) { animation-delay: .18s; }
.sidebar .reveal-item:nth-child(5) { animation-delay: .22s; }
.preview-panel.reveal-item { animation-delay: .10s; }

@keyframes safeReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* NEON RUNNING TEXT - MIDNIGHT RUSH */
.brand-text {
  min-width: 0;
}

.brand-marquee {
  position: relative;
  width: min(100%, 430px);
  overflow: hidden;
  padding: 4px 0 6px;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.brand-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 52px;
  min-width: max-content;
  animation: brandMarqueeMove 10s linear infinite;
}

.brand:hover .brand-marquee-track {
  animation-play-state: paused;
}

.neon-text {
  font-family: Orbitron, sans-serif;
  font-size: clamp(28px, 3.1vw, 42px);
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffffff 0%, #f8ebff 20%, #c084fc 55%, #8b45ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 6px rgba(255,255,255,.25),
    0 0 14px rgba(192,132,252,.35),
    0 0 28px rgba(168,85,247,.35),
    0 0 42px rgba(124,58,237,.22);
  filter: drop-shadow(0 0 10px rgba(192,132,252,.22));
  animation: neonPulseText 2.8s ease-in-out infinite alternate;
}

.brand-subtitle {
  letter-spacing: 2px;
  text-transform: uppercase;
}

@keyframes brandMarqueeMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 26px));
  }
}

@keyframes neonPulseText {
  0% {
    text-shadow:
      0 0 5px rgba(255,255,255,.18),
      0 0 12px rgba(192,132,252,.28),
      0 0 24px rgba(168,85,247,.26),
      0 0 36px rgba(124,58,237,.18);
    filter: drop-shadow(0 0 8px rgba(192,132,252,.18));
  }
  100% {
    text-shadow:
      0 0 7px rgba(255,255,255,.30),
      0 0 18px rgba(192,132,252,.50),
      0 0 34px rgba(168,85,247,.44),
      0 0 52px rgba(124,58,237,.26);
    filter: drop-shadow(0 0 14px rgba(192,132,252,.30));
  }
}

@media (max-width: 640px) {
  .brand-marquee {
    width: min(100%, 290px);
  }

  .brand-marquee-track {
    gap: 32px;
    animation-duration: 8s;
  }

  .neon-text {
    font-size: clamp(22px, 6vw, 30px);
    letter-spacing: 1.4px;
  }
}


/* RUNNING TEXT FIX - lebih jelas bergerak */
.brand {
  overflow: hidden;
}

.brand-text {
  min-width: 0;
  width: min(520px, 52vw);
}

.brand-marquee {
  position: relative;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  padding: 4px 0 7px;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.brand-marquee::before,
.brand-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  width: 42px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.brand-marquee::before {
  left: 0;
  background: linear-gradient(to right, rgba(7,7,12,.95), transparent);
}

.brand-marquee::after {
  right: 0;
  background: linear-gradient(to left, rgba(7,7,12,.95), transparent);
}

.brand-marquee-track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  white-space: nowrap;
  animation: midnightRushRun 5.2s linear infinite !important;
  will-change: transform;
}

.brand:hover .brand-marquee-track {
  animation-play-state: running !important;
}

.neon-text {
  font-family: Orbitron, sans-serif;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffffff 0%, #f6e8ff 24%, #c084fc 58%, #8b45ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 6px rgba(255,255,255,.28),
    0 0 16px rgba(192,132,252,.48),
    0 0 34px rgba(168,85,247,.38),
    0 0 54px rgba(124,58,237,.24);
  filter: drop-shadow(0 0 11px rgba(192,132,252,.26));
  animation: neonPulseText 2.2s ease-in-out infinite alternate;
}

.neon-separator {
  color: #c084fc;
  font-size: 14px;
  text-shadow: 0 0 12px rgba(192,132,252,.75);
  opacity: .82;
}

@keyframes midnightRushRun {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-33.333% - 17px));
  }
}

@keyframes neonPulseText {
  0% {
    text-shadow:
      0 0 5px rgba(255,255,255,.20),
      0 0 13px rgba(192,132,252,.34),
      0 0 26px rgba(168,85,247,.28),
      0 0 38px rgba(124,58,237,.18);
  }
  100% {
    text-shadow:
      0 0 8px rgba(255,255,255,.34),
      0 0 21px rgba(192,132,252,.64),
      0 0 42px rgba(168,85,247,.48),
      0 0 64px rgba(124,58,237,.30);
  }
}

@media (max-width: 640px) {
  .brand-text {
    width: min(330px, 80vw);
  }

  .brand-marquee-track {
    animation-duration: 4.4s !important;
    gap: 20px;
  }

  .neon-text {
    font-size: clamp(22px, 6vw, 30px);
    letter-spacing: 1.4px;
  }
}


/* CLEAR TITLE FIX - no running, no patah */
.brand-text {
  min-width: 0;
  width: auto !important;
}

.clean-neon-title {
  display: flex !important;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap !important;
  overflow: visible !important;
  white-space: nowrap !important;
  width: auto !important;
  max-width: none !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  padding: 0 !important;
  animation: none !important;
}

.clean-neon-title::before,
.clean-neon-title::after {
  display: none !important;
}

.midnight-word,
.rush-word {
  font-family: Orbitron, sans-serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  animation: none !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  filter: none !important;
}

.midnight-word {
  color: #ffffff !important;
  text-shadow:
    0 0 8px rgba(255,255,255,.22),
    0 0 18px rgba(255,255,255,.10) !important;
}

.rush-word {
  color: #6a06dbf6 !important;
  text-shadow:
    0 0 8px rgba(87, 11, 210, 0.55),
    0 0 18px rgba(101, 25, 201, 0.35),
    0 0 34px rgba(86, 1, 155, 0.2) !important;
}

.brand:hover .midnight-word,
.brand:hover .rush-word {
  transform: none !important;
}

.brand-marquee,
.brand-marquee-track,
.neon-text,
.neon-separator {
  animation: none !important;
}

@media (max-width: 640px) {
  .clean-neon-title {
    gap: 8px;
  }

  .midnight-word,
  .rush-word {
    font-size: clamp(22px, 6vw, 30px);
    letter-spacing: 1.2px;
  }
}


/* MOVING CLEAN TITLE - midnight putih, rush biru, tetap 1 baris */
.brand {
  overflow: hidden;
}

.brand-text {
  min-width: 0;
  width: auto !important;
}

.moving-clean-title {
  display: block !important;
  width: min(560px, 55vw);
  max-width: 100%;
  padding: 2px 0 4px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.moving-clean-wrap {
  width: 100%;
  overflow: hidden;
}

.moving-clean-track {
  display: inline-flex !important;
  align-items: center;
  gap: 48px;
  width: max-content;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
  will-change: transform;
  animation: cleanTitleRun 8s linear infinite !important;
}

.moving-title-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

.midnight-word,
.rush-word {
  font-family: Orbitron, sans-serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap !important;
  display: inline-block;
}

.midnight-word {
  color: #ffffff !important;
  text-shadow:
    0 0 6px rgba(255,255,255,.28),
    0 0 14px rgba(255,255,255,.12);
}

.rush-word {
  color: #c084fc !important;
  text-shadow:
    0 0 8px rgba(192,132,252,.62),
    0 0 18px rgba(192,132,252,.44),
    0 0 34px rgba(168,85,247,.26);
}

.brand:hover .moving-clean-track {
  animation-play-state: paused;
}

@keyframes cleanTitleRun {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 24px));
  }
}

/* matikan style lama yang bisa bikin patah / static */
.clean-neon-title,
.brand-marquee,
.brand-marquee-track,
.neon-text,
.neon-separator {
  animation: none !important;
}

.clean-neon-title {
  display: none !important;
}

@media (max-width: 900px) {
  .moving-clean-title {
    width: min(430px, 62vw);
  }
}

@media (max-width: 640px) {
  .moving-clean-title {
    width: min(320px, 78vw);
  }

  .moving-clean-track {
    gap: 34px;
    animation-duration: 6.5s !important;
  }

  .moving-title-group {
    gap: 8px;
  }

  .midnight-word,
  .rush-word {
    font-size: clamp(22px, 6vw, 30px);
    letter-spacing: 1.2px;
  }
}



/* HEADER FIX + DISCORD LINK */
.topbar {
  justify-content: space-between !important;
  align-items: center !important;
}

.brand {
  min-width: 0;
  flex: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand-subtitle {
  margin-top: 6px !important;
  display: block !important;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(207,199,232,.90);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
}

.discord-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  color: #f8f1ff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .3px;
  background:
    linear-gradient(135deg, rgba(88,101,242,.16), rgba(168,85,247,.13)),
    rgba(255,255,255,.035);
  border: 1px solid rgba(192,132,252,.28);
  box-shadow:
    inset 0 0 18px rgba(88,101,242,.08),
    0 12px 30px rgba(0,0,0,.16);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.discord-link:hover {
  transform: translateY(-1px);
  border-color: rgba(192,132,252,.48);
  background:
    linear-gradient(135deg, rgba(88,101,242,.25), rgba(168,85,247,.18)),
    rgba(255,255,255,.055);
  box-shadow:
    inset 0 0 22px rgba(88,101,242,.12),
    0 16px 36px rgba(88,101,242,.12),
    0 0 22px rgba(192,132,252,.16);
}

.discord-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #5865f2;
  box-shadow:
    0 0 8px rgba(88,101,242,.85),
    0 0 16px rgba(192,132,252,.45);
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .discord-link {
    width: 100%;
    justify-content: center;
  }
}


/* ANDROID PERFORMANCE MODE */
@media (max-width: 768px) {
  body::before,
  .ambient-layer,
  .orb,
  .moving-line,
  .preview-wrap::before,
  .preview-wrap::after,
  .canvas-shell::after,
  .upload-zone::before,
  .upload-zone::after,
  .topbar::before,
  .card::before {
    display: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .12s !important;
  }

  body {
    background: linear-gradient(180deg, #050509, #080812 60%, #050509 100%) !important;
  }

  .app {
    padding: 10px !important;
  }

  .topbar,
  .panel,
  .card,
  .preview-wrap,
  .canvas-shell,
  .btn-primary {
    box-shadow: 0 8px 22px rgba(0,0,0,.28) !important;
  }

  .topbar {
    border-radius: 18px !important;
    padding: 12px !important;
  }

  .brand img {
    width: 58px !important;
    height: 58px !important;
  }

  .layout {
    gap: 12px !important;
  }

  .sidebar,
  .preview-panel {
    padding: 10px !important;
  }

  .card {
    padding: 12px !important;
    border-radius: 15px !important;
  }

  .preview-wrap {
    padding: 8px !important;
    border-radius: 16px !important;
  }

  .canvas-shell {
    border-radius: 15px !important;
    border-width: 1px !important;
  }

  .textarea {
    min-height: 96px !important;
  }

  .btn {
    height: 46px !important;
  }
}
