/* ============================================================
   Image Prompt AI — Master Design System v2.0
   Aero Glass · Gradient Accent · Plugin-Perfect SEO Theme
   Palette: #FA5264 (Coral) → #68D9B2 (Teal)
   Typography: Plus Jakarta Sans
   ============================================================ */

/* ------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------ */
:root {
  /* Brand */
  --accent-coral: #FA5264;
  --accent-teal: #68D9B2;
  --primary: #FA5264;
  --primary-dark: #e03d50;
  --primary-soft: rgba(250, 82, 100, 0.12);
  --secondary: #68D9B2;
  --secondary-dark: #4bc49a;
  --secondary-soft: rgba(104, 217, 178, 0.14);
  --accent: #FA5264;

  /* Gradients */
  --primary-gradient: linear-gradient(135deg, #FA5264 0%, #68D9B2 100%);
  --primary-gradient-rev: linear-gradient(135deg, #68D9B2 0%, #FA5264 100%);
  --primary-gradient-h: linear-gradient(90deg, #FA5264 0%, #68D9B2 100%);
  --bg-gradient-soft:
    radial-gradient(ellipse at 10% 0%, rgba(250, 82, 100, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 10%, rgba(104, 217, 178, 0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(250, 82, 100, 0.05) 0%, transparent 50%);

  /* Surfaces */
  --bg-body: #f4f6f9;
  --bg-card: #ffffff;
  --bg-muted: #f8fafc;
  --bg-elevated: #ffffff;

  /* Text */
  --text-main: #0f172a;
  --text-heading: #0f172a;
  --text-sub: #64748b;
  --text-muted: #94a3b8;
  --text-on-primary: #ffffff;

  /* Glass (Aero) */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-strong: rgba(255, 255, 255, 0.88);
  --glass-bg-dark: rgba(15, 23, 42, 0.55);
  --glass-blur: 12px;
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-border-soft: rgba(148, 163, 184, 0.22);
  --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  --glass-shadow-lg: 0 16px 48px rgba(250, 82, 100, 0.12);

  /* Shadows & rings */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --ring-focus: 0 0 0 3px rgba(250, 82, 100, 0.25), 0 0 24px rgba(104, 217, 178, 0.35);
  --glow-primary: 0 8px 28px rgba(250, 82, 100, 0.35);
  --glow-teal: 0 8px 28px rgba(104, 217, 178, 0.35);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Layout */
  --container-max: 1280px;
  --header-h: 72px;
  --bottom-nav-h: 68px;
  --z-header: 1000;
  --z-modal: 1200;
  --z-toast: 1400;
  --z-lightbox: 1500;
  --z-bottom-nav: 1100;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --duration-fast: 0.18s;
  --duration: 0.3s;
  --duration-slow: 0.5s;

  /* Category accent map (mobile nav) */
  --nav-home: #3b82f6;
  --nav-explore: #22c55e;
  --nav-women: #ec4899;
  --nav-men: #8b5cf6;
}

/* ------------------------------------------------------------
   2. RESET & GLOBAL LAYOUT
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-sub);
  background-color: var(--bg-body);
  background-image: var(--bg-gradient-soft);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding-bottom: var(--bottom-nav-h);
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}

/* Main scrollbar (styled) */
body::-webkit-scrollbar {
  width: 10px;
}
body::-webkit-scrollbar-track {
  background: transparent;
}
body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-coral), var(--accent-teal));
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-body);
}
body::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Hide scrollbars on category / horizontal sliders */
.hide-scrollbar,
.category-slider,
.slider-scroll,
.micro-grid-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar,
.category-slider::-webkit-scrollbar,
.slider-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ------------------------------------------------------------
   3. GLASSMORPHISM (AERO GLASS)
   ------------------------------------------------------------ */
.glass-card,
.glass-header,
.glass-modal,
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-card {
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.glass-header {
  border-radius: var(--radius-xl);
}

.glass-modal {
  border-radius: var(--radius-lg);
  background: var(--glass-bg-strong);
  box-shadow: var(--glass-shadow-lg);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Sticky glass header (desktop + mobile) */
.header {
  position: sticky;
  top: 16px;
  margin: 0 16px;
  z-index: var(--z-header);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  transition: box-shadow var(--duration) var(--ease-out),
              background var(--duration) ease,
              transform var(--duration) var(--ease-out);
}

.header.is-scrolled,
.header.scrolled {
  background: var(--glass-bg-strong);
  box-shadow: var(--glass-shadow-lg);
}

.mobile-header-modern,
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border-soft);
  transition: box-shadow var(--duration) ease, background var(--duration) ease;
}

.mobile-header-modern.scrolled,
.mobile-header.scrolled {
  background: var(--glass-bg-strong);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

/* ------------------------------------------------------------
   4. KEYFRAME ANIMATIONS
   ------------------------------------------------------------ */
@keyframes gradient-bg {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(250, 82, 100, 0.35),
                0 8px 24px rgba(104, 217, 178, 0.15);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(250, 82, 100, 0),
                0 12px 36px rgba(104, 217, 178, 0.28);
  }
}

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

@keyframes pulseRotate {
  0%   { transform: scale(1) rotate(0deg); }
  40%  { transform: scale(1.08) rotate(-3deg); }
  70%  { transform: scale(1.04) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes shine {
  0%   { left: -120%; opacity: 0; }
  20%  { opacity: 0.55; }
  100% { left: 140%; opacity: 0; }
}

@keyframes pageScale {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}

@keyframes spinSoft {
  to { transform: rotate(360deg); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Utility animation classes */
.anim-float-pro   { animation: float-pro 3.2s ease-in-out infinite; }
.anim-glow-pulse  { animation: glow-pulse 2.4s ease-in-out infinite; }
.anim-fade-up     { animation: fadeUpCard 0.65s var(--ease-out) both; }
.anim-gradient-bg {
  background-size: 200% 200%;
  animation: gradient-bg 6s ease infinite;
}

/* ------------------------------------------------------------
   5. TYPOGRAPHY & GRADIENT TEXT
   ------------------------------------------------------------ */
.gradient-text,
.text-gradient {
  background: var(--primary-gradient-h);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-bg 5s ease infinite;
}

.hero-title {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0.35em 0 0.4em;
  background: var(--primary-gradient-h);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-bg 6s ease infinite;
}

.hero-subtitle {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.125rem);
  color: var(--text-sub);
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto;
  letter-spacing: 0.2px;
}

/* ------------------------------------------------------------
   6. BADGES, PILLS, BUTTONS
   ------------------------------------------------------------ */
.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.badge-soft {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(250, 82, 100, 0.2);
}

.badge-gradient {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
}

.premium-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border-soft);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  animation: float-pro 3.5s ease-in-out infinite;
  transition: transform var(--duration) var(--ease-spring),
              box-shadow var(--duration) ease;
}

.premium-pill:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-teal);
}

