/* =========================================================
   Magic Picker — Mobile-first AI app redesign
   Inspired by the provided reference screenshot.
   ========================================================= */

:root {
  --text: #131826;
  --muted: #6b7588;
  --line: #eef1f6;
  --bg: #f7f7fb;
  --card: #ffffff;
  --primary: #6c5ce7;
  --primary-deep: #4b39c7;
  --accent: #ff7a59;
  --shadow-xs: 0 4px 12px rgba(20, 25, 50, 0.06);
  --shadow-sm: 0 10px 24px rgba(20, 25, 50, 0.08);
  --shadow-md: 0 18px 40px rgba(35, 25, 90, 0.12);
  --shadow-lg: 0 24px 60px rgba(35, 25, 90, 0.18);
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

/* ---------- App shell (phone-like centered column on desktop) ---------- */
.mp-app {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  background: #ffffff;
  min-height: 100vh;
  padding: 0 0 110px;
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,0.04);
}

/* ---------- Top App Bar ---------- */
.mp-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6ff 100%);
  border-bottom: 1px solid rgba(108, 92, 231, 0.08);
  box-shadow: 0 8px 24px rgba(32, 36, 77, 0.06);
  position: sticky;
  top: 0;
  z-index: 30;
}

.mp-appbar-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.mp-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: transparent;
  border: 0;
  display: grid;
  place-items: center;
  color: #1a2236;
  font-size: 1.25rem;
  transition: background 0.2s ease;
}
.mp-icon-btn:hover { background: #f1f3f8; }

.mp-bell { position: relative; }
.mp-bell i { animation: bellBlink 1.6s infinite ease-in-out; }
.mp-bell-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff4d6d;
  box-shadow: 0 0 0 0 rgba(255,77,109,0.55);
  animation: bellPulse 1.4s infinite;
}

@keyframes bellBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes bellPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255,77,109,0.48); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(255,77,109,0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255,77,109,0); }
}

/* ---------- Gradient Search Bar ---------- */
.mp-search-wrap {
  padding: 6px 18px 4px;
  position: relative;
}

.mp-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 60%),
    linear-gradient(95deg, #7aa9d8 0%, #9aa5d2 35%, #c6a4d1 65%, #e7b3c4 100%);
  box-shadow: var(--shadow-sm);
  min-height: 62px;
  position: relative;
  overflow: hidden;
}
.mp-search::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 60%);
  pointer-events: none;
}

.mp-search-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
  display: grid;
  place-items: center;
  color: #2d3a5f;
  font-size: 0.95rem;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.mp-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 500;
  text-shadow: 0 1px 1px rgba(0,0,0,0.08);
}
.mp-search input::placeholder { color: rgba(255,255,255,0.92); font-weight: 500; }

.mp-search-actions {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-left: 1px solid rgba(255,255,255,0.35);
  padding-left: 6px;
  margin-left: 4px;
  position: relative;
  z-index: 1;
}

.mp-search-action {
  border: 0;
  background: transparent;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
  min-width: 50px;
  border-radius: 10px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.mp-search-action:hover { background: rgba(255,255,255,0.15); transform: translateY(-1px); }
.mp-search-action i { font-size: 1rem; }
.mp-search-action span { font-size: 0.66rem; }

.mp-pb-logo {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, #ff7a59 0%, #ffd166 35%, #9b6dff 70%, #5b8def 100%);
  color: #fff;
  font-weight: 900;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* Search suggestions dropdown */
.search-suggestions {
  position: absolute;
  left: 18px;
  right: 18px;
  top: calc(100% - 4px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  z-index: 25;
  border: 1px solid var(--line);
}
.search-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  color: #1a2236;
  font-weight: 600;
  font-size: 0.92rem;
}
.search-suggestion-item:hover { background: #f5f6fb; }
.search-suggestion-item i { color: var(--primary); }

/* ---------- Main content area ---------- */
.mp-main {
  padding: 6px 18px 24px;
}

body[data-page="all-tools"] .mp-main,
body[data-page="all-prompts"] .mp-main,
body[data-page="prompt-detail"] .mp-main {
  padding-top: 18px;
}

.mp-section { margin-top: 22px; }

.mp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.mp-section-head h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #131826;
  text-transform: uppercase;
}
.mp-chevron {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: transparent;
  border: 0;
  color: #4a5675;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}
.mp-chevron:hover { background: #f1f3f8; color: var(--primary); }

/* ---------- AI Tools Cards (3 colorful cards) ---------- */
.mp-ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mp-ai-card {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: 22px;
  overflow: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  isolation: isolate;
}
.mp-ai-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.mp-ai-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(0,0,0,0.05) 70%, rgba(0,0,0,0.18));
  pointer-events: none;
  z-index: 0;
}

.mp-ai-illustration {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  z-index: 1;
}
.mp-ai-illustration > i:first-child {
  font-size: 2.6rem;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.25));
}

