:root {
  --bg-base: #fff9fc;
  --ink-main: #2f2440;
  --ink-soft: #6e5f85;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(255, 160, 198, 0.35);

  --pink: #ff6b9d;
  --pink-soft: #ffe5ef;
  --orange: #ff9e6d;
  --sunny: #ffd166;
  --mint: #38d9a9;
  --mint-soft: #e3fcf4;
  --lavender: #7c5cff;
  --lavender-soft: #efeaff;
  --sky: #4dabf7;

  --shadow-soft: 0 18px 45px rgba(124, 92, 255, 0.1), 0 6px 16px rgba(255, 107, 157, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

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

body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-base);
  color: var(--ink-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Floating pastel background blobs */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.55;
  animation: floatBlob 14s ease-in-out infinite alternate;
}

.blob-pink {
  width: 380px;
  height: 380px;
  background: #ffb8d2;
  top: -90px;
  left: -80px;
}

.blob-mint {
  width: 340px;
  height: 340px;
  background: #a5f3dc;
  bottom: -80px;
  left: 12%;
  animation-delay: -4s;
}

.blob-sunny {
  width: 320px;
  height: 320px;
  background: #ffe399;
  top: 18%;
  right: -70px;
  animation-delay: -7s;
}

.blob-lavender {
  width: 360px;
  height: 360px;
  background: #cfc2ff;
  bottom: -90px;
  right: 8%;
  animation-delay: -2s;
}

@keyframes floatBlob {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(24px, -22px) scale(1.06);
  }
}

.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px 44px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-main);
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-icon {
  transform: rotate(-8deg) scale(1.08);
}

.brand-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-dot {
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar-pill {
  background: linear-gradient(135deg, var(--mint-soft), var(--lavender-soft));
  border: 2px solid #ffffff;
  color: var(--lavender);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(124, 92, 255, 0.12);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Hero Card */
.hero-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 2.5px solid #ffffff;
  border-radius: var(--radius-xl);
  padding: 36px 28px 32px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.mascot-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mascot-face {
  width: 58px;
  height: 58px;
  display: inline-flex;
  animation: gentleBounce 3.2s ease-in-out infinite;
}

.sparkle {
  font-size: 1.25rem;
  color: var(--orange);
  animation: twinkle 2s ease-in-out infinite alternate;
}

.sparkle.s2 {
  color: var(--lavender);
  animation-delay: 0.8s;
}

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

@keyframes twinkle {
  0% {
    opacity: 0.45;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.hero-title {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 10px;
}

.highlight-text {
  background: linear-gradient(135deg, var(--pink), var(--orange), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 26px;
  font-weight: 600;
}

/* URL Form */
.url-form {
  display: flex;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 22px;
}

.input-shell {
  flex: 1;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2.5px solid #f0e6ff;
  border-radius: var(--radius-lg);
  padding: 6px 10px 6px 16px;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-shell:focus-within {
  border-color: var(--pink);
  box-shadow: 0 0 0 5px rgba(255, 107, 157, 0.15);
}

.input-icon {
  font-size: 1.1rem;
  user-select: none;
}

.input-shell input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-main);
  background: transparent;
  min-width: 0;
}

.input-shell input::placeholder {
  color: #b1a3c7;
}

.icon-action-btn {
  border: none;
  background: var(--lavender-soft);
  color: var(--lavender);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s;
}

.icon-action-btn:hover {
  background: #e2d8ff;
  transform: scale(1.04);
}

.primary-btn {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0 26px;
  height: 56px;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: #ffffff;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(255, 107, 157, 0.32);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 28px rgba(255, 107, 157, 0.4);
}

.primary-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.primary-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Platform Pills */
.platforms-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.platform-pill {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
}

.pill-yt {
  background: #ffe3e8;
  color: #d6335c;
}
.pill-tt {
  background: #e3fcf7;
  color: #0b8c73;
}
.pill-ig {
  background: #ffe8f7;
  color: #b83280;
}
.pill-fb {
  background: #e5f1ff;
  color: #2563eb;
}
.pill-x {
  background: #f1edff;
  color: #5b3df5;
}
.pill-tw {
  background: #f3e8ff;
  color: #7e22ce;
}
.pill-vm {
  background: #e0f7ff;
  color: #0284c7;
}
.pill-more {
  background: #fff5d6;
  color: #b4690e;
}

/* Status Cards */
.status-card {
  background: var(--card-bg);
  border: 2.5px solid #ffffff;
  border-radius: var(--radius-xl);
  padding: 26px 24px;
  box-shadow: var(--shadow-soft);
}

.loading-card {
  text-align: center;
}

.bouncing-dots {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 12px;
}

.bouncing-dots span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  animation: dotJump 0.7s infinite alternate ease-in-out;
}

.bouncing-dots span:nth-child(1) {
  background: var(--pink);
}
.bouncing-dots span:nth-child(2) {
  background: var(--sunny);
  animation-delay: 0.15s;
}
.bouncing-dots span:nth-child(3) {
  background: var(--mint);
  animation-delay: 0.3s;
}

@keyframes dotJump {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-10px);
  }
}

.status-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.status-sub {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}

.error-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff2f6;
  border-color: #ffc2d4;
}

.error-emoji {
  font-size: 2.2rem;
  line-height: 1;
}

/* Result Card */
.result-card {
  background: var(--card-bg);
  border: 2.5px solid #ffffff;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.thumb-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f5ecff;
  aspect-ratio: 16 / 9;
  box-shadow: 0 10px 24px rgba(47, 36, 64, 0.1);
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.duration-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(47, 36, 64, 0.85);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}

.result-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.result-platform-badge {
  background: linear-gradient(135deg, var(--lavender), var(--sky));
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
}

.result-uploader {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.result-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
}

.format-heading {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.format-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.format-btn {
  border: none;
  border-radius: var(--radius-md);
  min-height: 44px;
  padding: 11px 16px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s;
}

.format-btn.video {
  background: linear-gradient(135deg, #38d9a9, #20c997);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(56, 217, 169, 0.28);
}

.format-btn.audio {
  background: linear-gradient(135deg, #7c5cff, #a78bfa);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(124, 92, 255, 0.26);
}

.format-btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.format-tag {
  background: rgba(255, 255, 255, 0.26);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
}

.download-hint {
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0b8c73;
  background: var(--mint-soft);
  padding: 8px 14px;
  border-radius: 12px;
  display: inline-block;
}

/* Guide Cards */
.guide-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-heading {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink-main);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.guide-card {
  background: var(--card-bg);
  border: 2.5px solid #ffffff;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-4px);
}

.guide-step {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.guide-1 .guide-step {
  background: linear-gradient(135deg, var(--pink), var(--orange));
}
.guide-2 .guide-step {
  background: linear-gradient(135deg, var(--lavender), var(--sky));
}
.guide-3 .guide-step {
  background: linear-gradient(135deg, var(--mint), #22b8cf);
}

.guide-card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.08rem;
  margin-bottom: 6px;
}

.guide-card p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 32px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .url-form {
    flex-direction: column;
  }

  .primary-btn {
    width: 100%;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }
}