.pp-count {
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn,
.btn-primary,
.search-btn,
.action-btn-full,
.btn-face-copy {
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-md);
  transition: transform var(--duration) var(--ease-spring),
              box-shadow var(--duration) ease,
              filter var(--duration) ease;
}

.btn-primary,
.search-btn,
.action-btn-full,
.btn-face-copy {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: var(--glow-primary);
}

.btn-primary:hover,
.search-btn:hover,
.action-btn-full:hover,
.btn-face-copy:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: var(--glow-teal);
  animation: pulseRotate 0.55s var(--ease-spring);
}

/* Shine sweep on interactive gradient buttons */
.btn-primary::after,
.search-btn::after,
.action-btn-full::after,
.btn-face-copy::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.btn-primary:hover::after,
.search-btn:hover::after,
.action-btn-full:hover::after,
.btn-face-copy:hover::after {
  animation: shine 0.75s ease;
}

.btn-outline {
  background: #fff;
  color: var(--text-main);
  border: 1.5px solid var(--glass-border-soft);
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--duration) ease;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------
   7. HERO SECTION
   ------------------------------------------------------------ */
.hero {
  text-align: center;
  padding: clamp(28px, 5vw, 56px) 16px 12px;
  max-width: 820px;
  margin: 0 auto;
}

