:root {
  --bg: #050316;
  --card: rgba(15, 23, 42, 0.94);
  --accent: #ff8fd8;
  --accent2: #8b5cf6;
  --accent3: #facc15;
  --text-main: #fdfcff;
  --muted: #a5b4fc;
  --danger: #ff5b8a;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.8);
}

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

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, #ffb4e6 0, transparent 50%),
    radial-gradient(circle at 100% 0%, #a5b4fc 0, transparent 50%),
    radial-gradient(circle at 0% 100%, #fef08a 0, transparent 50%),
    radial-gradient(circle at 100% 100%, #7dd3fc 0, transparent 55%),
    linear-gradient(145deg, #050316 0%, #020617 55%, #0f172a 100%);
  min-height: 100vh;
  color: var(--text-main);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  z-index: -1;
  animation: float 14s ease-in-out infinite;
}

body::before {
  top: -80px;
  left: -60px;
  background: radial-gradient(circle, #fb7185, transparent 70%);
}

body::after {
  bottom: -80px;
  right: -60px;
  background: radial-gradient(circle, #38bdf8, transparent 70%);
  animation-delay: -5s;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 16px 72px;
}

/* HERO */

.hero {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(244, 114, 182, 0.7);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #f9a8d4;
  margin-bottom: 10px;
  backdrop-filter: blur(16px);
  animation: float-soft 5s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(32px, 6.6vw, 44px);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background-image: linear-gradient(
    90deg,
    #ff90e8,
    #facc15,
    #22d3ee,
    #8b5cf6,
    #ff90e8
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: shimmer 6s linear infinite;
}

.hero-title .flame {
  font-size: 26px;
  transform: translateY(2px);
}

.hero-sub {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f9a8d4;
  text-shadow: 0 0 18px rgba(248, 113, 183, 0.9);
}

.hero-text {
  margin-top: 12px;
  font-size: 14px;
  color: #e5e7ff;
}

.hero-text strong {
  color: #fef9c3;
}

.hero-dog {
  margin-top: 10px;
  font-size: 12px;
  color: #c7d2fe;
}

.tag-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tag-pill {
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.9);
  color: #a5b4fc;
  border: 1px solid rgba(165, 180, 252, 0.7);
  box-shadow: 0 0 18px rgba(129, 140, 248, 0.65);
}

/* CARD */

.card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), #020617);
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.45);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(18px);
  animation: slide-up 0.75s ease-out forwards;
  margin-bottom: 18px;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background-image: conic-gradient(
    from 210deg,
    rgba(244, 114, 182, 0.75),
    rgba(129, 140, 248, 0.6),
    rgba(45, 212, 191, 0.75),
    rgba(244, 114, 182, 0.75)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  animation: spin 22s linear infinite;
}

.card:hover::before {
  opacity: 0.1;
}

.card-inner {
  position: relative;
  z-index: 1;
}

/* UPLOAD */

.drop-area {
  border-radius: var(--radius-lg);
  padding: 32px 20px 26px;
  text-align: center;
  background: radial-gradient(circle at top, #1f2937, #020617 60%);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease,
    transform 0.12s ease, box-shadow 0.15s ease;
  border: 2px dashed rgba(148, 163, 184, 0.7);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.9);
}

.drop-area.dragover {
  border-color: #f9a8d4;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 50px rgba(244, 114, 182, 0.8);
  background: radial-gradient(circle at top, #4c1d95, #020617 70%);
}

.upload-icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  background: radial-gradient(circle at 30% 0%, #f9a8d4, #8b5cf6);
  color: #020617;
  font-size: 26px;
  box-shadow: 0 14px 30px rgba(139, 92, 246, 0.7);
  animation: float-soft 6s ease-in-out infinite;
}

.drop-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: #e5e7ff;
}

.drop-sub {
  font-size: 13px;
  color: #cbd5ff;
  margin-bottom: 18px;
}

.helper-text {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}

.helper-text span {
  font-weight: 600;
  color: #e0e7ff;
}

.error-text {
  margin-top: 6px;
  font-size: 12px;
  color: var(--danger);
}

/* BUTTONS */

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background 0.12s ease, filter 0.12s ease;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #ff8fd8, #facc15);
  color: #020617;
  box-shadow: 0 14px 40px rgba(248, 113, 183, 0.85);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 0 0,
    rgba(255, 255, 255, 0.7),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
  mix-blend-mode: screen;
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.05);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.8);
  color: var(--muted);
  padding-inline: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
}

.btn-ghost:hover {
  background: rgba(30, 64, 175, 0.75);
  color: #e5e7ff;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(30, 64, 175, 0.6);
}

/* EDITOR */

.editor-hidden {
  display: none;
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.75fr);
  gap: 18px;
}

@media (max-width: 860px) {
  .editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    padding: 20px 16px;
  }

  .drop-area {
    padding: 28px 16px 24px;
  }
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #a5b4fc;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-label .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fb7185, #f97316, #22d3ee);
  box-shadow: 0 0 10px rgba(248, 113, 183, 0.9);
}

.palettes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.palette-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 6px 10px;
  cursor: pointer;
  transition: border 0.12s ease, box-shadow 0.12s ease,
    transform 0.1s ease, background 0.12s ease;
  font-size: 11px;
  font-weight: 600;
  color: #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.palette-btn:hover {
  border-color: #f9a8d4;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.85);
  background: rgba(15, 23, 42, 0.98);
}

.palette-btn.active {
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.6),
    0 14px 32px rgba(248, 113, 183, 0.65);
}

.swatches {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.swatch {
  width: 18px;
  height: 18px;
  border-radius: 7px;
  border: 1px solid rgba(15, 23, 42, 0.95);
}

.palette-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.palette-text-main {
  font-size: 11px;
}

.palette-tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #a5b4fc;
}

.palettes-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

/* PREVIEW */

.preview-wrapper {
  background: radial-gradient(circle at top, #111827, #020617 70%);
  border-radius: var(--radius-lg);
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.9);
  position: relative;
  overflow: hidden;
}

.preview-wrapper::before {
  content: "✿";
  position: absolute;
  top: 6px;
  right: 16px;
  font-size: 18px;
  color: rgba(248, 113, 183, 0.7);
  animation: float-soft 6s ease-in-out infinite;
}

.preview-inner {
  background: #020617;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.9);
}

canvas {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
  justify-content: space-between;
}

.controls-row-left,
.controls-row-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hint-chip {
  font-size: 11px;
  color: #c7d2fe;
  background: rgba(30, 64, 175, 0.7);
  border-radius: 999px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hint-chip span {
  font-size: 14px;
}

/* COOKIE */

.cookie {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(96%, 520px);
  background: rgba(15, 23, 42, 0.98);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.95);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #e5e7eb;
  z-index: 40;
  backdrop-filter: blur(18px);
}

.cookie.hidden {
  display: none;
}

.cookie-icon {
  font-size: 18px;
}

.cookie button {
  margin-left: auto;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #facc15, #ff8fd8);
  color: #020617;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(250, 204, 21, 0.8);
}

/* FOOTER */

footer {
  margin-top: 30px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

footer strong {
  color: #facc15;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

/* ANIMATIONS */

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-18px) translateX(8px);
  }
}

@keyframes float-soft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes slide-up {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}