.mp-ai-title {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* Image Gen - purple to blue */
.mp-ai-image {
  background:
    radial-gradient(circle at 80% 15%, rgba(255,255,255,0.25), transparent 40%),
    linear-gradient(155deg, #7b5cf0 0%, #5b8def 55%, #3a5dd1 100%);
}
.mp-ai-illu-image > i.fa-paintbrush {
  background: linear-gradient(180deg, #ff9bd2, #ff5d8f 55%, #c247ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.25));
}
.mp-spark {
  display: none;
}
.mp-spark-1 { top: 14%; right: 14%; font-size: 1rem; }
.mp-spark-2 { bottom: 18%; left: 12%; font-size: 0.75rem; animation-delay: 0.6s; }
@keyframes twinkle {
  0%,100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Face Swap - orange */
.mp-ai-face {
  background:
    radial-gradient(circle at 80% 15%, rgba(255,255,255,0.25), transparent 40%),
    linear-gradient(160deg, #ffb14a 0%, #ff8a3d 55%, #f56a2c 100%);
}
.mp-ai-illu-face > i.fa-face-laugh-squint {
  color: #ffe34a;
  font-size: 3rem;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.2));
}
.mp-bubble {
  position: absolute;
  top: 10%;
  right: 6%;
  color: #ffffff;
  font-size: 1.4rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.18));
  transform: scaleX(-1);
}

/* Prompt Hub - dark navy w/ neon brain */
.mp-ai-brain {
  background:
    radial-gradient(circle at 70% 30%, rgba(180, 80, 220, 0.35), transparent 55%),
    linear-gradient(160deg, #181a4a 0%, #2a1d63 55%, #1c1740 100%);
}
.mp-ai-illu-brain > i.fa-brain {
  color: #ff5dd6;
  font-size: 2.8rem;
  text-shadow:
    0 0 8px rgba(255, 93, 214, 0.85),
    0 0 24px rgba(180, 80, 220, 0.65),
    0 0 40px rgba(120, 60, 220, 0.4);
  animation: neonPulse 2.4s ease-in-out infinite;
}
@keyframes neonPulse {
  0%,100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

/* ---------- YT Analytics card (replaces Prompt Lab) ---------- */
.mp-ai-yt {
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 70, 70, 0.38), transparent 55%),
    linear-gradient(160deg, #2a0d0d 0%, #5a1414 55%, #2c0a0a 100%);
}
.mp-ai-illu-yt > i.fa-youtube {
  color: #ff3b3b;
  font-size: 2.9rem;
  text-shadow:
    0 0 8px rgba(255, 59, 59, 0.9),
    0 0 24px rgba(255, 40, 40, 0.65),
    0 0 40px rgba(220, 30, 30, 0.45);
  animation: neonPulse 2.4s ease-in-out infinite;
}

/* ---------- Mode Switcher Pills ---------- */
.switcher {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 22px 0 4px;
}

.switch-pill {
  border: 1px solid #eceef5;
  min-height: 46px;
  border-radius: 14px;
  background: #ffffff;
  color: #3e4a66;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.switch-pill:hover { transform: translateY(-1px); }
.switch-pill.is-active {
  background: linear-gradient(135deg, #7b5cf0, #5b8def);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(91, 141, 239, 0.32);
}

/* ---------- Featured Content carousel ---------- */
.mp-featured-track {
  position: relative;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}
.mp-featured-track::-webkit-scrollbar { display: none; }

.mp-feat-card {
  position: relative;
  flex: 0 0 64%;
  max-width: 64%;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: var(--shadow-md);
  color: #ffffff;
  isolation: isolate;
  background-size: cover;
  background-position: center;
}
.mp-feat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.mp-feat-card.has-image::after {
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.75) 100%);
}
.mp-feat-card.has-image h3 {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.mp-feat-card-inner {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
}
.mp-feat-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  margin-bottom: 8px;
}
.mp-feat-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Themed gradient backgrounds (fallback when no image) */
.feat-theme-blue   { background: linear-gradient(135deg, #1f3a8a 0%, #4b7df3 55%, #93c4ff 100%); }
.feat-theme-violet { background: linear-gradient(135deg, #4b1d7a 0%, #7c3aed 55%, #f0a4d6 100%); }
.feat-theme-sunset { background: linear-gradient(135deg, #3a1b2a 0%, #8a3a2a 55%, #ffaa66 100%); }
.feat-theme-cyber  { background: linear-gradient(135deg, #0c1b2c 0%, #1b3d6e 55%, #6ad1ff 100%); }
.feat-theme-fire   { background: linear-gradient(135deg, #5a1a1a 0%, #c2410c 55%, #ffd166 100%); }

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 0 0;
}
.dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: #d6dae5;
  transition: width 0.2s ease, background 0.2s ease;
}
.dot.is-active { width: 22px; background: var(--primary); }

/* ---------- Category Menu Strip ---------- */
.menu-strip {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 18px 0 6px;
  scrollbar-width: none;
}
.menu-strip::-webkit-scrollbar { display: none; }

.menu-chip {
  border: 0;
  background: transparent;
  color: #5a6479;
  padding: 6px 0 10px;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.92rem;
  position: relative;
}
.menu-chip::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
  background: linear-gradient(90deg, #7b5cf0, #5b8def);
}
.menu-chip.is-selected { color: #131826; font-weight: 800; }
.menu-chip.is-selected::after { transform: scaleX(1); }

/* ---------- TOOLS grid (NEW TOOLS style: 3 per row, colorful icon cards) ---------- */
.mp-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card-item {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: 22px;
  overflow: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  isolation: isolate;
  text-decoration: none;
}
.card-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(0,0,0,0.05) 70%, rgba(0,0,0,0.18));
  pointer-events: none;
  z-index: 0;
}

.card-illustration {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  z-index: 1;
}
.card-illustration > i:first-child {
  position: relative;
  z-index: 1;
  font-size: 2.6rem;
  color: #ffffff;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.25));
}
.card-illustration .sp {
  display: none;
}
.card-illustration .sp-a { top: 14%; right: 14%; font-size: 1rem; }
.card-illustration .sp-b { bottom: 18%; left: 12%; font-size: 0.75rem; animation-delay: 0.6s; }

.card-title {
  position: relative;
  z-index: 1;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 6px rgba(0,0,0,0.22);
  color: #ffffff;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Per-category illustration gradients ---------- */
.illu-ai       { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #4f8bff 0%, #5468ff 55%, #2640c8 100%); }
.illu-face     { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #ffb14a 0%, #ff8a3d 55%, #f56a2c 100%); }
.illu-video    { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #1f1147 0%, #4b1d7a 55%, #b14fd6 100%); }
.illu-art      { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #ff5d8f 0%, #c247ff 55%, #6d3bf0 100%); }
.illu-text     { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #3a5dd1 0%, #5b8def 55%, #7aa9d8 100%); }
.illu-light    { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.32), transparent 45%), linear-gradient(150deg, #f5c518 0%, #ff9f1c 55%, #ff4d6d 100%); }
.illu-qr       { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.24), transparent 45%), linear-gradient(150deg, #2c3e50 0%, #3a4f6b 55%, #1a2236 100%); }
.illu-math     { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #ff8a3d 0%, #ffb14a 55%, #ffd166 100%); }
.illu-bmi      { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #ff7a8a 0%, #ff5a73 55%, #d6336c 100%); }
.illu-dice     { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #ffb800 0%, #ff8a3d 55%, #e94e1b 100%); }
.illu-color    { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #ff5dd6 0%, #c247ff 55%, #5b8def 100%); }
.illu-gradient { background: linear-gradient(150deg, #ff5dd6 0%, #ffb14a 30%, #6dd5ed 70%, #5b8def 100%); }
.illu-contrast { background: linear-gradient(150deg, #131826 0%, #131826 49%, #ffffff 51%, #ffffff 100%); }
.illu-convert  { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #0f8b6d 0%, #25c2a0 55%, #6fd8c2 100%); }
.illu-code     { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #1c1740 0%, #3b2080 55%, #5b3dd6 100%); }
.illu-link     { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #0066ff 0%, #00b4d8 55%, #48cae4 100%); }
.illu-table    { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #1665d8 0%, #4b8af0 55%, #9ec5ff 100%); }
.illu-lock     { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #1a2236 0%, #2a3a5f 55%, #4b6182 100%); }
.illu-shield   { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #0a8754 0%, #16a34a 55%, #4ade80 100%); }
.illu-tag      { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #ff8a3d 0%, #ffb14a 55%, #ffd166 100%); }
.illu-regex    { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #42516d 0%, #6b7a99 55%, #a4b1cc 100%); }
.illu-clock    { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #c0392b 0%, #e94e1b 55%, #ff8a3d 100%); }
.illu-globe    { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #015c92 0%, #2d82b5 55%, #88c5e4 100%); }
.illu-cake     { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #ff5dd6 0%, #ffb14a 55%, #ffd166 100%); }
.illu-coin     { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.32), transparent 45%), linear-gradient(150deg, #c79100 0%, #ffd166 55%, #fff0a3 100%); }
.illu-notes    { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #f59f00 0%, #ffd166 55%, #fff3bf 100%); }
.illu-id       { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #5a6275 0%, #8893a8 55%, #c6cdd9 100%); }
.illu-image    { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #6d28d9 0%, #a855f7 55%, #f0abfc 100%); }
.illu-diff     { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #1e40af 0%, #3b82f6 55%, #93c5fd 100%); }
.illu-default  { background: radial-gradient(circle at 75% 22%, rgba(255,255,255,0.28), transparent 45%), linear-gradient(150deg, #6c5ce7 0%, #5b8def 55%, #7aa9d8 100%); }

/* Themes */
.theme-text       { background: linear-gradient(135deg, #eef3ff, #d9e6ff); color: #3459d1; }
.theme-math       { background: linear-gradient(135deg, #fff2df, #ffe0b3); color: #c26a00; }
.theme-color      { background: linear-gradient(135deg, #f6ebff, #ebdcff); color: #8a3ffc; }
.theme-converter  { background: linear-gradient(135deg, #e7fbf6, #d2f5ea); color: #0f8b6d; }
.theme-security   { background: linear-gradient(135deg, #e9f3ff, #d4e7ff); color: #1665d8; }
.theme-web        { background: linear-gradient(135deg, #eef1f7, #dfe6f2); color: #42516d; }
.theme-time       { background: linear-gradient(135deg, #fff0ef, #ffe0db); color: #d05a42; }
.theme-misc       { background: linear-gradient(135deg, #f3f4f8, #e5e8f0); color: #5a6275; }
.theme-prompt     { background: linear-gradient(135deg, #f6ecff, #ead9ff); color: #6f36d9; }
.theme-ai         { background: linear-gradient(135deg, #e6f6ff, #d5efff); color: #1472b9; }
.theme-growth     { background: linear-gradient(135deg, #fff2e9, #ffe4ce); color: #c66a1a; }
.theme-study      { background: linear-gradient(135deg, #edf8e8, #ddf1d1); color: #357a38; }

.empty-state {
  margin: 14px 0 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: #f5f6fb;
  border: 1px dashed #d1d6e3;
  color: #5b6677;
  font-size: 0.9rem;
}

/* ---------- Toast ---------- */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) translateY(16px);
  background: rgba(20, 24, 38, 0.95);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Bottom Fixed Navigation ---------- */
.mp-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 620px;
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 10px 8px 14px;
  box-shadow: 0 -8px 30px rgba(20, 25, 50, 0.08);
  z-index: 100;
  border-top: 1px solid #f0f2f7;
}

.mp-bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #8a93a8;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 12px;
  transition: color 0.2s ease;
}
.mp-bn-item i { font-size: 1.15rem; }
.mp-bn-item.is-active { color: var(--primary); }
.mp-bn-item:hover { color: var(--primary); }

.mp-bn-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7b5cf0 0%, #5b3dd6 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin: -22px auto 0;
  box-shadow: 0 12px 24px rgba(91, 61, 214, 0.4), 0 0 0 6px #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  justify-self: center;
}
.mp-bn-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(91, 61, 214, 0.5), 0 0 0 6px #ffffff; }

/* ---------- Footer (clean text-based, no box/border) ---------- */
.mp-global-footer {
  margin-top: 40px;
  padding: 28px 18px 26px;
  text-align: center;
  background: transparent;
  border: 0;
}
.mp-footer-inner {
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: center;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.mp-footer-brand {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: #131826;
  background: linear-gradient(135deg, #7b5cf0, #5b8def);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mp-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  justify-content: center;
  margin: 8px 0 16px;
  padding: 0;
  list-style: none;
}
.mp-footer-links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: #4a5675;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}
.mp-footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #7b5cf0, #5b8def);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
  border-radius: 2px;
}
.mp-footer-links a:hover { color: var(--primary); }
.mp-footer-links a:hover::after { transform: scaleX(1); }
.mp-footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ---------- Responsive ---------- */
@media (max-width: 420px) {
  .mp-search input { font-size: 0.85rem; }
  .mp-search-action { min-width: 44px; }
  .mp-search-action span { font-size: 0.6rem; }
  .mp-ai-title { font-size: 0.85rem; }
  .card-title { font-size: 0.78rem; }
  .card-illustration > i:first-child { font-size: 2.1rem; }
  .mp-feat-card { flex: 0 0 70%; max-width: 70%; }
  .prompt-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .prompt-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }
}

@media (min-width: 768px) {
  .mp-tools-grid { grid-template-columns: repeat(4, 1fr); }
  .mp-feat-card { flex: 0 0 42%; max-width: 42%; }
  .mp-image-prompt-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .mp-tools-grid { grid-template-columns: repeat(5, 1fr); }
  .mp-feat-card { flex: 0 0 32%; max-width: 32%; }
}

/* Hide scrollbars cleanly */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d6dae5; border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Pagination ---------- */
.mp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 22px 0 10px;
}
.mp-pagination .pg-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #e2e6f1;
  background: #ffffff;
  color: #3e4a66;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  box-shadow: var(--shadow-xs);
}
.mp-pagination .pg-btn:hover:not([disabled]) {
  transform: translateY(-1px);
  border-color: #c9d0e3;
}
.mp-pagination .pg-btn.is-active {
  background: linear-gradient(135deg, #7b5cf0, #5b8def);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(91, 141, 239, 0.32);
}
.mp-pagination .pg-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.mp-pagination .pg-nav {
  font-size: 0.8rem;
}
.mp-pagination .pg-ellipsis {
  color: #8a93a8;
  padding: 0 4px;
  font-weight: 700;
}

/* Hide leftover legacy elements if any HTML still references them */
.switcher,
.menu-strip { display: none !important; }

/* ---------- Links + show more button ---------- */
.mp-chevron {
  text-decoration: none;
}

.mp-show-more-wrap {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

.mp-show-more {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #7b5cf0 0%, #5b8def 100%);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 30px rgba(91, 141, 239, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mp-show-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(91, 141, 239, 0.34);
}

.mp-show-more i {
  font-size: 0.95rem;
  animation: showMoreFloat 1.6s ease-in-out infinite;
}

@keyframes showMoreFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* ---------- Image Prompt Grid (Tools-style) ---------- */
.mp-image-prompt-section { margin-top: 26px; }

.mp-prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.prompt-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #eef0f6;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  text-align: left;
  color: inherit;
}
.prompt-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #e2e6f1;
}

.prompt-tile-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #eef1f8;
  border-radius: inherit;
}
.prompt-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.prompt-tile:hover .prompt-tile-media img { transform: scale(1.06); }

.prompt-tile-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  background: rgba(20, 24, 38, 0.72);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Title removed from image prompt cards — only the image is shown. */
.prompt-tile-body { display: none; }

/* Show more (prompt) shares the same style as tools button via .mp-show-more */
.mp-show-more-prompt {
  background: linear-gradient(135deg, #ff5dd6 0%, #7b5cf0 100%) !important;
  box-shadow: 0 14px 30px rgba(123, 92, 240, 0.28) !important;
}
.mp-show-more-prompt:hover {
  box-shadow: 0 18px 34px rgba(123, 92, 240, 0.34) !important;
}

/* ---------- Image Prompt Detail Page ---------- */
.mp-prompt-detail-page { padding: 4px 18px 30px; }

.mp-back-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 6px;
}
.mp-back-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid #e7eaf3;
  background: #fff;
  display: grid; place-items: center;
  color: #1a2236;
  font-size: 1rem;
  box-shadow: var(--shadow-xs);
}
.mp-back-btn:hover { background: #f5f6fb; }
.mp-back-bar h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #131826;
}

.mp-detail-hero {
  border-radius: 24px;
  overflow: hidden;
  background: #eef1f8;
  box-shadow: var(--shadow-md);
  margin: 8px 0 16px;
  position: relative;
}
.mp-detail-hero img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  max-height: 560px;
}
.mp-detail-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 24, 38, 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mp-detail-title {
  margin: 4px 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #131826;
  letter-spacing: -0.01em;
}

.mp-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.mp-detail-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef3ff;
  color: #3852a6;
  font-size: 0.76rem;
  font-weight: 700;
}

.mp-prompt-box {
  border-radius: 18px;
  background: #101828;
  color: #f8fafc;
  padding: 16px 16px 14px;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.18);
  position: relative;
}
.mp-prompt-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mp-prompt-box-head span {
  color: #a5b4fc;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.mp-prompt-copy-btn {
  border: 0;
  background: linear-gradient(135deg, #7b5cf0, #5b8def);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 8px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mp-prompt-copy-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(91,141,239,0.4); }
.mp-prompt-copy-btn.is-copied { background: linear-gradient(135deg, #10b981, #059669); }

.mp-prompt-text {
  margin: 0;
  line-height: 1.7;
  font-size: 0.93rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.mp-detail-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0 22px;
}
.mp-action-btn {
  border: 1px solid #e7eaf3;
  background: #fff;
  border-radius: 16px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #1a2236;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.mp-action-btn i { font-size: 1.1rem; color: var(--primary); }
.mp-action-btn:hover {
  transform: translateY(-2px);
  background: #f7f7fc;
  box-shadow: var(--shadow-xs);
}

.mp-detail-section {
  margin-top: 18px;
}
.mp-detail-section h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #131826;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mp-related-grid a {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #eef1f8;
  border: 1px solid #eef0f6;
}
.mp-related-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.mp-related-grid a:hover img { transform: scale(1.08); }

@media (min-width: 480px) {
  .mp-prompt-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .mp-prompt-grid { grid-template-columns: repeat(4, 1fr); }
  .mp-related-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .mp-prompt-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ============================================================
   YT Comment Picker — NEW TOOL card (replaces Face Swap)
   ============================================================ */
.mp-ai-picker {
  background:
    radial-gradient(circle at 78% 18%, rgba(255,255,255,0.28), transparent 45%),
    linear-gradient(160deg, #ff4d4d 0%, #ff2d2d 50%, #c81d1d 100%);
}
.mp-ai-illu-picker > i.fa-trophy {
  color: #ffe34a;
  font-size: 3rem;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.25));
}
.mp-ai-illu-picker .mp-bubble {
  color: #ffffff;
  top: 12%;
  right: 8%;
}

/* ============================================================
   Hamburger Side Drawer (3-line menu in header)
   ============================================================ */
.mp-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,20,40,0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.28s ease;
  z-index: 998;
}
.mp-drawer-overlay.is-visible { opacity: 1; }

.mp-side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 86%;
  max-width: 320px;
  background: #ffffff;
  z-index: 999;
  box-shadow: 8px 0 30px rgba(0,0,0,0.18);
  transform: translateX(-105%);
  transition: transform 0.32s cubic-bezier(.22,.61,.36,1);
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.mp-side-drawer.is-open { transform: translateX(0); }

.mp-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #f0f1f5;
}
.mp-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #131826;
}
.mp-drawer-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff3b3b, #ff7676);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(255,59,59,0.32);
}

.mp-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
}
.mp-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #2b3147;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.mp-drawer-link i {
  width: 22px;
  text-align: center;
  color: #ff3b3b;
  font-size: 1.02rem;
}
.mp-drawer-link:hover {
  background: #fff0f0;
  color: #ff3b3b;
  transform: translateX(2px);
}
.mp-drawer-divider {
  height: 1px;
  background: #eef0f5;
  margin: 8px 14px;
}

.mp-drawer-foot {
  padding: 14px 16px 18px;
  border-top: 1px solid #f0f1f5;
}
.mp-drawer-theme-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid #e2e4ec;
  background: #fafbff;
  color: #131826;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.mp-drawer-theme-btn:hover { background: #fff0f0; border-color: #ffd0d0; color: #ff3b3b; }
.mp-drawer-copy {
  text-align: center;
  font-size: 0.78rem;
  color: #8a90a3;
  margin: 10px 0 0;
}

/* Dark mode overrides */
html.mp-dark { background: #0e1220; }
html.mp-dark body { background: #0e1220; color: #e4e7f1; }
html.mp-dark .mp-appbar { background: #161b2d; border-color: #1f2540; }
html.mp-dark .mp-appbar-title { color: #f2f4fb; }
html.mp-dark .mp-icon-btn { color: #c8cde0; }
html.mp-dark .mp-icon-btn:hover { background: #1f2540; }
html.mp-dark .mp-side-drawer { background: #161b2d; color: #e4e7f1; }
html.mp-dark .mp-drawer-head { border-bottom-color: #1f2540; }
html.mp-dark .mp-drawer-brand { color: #f2f4fb; }
html.mp-dark .mp-drawer-divider { background: #1f2540; }
html.mp-dark .mp-drawer-link { color: #d8dcec; }
html.mp-dark .mp-drawer-link:hover { background: #1f2540; color: #ff7676; }
html.mp-dark .mp-drawer-foot { border-top-color: #1f2540; }
html.mp-dark .mp-drawer-theme-btn { background: #1a2038; border-color: #262d4d; color: #e4e7f1; }
html.mp-dark .mp-drawer-theme-btn:hover { background: #232a4a; color: #ff7676; border-color: #3a4575; }

@media (max-width: 480px) {
  .mp-side-drawer { width: 88%; }
}