.stats-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

/* Glass search bar */
.search-wrapper {
  margin-top: 28px;
  max-width: 560px;
  margin-inline: auto;
}

.search-wrapper form,
#searchForm {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 18px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1.5px solid var(--glass-border-soft);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  transition: border-color var(--duration) ease,
              box-shadow var(--duration) ease;
}

.search-wrapper form:focus-within,
#searchForm:focus-within {
  border-color: rgba(250, 82, 100, 0.45);
  box-shadow: var(--ring-focus);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  min-width: 0;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

/* ------------------------------------------------------------
   8. CATEGORY / SORT SLIDER
   ------------------------------------------------------------ */
.category-slider-section {
  padding: 8px 0 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.category-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 12px;
}

.category-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  flex: 1;
  padding: 6px 2px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.category-slider.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.category-slider-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: #fff;
  border: 1.5px solid rgba(148, 163, 184, 0.25);
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  scroll-snap-align: start;
  flex-shrink: 0;
  transition: all var(--duration) var(--ease-out);
  text-decoration: none;
}

.category-slider-item:hover {
  border-color: rgba(250, 82, 100, 0.4);
  color: var(--text-main);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.category-slider-item.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #fff;
  font-weight: 800;
  box-shadow: var(--glow-primary);
}

.category-slider-item.active i,
.category-slider-item.active .count-badge {
  color: #fff !important;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.06);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-sub);
}

.category-slider-item.active .count-badge {
  background: rgba(255, 255, 255, 0.25);
}

.sort-btn {
  cursor: pointer;
}

.slider-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--glass-border-soft);
  background: #fff;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration) ease;
}

.slider-nav-btn:hover {
  color: #fff;
  background: var(--primary-gradient);
  border-color: transparent;
  transform: scale(1.08);
}

/* ------------------------------------------------------------
   9. MICRO-GALLERY (14-thumb collage)
   ------------------------------------------------------------ */
.micro-section {
  margin-bottom: 36px;
}

.micro-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.micro-section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.micro-grid,
.grid-count-14 {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

@media (max-width: 900px) {
  .micro-grid,
  .grid-count-14 {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 600px) {
  .micro-grid,
  .grid-count-14 {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
}

.micro-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  background: var(--bg-muted);
}

.micro-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease-out), filter 0.35s ease;
}

.micro-card:hover img {
  transform: scale(1.15);
  filter: brightness(1.08);
}

/* ------------------------------------------------------------
   10. MASONRY PROMPT CARDS
   ------------------------------------------------------------ */
.masonry-grid {
  column-count: 4;
  column-gap: 18px;
}

@media (max-width: 1100px) {
  .masonry-grid { column-count: 3; }
}
@media (max-width: 768px) {
  .masonry-grid { column-count: 2; column-gap: 12px; }
}
@media (max-width: 480px) {
  .masonry-grid { column-count: 1; }
}

.prompt-card {
  break-inside: avoid;
  margin-bottom: 18px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--duration) var(--ease-out),
              box-shadow var(--duration) ease;
  animation: fadeUpCard 0.6s var(--ease-out) both;
}

.prompt-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-image-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--bg-muted);
}

.card-image-wrapper img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.prompt-card:hover .card-image-wrapper img {
  transform: scale(1.06);
}

.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.model-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.card-body {
  padding: 14px 15px 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-heading);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--duration) ease;
}

.prompt-card:hover .card-title {
  color: var(--primary);
}

.card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.card-meta i {
  margin-right: 3px;
}

/* Truncated prompt preview — fixed 60px */
.prompt-card .prompt-text,
.card-prompt-preview {
  height: 60px;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-sub);
  background: var(--bg-muted);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.card-footer {
  padding: 10px 12px 14px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-row-top {
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.action-btn-sm {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 4px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #fff;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration) ease;
  font-family: inherit;
}

.action-btn-sm:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.action-btn-sm.liked,
.action-btn-sm.btn-like.liked {
  color: var(--primary);
  border-color: rgba(250, 82, 100, 0.4);
  background: var(--primary-soft);
}

.action-btn-full {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ------------------------------------------------------------
   11. SINGLE PROMPT DETAIL
   ------------------------------------------------------------ */
.ipa-single-prompt {
  padding-top: 12px;
  padding-bottom: 40px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 10px 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border-soft);
}

.breadcrumb a {
  color: var(--text-sub);
  transition: color var(--duration) ease;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb i {
  font-size: 10px;
  opacity: 0.6;
}

.detail-wrapper {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .detail-wrapper {
    grid-template-columns: 1fr;
  }
}

.image-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.image-wrapper {
  position: relative;
  cursor: zoom-in;
  background: #0f172a;
}

.image-wrapper img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  margin: 0 auto;
}

.model-badge-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration) ease, background var(--duration) ease;
}

.model-badge-overlay:hover {
  transform: scale(1.05);
  background: var(--primary);
  color: #fff !important;
}

.image-overlay-like {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform var(--duration) var(--ease-spring), background var(--duration) ease;
}

.image-overlay-like:hover,
.image-overlay-like.liked-active {
  background: var(--primary);
  transform: scale(1.06);
}

.image-stats {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  background: var(--bg-muted);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-card .title {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  margin: 8px 0;
}

.info-card .desc {
  color: var(--text-sub);
  font-size: 14.5px;
  line-height: 1.7;
}

.meta-header {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-item {
  background: var(--bg-muted);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  transition: border-color var(--duration) ease, transform var(--duration) ease;
}

.stat-item:hover {
  border-color: rgba(250, 82, 100, 0.35);
  transform: translateY(-2px);
}

.stat-val {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 2px;
}

.stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prompt-box {
  background: var(--bg-muted);
  border: 1.5px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.prompt-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.prompt-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-heading);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-copy-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: none;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--duration) var(--ease-spring);
}

.btn-copy-sm:hover {
  transform: scale(1.05);
}

.prompt-box .prompt-text,
#fullPrompt {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 14px;
  padding: 4px 2px;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-row .btn,
.action-row .btn-primary,
.action-row .btn-outline {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  text-decoration: none;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--secondary-soft);
  color: var(--secondary-dark);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(104, 217, 178, 0.3);
  transition: all var(--duration) ease;
}

.tag-pill:hover {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

/* Face Consistency Tool */
.face-ref-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--glass-shadow);
  transition: box-shadow var(--duration) ease, border-color var(--duration) ease;
}

.face-ref-card:hover {
  border-color: rgba(104, 217, 178, 0.4);
  box-shadow: var(--glow-teal);
}

.face-ref-header {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.face-ref-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-face-copy {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-face-view {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  background: #fff;
  color: var(--text-sub);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--duration) ease;
}

.btn-face-view:hover,
.btn-face-view.is-open {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.face-hidden-content {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
  animation: fadeUpCard 0.4s var(--ease-out);
}

.face-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.face-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-main);
  white-space: pre-wrap;
  background: var(--bg-muted);
  padding: 12px;
  border-radius: var(--radius-sm);
}

/* FAQ accordion */
.faq-item {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color var(--duration) ease;
}

.faq-item[open] {
  border-color: rgba(250, 82, 100, 0.35);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-heading);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 18px;
  font-weight: 400;
  color: var(--primary);
  transition: transform var(--duration) ease;
}

.faq-item[open] .faq-question::after {
  content: '−';
}

.faq-answer {
  padding: 0 16px 14px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
  animation: fadeUpCard 0.35s var(--ease-out);
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-title {
  font-size: 1.25rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  cursor: default;
  animation: fadeUpCard 0.35s var(--ease-out);
}

.close-lb {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--duration) ease, transform var(--duration) ease;
}

.close-lb:hover {
  background: var(--primary);
  transform: scale(1.08);
}

/* ------------------------------------------------------------
   12. PLUGIN CONTENT (PromptPostPlugin output)
   ------------------------------------------------------------ */
.prompthub-prompt-card {
  background: var(--bg-muted) !important;
  border: 1.5px solid rgba(148, 163, 184, 0.22) !important;
  padding: 20px !important;
  border-radius: var(--radius-lg) !important;
  margin-bottom: 28px !important;
  box-shadow: var(--shadow-sm) !important;
  position: relative !important;
  transition: border-color var(--duration) ease, box-shadow var(--duration) ease;
}

.prompthub-prompt-card:hover {
  border-color: rgba(250, 82, 100, 0.3) !important;
  box-shadow: var(--shadow-md) !important;
}

.prompthub-prompt-card p {
  color: var(--text-main) !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  white-space: pre-wrap !important;
}

.ph-core-copy-trigger,
.ipa-plugin-copy {
  background: var(--primary-gradient) !important;
  color: #fff !important;
  border: none !important;
  padding: 11px 20px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: var(--glow-primary) !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  transition: transform var(--duration) var(--ease-spring),
              filter var(--duration) ease !important;
  position: relative;
  overflow: hidden;
}

.ph-core-copy-trigger:hover,
.ipa-plugin-copy:hover {
  filter: brightness(1.06) !important;
  transform: translateY(-2px) !important;
}

/* Collection / gallery post content polish */
.entry-content h2,
.ipa-single-gallery .entry-content h2 {
  color: var(--text-heading) !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  border-image: var(--primary-gradient) 1 !important;
}

.entry-content h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-heading);
  margin: 1.5em 0 0.6em;
}

.entry-content .wp-block-image img,
.entry-content figure img {
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.entry-content .wp-block-separator {
  border: none !important;
  border-top: 2px dashed rgba(148, 163, 184, 0.4) !important;
  margin: 32px 0 !important;
}

/* ------------------------------------------------------------
   13. MOBILE BOTTOM NAV
   ------------------------------------------------------------ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-bottom-nav);
  height: var(--bottom-nav-h);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-top: 1px solid var(--glass-border-soft);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.06);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  align-items: stretch;
  justify-content: space-around;
}

@media (max-width: 767px) {
  .mobile-bottom-nav {
    display: flex;
  }
  .header {
    display: none;
  }
}

.mobile-bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  border-radius: 12px;
  transition: transform var(--duration-fast) var(--ease-spring),
              color var(--duration) ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav .nav-item i {
  font-size: 18px;
  transition: transform var(--duration) var(--ease-spring);
}

.mobile-bottom-nav .nav-item:active {
  transform: scale(0.92);
}

.mobile-bottom-nav .nav-item:active i {
  transform: scale(1.15);
}

/* Color-coded brand icons */
.mobile-bottom-nav .nav-item.nav-home i,
.mobile-bottom-nav .nav-item.nav-home.active {
  color: var(--nav-home);
}

.mobile-bottom-nav .nav-item.nav-explore i,
.mobile-bottom-nav .nav-item.nav-explore.active {
  color: var(--nav-explore);
}

.mobile-bottom-nav .nav-item.nav-women i,
.mobile-bottom-nav .nav-item.nav-women.active {
  color: var(--nav-women);
}

.mobile-bottom-nav .nav-item.nav-men i,
.mobile-bottom-nav .nav-item.nav-men.active {
  color: var(--nav-men);
}

.mobile-bottom-nav .nav-item.active {
  color: var(--text-main);
}

.mobile-bottom-nav .nav-item.active i {
  transform: translateY(-1px) scale(1.08);
}

/* Explore solid green circle accent */
.nav-gallery-wrapper {
  position: relative;
  top: -10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20%;
}

.nav-gallery-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #22c55e, #16a34a) !important;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.4);
  border: 3px solid #fff;
  z-index: 5;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.3s ease;
  position: relative;
}

.nav-gallery-btn i {
  font-size: 18px;
  color: #fff !important;
}

.nav-gallery-btn:hover,
.nav-gallery-btn:active {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.5);
}

.nav-gallery-btn.active {
  transform: scale(1.06);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25), 0 8px 20px rgba(34, 197, 94, 0.45);
}

.play-mini-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.25);
  z-index: -1;
  animation: glow-pulse 2.5s ease-in-out infinite;
}

.gallery-text {
  font-size: 9px;
  font-weight: 800;
  color: #16a34a;
  margin-top: 2px;
}

/* ------------------------------------------------------------
   14. EMPTY STATE & PAGINATION
   ------------------------------------------------------------ */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  grid-column: 1 / -1;
  animation: fadeUpCard 0.6s var(--ease-out);
}

.empty-state-icon {
  font-size: 64px;
  color: rgba(100, 116, 139, 0.22);
  margin-bottom: 16px;
  line-height: 1;
}

.empty-state h3 {
  color: var(--text-sub);
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.empty-state p {
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 20px;
  font-size: 14px;
}

.empty-state .btn-clear,
.empty-state .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--glow-primary);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

/* Circular pagination */
.ipa-pagination,
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 28px 0 40px;
}

.ipa-page-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--text-main);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: transform 0.35s var(--ease-spring),
              background var(--duration) ease,
              color var(--duration) ease,
              box-shadow var(--duration) ease;
}

.ipa-page-btn:hover {
  animation: pageScale 0.45s var(--ease-spring);
  color: var(--primary);
  border-color: rgba(250, 82, 100, 0.4);
  box-shadow: var(--glow-primary);
  transform: scale(1.12);
}

.ipa-page-btn.is-active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  font-weight: 800;
  box-shadow: var(--glow-primary);
}

/* ------------------------------------------------------------
   15. ADSENSE & SEO CONTAINERS
   ------------------------------------------------------------ */
.ad-slot,
.adsense-slot,
.ipa-ad-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 90px;
  margin: 20px 0;
  padding: 12px;
  background: var(--bg-muted);
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-md);
  overflow: hidden;
  break-inside: avoid;
}

.ad-slot--in-grid,
.ipa-ad-banner.in-masonry {
  margin-bottom: 18px;
  min-height: 250px;
}

.ad-slot--leaderboard {
  min-height: 90px;
  max-width: 728px;
  margin-inline: auto;
}

.ad-slot--rectangle {
  min-height: 250px;
  max-width: 336px;
  margin-inline: auto;
}

.ad-label {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
}

/* SEO schema-friendly content blocks */
.seo-content-block {
  margin: 32px 0;
  padding: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border-soft);
  border-radius: var(--radius-lg);
  color: var(--text-sub);
  line-height: 1.8;
  font-size: 15px;
}

/* ------------------------------------------------------------
   16. TOAST, SCROLL-TOP, UTILS
   ------------------------------------------------------------ */
#toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-heading);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  z-index: var(--z-toast);
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out);
}

@media (min-width: 768px) {
  #toast {
    bottom: 32px;
  }
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: toastIn 0.35s var(--ease-out);
}

.scroll-top {
  position: fixed;
  right: 18px;
  bottom: calc(var(--bottom-nav-h) + 18px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary-gradient);
  color: #fff;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--glow-primary);
  transition: opacity var(--duration) ease, transform var(--duration) var(--ease-spring);
}

@media (min-width: 768px) {
  .scroll-top {
    bottom: 28px;
  }
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: scale(1.1);
}

/* Screen reader */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Refresh / view-all pills */
.refresh-pill,
.view-all-pill {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--duration) var(--ease-spring);
}

.refresh-pill {
  background: var(--primary-soft);
  border: 1px solid rgba(250, 82, 100, 0.25);
  color: var(--primary);
}

.refresh-pill:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.view-all-pill {
  background: #fff;
  border: 1px solid rgba(104, 217, 178, 0.4);
  color: var(--secondary-dark);
}

.view-all-pill:hover {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
  transform: translateY(-2px);
}

/* Focus visibility for a11y */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================================
   15. DARK MODE + THEME TOGGLE
   ============================================================ */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg-body: #0b1220;
  --bg-card: #111827;
  --bg-muted: #1e293b;
  --bg-elevated: #1a2332;
  --text-main: #f1f5f9;
  --text-heading: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;
  --glass-bg: rgba(17, 24, 39, 0.78);
  --glass-bg-strong: rgba(17, 24, 39, 0.92);
  --glass-border: rgba(148, 163, 184, 0.14);
  --glass-border-soft: rgba(148, 163, 184, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --glass-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
  --bg-gradient-soft:
    radial-gradient(ellipse at 10% 0%, rgba(250, 82, 100, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 10%, rgba(104, 217, 178, 0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(250, 82, 100, 0.06) 0%, transparent 50%);
  --primary-soft: rgba(250, 82, 100, 0.18);
  --secondary-soft: rgba(104, 217, 178, 0.16);
}

html[data-theme="dark"] body {
  background-color: var(--bg-body);
  background-image: var(--bg-gradient-soft);
  color: var(--text-sub);
}

html[data-theme="dark"] .prompt-card,
html[data-theme="dark"] .blog-card,
html[data-theme="dark"] .read-p-card,
html[data-theme="dark"] .quick-links-container,
html[data-theme="dark"] .minimal-text-block,
html[data-theme="dark"] .more-blog-card,
html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .read-content-body,
html[data-theme="dark"] .popup-card,
html[data-theme="dark"] .custom-sort-modal {
  background: var(--bg-card) !important;
  border-color: var(--glass-border) !important;
  color: var(--text-sub);
}

html[data-theme="dark"] .card-title,
html[data-theme="dark"] .read-p-name,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .quick-links-container h3 {
  color: var(--text-heading) !important;
}

html[data-theme="dark"] .quick-link-item,
html[data-theme="dark"] .sidebar-blog-item,
html[data-theme="dark"] .read-p-vis,
html[data-theme="dark"] .search-input,
html[data-theme="dark"] .action-btn-sm {
  background: var(--bg-muted) !important;
  color: var(--text-sub) !important;
  border-color: var(--glass-border) !important;
}

html[data-theme="dark"] .prompt-text,
html[data-theme="dark"] .minimal-line,
html[data-theme="dark"] .read-p-code {
  color: var(--text-sub) !important;
}

html[data-theme="dark"] .header,
html[data-theme="dark"] .mobile-header-modern,
html[data-theme="dark"] .mobile-bottom-nav {
  background: var(--glass-bg) !important;
  border-color: var(--glass-border) !important;
}

html[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(17, 24, 39, 0.94) !important;
}

html[data-theme="dark"] .small-footer {
  background: transparent;
  color: var(--text-muted);
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border-soft, rgba(148, 163, 184, 0.22));
  background: var(--glass-bg, rgba(255, 255, 255, 0.72));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-main, #0f172a);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.25s ease,
              background 0.25s ease,
              color 0.25s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(250, 82, 100, 0.2);
  color: var(--primary, #FA5264);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-block; }

html[data-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.25);
}

/* Live filter empty state */
.ipa-filter-empty {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-weight: 600;
}

.ipa-filter-empty.is-visible {
  display: block;
}

/* Card hide for live filter */
.prompt-card.is-filtered-out,
.blog-card.is-filtered-out {
  display: none !important;
}

/* Smooth theme transitions */
html.theme-ready body,
html.theme-ready body * {
  transition: background-color 0.28s ease, border-color 0.28s ease, color 0.2s ease, box-shadow 0.28s ease;
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html.theme-ready body,
  html.theme-ready body * {
    transition: none !important;
  }
}
