/* ================================================================
   GENPIX — style.css
   Premium Glassmorphism Design System
   Mobile-first, vanilla CSS, no external frameworks
   ================================================================ */

/* ================================================================
   #region 1 — DESIGN TOKENS (CSS Custom Properties)
   ================================================================ */

/* --- Dark Mode (default) --- */
:root,
[data-theme="dark"] {
  /* Backgrounds */
  --bg-base:        #090b10;
  --bg-surface:     #0f1118;
  --bg-elevated:    #161a26;

  /* Glass layers */
  --glass-bg:       rgba(255, 255, 255, 0.042);
  --glass-bg-hover: rgba(255, 255, 255, 0.07);
  --glass-border:   rgba(255, 255, 255, 0.09);
  --glass-border-h: rgba(255, 255, 255, 0.18);
  --glass-shadow:   0 8px 32px rgba(0, 0, 0, 0.55),
                    0 2px 8px  rgba(0, 0, 0, 0.4);
  --glass-shadow-lg:0 20px 60px rgba(0, 0, 0, 0.65),
                    0 4px 16px rgba(0, 0, 0, 0.5);

  /* Accents */
  --accent-a:       #7c5cfc;  /* violet */
  --accent-b:       #00cfde;  /* cyan   */
  --accent-a-raw:   124, 92, 252;
  --accent-b-raw:   0, 207, 222;
  --accent-glow:    rgba(124, 92, 252, 0.35);
  --accent-glow-b:  rgba(0, 207, 222, 0.25);

  /* Text */
  --text-primary:   rgba(255, 255, 255, 0.93);
  --text-secondary: rgba(255, 255, 255, 0.52);
  --text-muted:     rgba(255, 255, 255, 0.3);

  /* Chip / badge */
  --chip-bg:        rgba(255, 255, 255, 0.07);
  --chip-bg-active: rgba(124, 92, 252, 0.25);
  --chip-border:    rgba(255, 255, 255, 0.1);
  --chip-border-active: rgba(124, 92, 252, 0.6);

  /* FAB */
  --fab-bg:         linear-gradient(135deg, var(--accent-a), var(--accent-b));
  --fab-shadow:     0 8px 28px rgba(var(--accent-a-raw), 0.45);

  /* Scrollbar */
  --scrollbar-thumb: rgba(255,255,255,0.12);

  /* Header blur amount */
  --header-blur:    18px;

  /* Orbs */
  --orb-1: rgba(var(--accent-a-raw), 0.22);
  --orb-2: rgba(var(--accent-b-raw), 0.16);
  --orb-3: rgba(230, 100, 180, 0.14);
}

/* --- Light Mode --- */
[data-theme="light"] {
  --bg-base:        #f0f2f8;
  --bg-surface:     #e8eaf2;
  --bg-elevated:    #ffffff;

  --glass-bg:       rgba(255, 255, 255, 0.6);
  --glass-bg-hover: rgba(255, 255, 255, 0.78);
  --glass-border:   rgba(255, 255, 255, 0.9);
  --glass-border-h: rgba(255, 255, 255, 1);
  --glass-shadow:   0 8px 32px rgba(100, 80, 160, 0.10),
                    0 2px 8px  rgba(100, 80, 160, 0.07);
  --glass-shadow-lg:0 20px 60px rgba(100, 80, 160, 0.15),
                    0 4px 16px rgba(100, 80, 160, 0.1);

  --accent-a:       #6042e8;
  --accent-b:       #00a8bb;
  --accent-a-raw:   96, 66, 232;
  --accent-b-raw:   0, 168, 187;
  --accent-glow:    rgba(96, 66, 232, 0.2);
  --accent-glow-b:  rgba(0, 168, 187, 0.15);

  --text-primary:   rgba(18, 14, 38, 0.92);
  --text-secondary: rgba(18, 14, 38, 0.52);
  --text-muted:     rgba(18, 14, 38, 0.32);

  --chip-bg:        rgba(255, 255, 255, 0.7);
  --chip-bg-active: rgba(96, 66, 232, 0.12);
  --chip-border:    rgba(0, 0, 0, 0.08);
  --chip-border-active: rgba(96, 66, 232, 0.5);

  --fab-bg:         linear-gradient(135deg, var(--accent-a), var(--accent-b));
  --fab-shadow:     0 8px 28px rgba(var(--accent-a-raw), 0.38);

  --scrollbar-thumb: rgba(0, 0, 0, 0.14);

  --orb-1: rgba(var(--accent-a-raw), 0.12);
  --orb-2: rgba(var(--accent-b-raw), 0.09);
  --orb-3: rgba(230, 100, 180, 0.08);
}

/* #endregion */

/* ================================================================
   #region 2 — RESET & BASE
   ================================================================ */

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

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

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;

  /* Smooth theme transitions */
  transition:
    background-color 0.4s ease,
    color            0.4s ease;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Custom scrollbar (webkit) */
::-webkit-scrollbar               { width: 5px; height: 5px; }
::-webkit-scrollbar-track         { background: transparent; }
::-webkit-scrollbar-thumb         { background: var(--scrollbar-thumb); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover   { background: var(--accent-a); }

/* #endregion */

/* ================================================================
   #region 3 — AMBIENT BACKGROUND ORBS
   ================================================================ */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.orb--1 {
  width: clamp(260px, 55vw, 600px);
  height: clamp(260px, 55vw, 600px);
  top: -15%;
  left: -10%;
  background: var(--orb-1);
  animation: drift1 22s ease-in-out infinite alternate;
  transition: background 0.4s ease;
}

.orb--2 {
  width: clamp(200px, 42vw, 480px);
  height: clamp(200px, 42vw, 480px);
  top: 30%;
  right: -12%;
  background: var(--orb-2);
  animation: drift2 28s ease-in-out infinite alternate;
  transition: background 0.4s ease;
}

.orb--3 {
  width: clamp(150px, 35vw, 400px);
  height: clamp(150px, 35vw, 400px);
  bottom: 5%;
  left: 20%;
  background: var(--orb-3);
  animation: drift3 18s ease-in-out infinite alternate;
  transition: background 0.4s ease;
}

@keyframes drift1 {
  from { transform: translate(0, 0)   scale(1);    }
  to   { transform: translate(6%, 8%) scale(1.08); }
}
@keyframes drift2 {
  from { transform: translate(0, 0)    scale(1);    }
  to   { transform: translate(-5%, 6%) scale(1.06); }
}
@keyframes drift3 {
  from { transform: translate(0, 0)   scale(1);    }
  to   { transform: translate(4%, -5%) scale(1.1); }
}

/* #endregion */

/* ================================================================
   #region 4 — STICKY HEADER (Glass)
   ================================================================ */

.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;

  /* Glassmorphism */
  background: var(--glass-bg);
  backdrop-filter: blur(var(--header-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--header-blur)) saturate(160%);
  border-bottom: 1px solid var(--glass-border);

  transition:
    background     0.4s ease,
    border-color   0.4s ease,
    box-shadow     0.3s ease;
}

/* Subtle bottom shadow on scroll (added via JS) */
.header--scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  height: 60px;
}

/* Logo */
.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--accent-glow));
  transition: filter 0.4s ease;
}

.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity 0.2s ease;
}

.header__logo:hover .logo-text { opacity: 0.82; }

/* Header right actions */
.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* #endregion */

/* ================================================================
   #region 5 — BUTTONS & ICON BUTTONS
   ================================================================ */

/* Icon button (circular ghost) */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition:
    background   0.22s ease,
    border-color 0.22s ease,
    color        0.22s ease,
    transform    0.18s ease,
    box-shadow   0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
  flex-shrink: 0;
}

.btn-icon:hover,
.btn-icon:focus-visible {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-h);
  color: var(--text-primary);
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(var(--accent-a-raw), 0.2);
}

.btn-icon:active { transform: scale(0.94); }

/* Login button */
.btn--login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  height: 38px;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  transition:
    background   0.22s ease,
    border-color 0.22s ease,
    box-shadow   0.22s ease,
    transform    0.18s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn--login:hover,
.btn--login:focus-visible {
  background: rgba(var(--accent-a-raw), 0.18);
  border-color: rgba(var(--accent-a-raw), 0.45);
  box-shadow: 0 0 0 3px rgba(var(--accent-a-raw), 0.12);
  transform: translateY(-1px);
}

.btn--login:active { transform: translateY(0) scale(0.97); }

/* Copy button (pill with icon) */
.btn--copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 34px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: rgba(var(--accent-a-raw), 0.16);
  border: 1px solid rgba(var(--accent-a-raw), 0.35);
  color: var(--accent-a);
  transition:
    background   0.22s ease,
    border-color 0.22s ease,
    box-shadow   0.22s ease,
    transform    0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn--copy svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn--copy:hover,
.btn--copy:focus-visible {
  background: rgba(var(--accent-a-raw), 0.28);
  border-color: rgba(var(--accent-a-raw), 0.6);
  box-shadow: 0 0 12px rgba(var(--accent-a-raw), 0.25);
  transform: translateY(-1px);
}

.btn--copy:active { transform: scale(0.95); }

/* Copied state */
.btn--copy.copied {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #10b981;
}

/* #endregion */

/* ================================================================
   #region 6 — THEME TOGGLE (Sun / Moon)
   ================================================================ */

.theme-toggle .icon--sun,
.theme-toggle .icon--moon {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle {
  position: relative;
  overflow: hidden;
}

/* Dark mode: show sun, hide moon */
[data-theme="dark"] .theme-toggle .icon--sun  { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="dark"] .theme-toggle .icon--moon { opacity: 0; transform: rotate(90deg) scale(0.5); }

/* Light mode: show moon, hide sun */
[data-theme="light"] .theme-toggle .icon--sun  { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="light"] .theme-toggle .icon--moon { opacity: 1; transform: rotate(0deg) scale(1); }

/* #endregion */

/* ================================================================
   #region 7 — HERO SECTION
   ================================================================ */

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 20px 24px;
  max-width: 600px;
  margin: 0 auto;
  animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-b);
  margin-bottom: 10px;
  opacity: 0.85;
}

.hero__title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  background: linear-gradient(
    135deg,
    var(--text-primary) 0%,
    var(--text-primary) 50%,
    var(--accent-a)     100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 380px;
  margin: 0 auto;
}

/* #endregion */

/* ================================================================
   #region 8 — FILTER CHIP BAR
   ================================================================ */

.filter-bar {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 4px;
  /* fade edges on scroll */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 14px, black calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 14px, black calc(100% - 14px), transparent 100%);
  animation: heroFadeUp 0.7s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.filter-bar__track {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 16px 8px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.filter-bar__track::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  scroll-snap-align: start;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text-secondary);
  transition:
    background   0.2s ease,
    border-color 0.2s ease,
    color        0.2s ease,
    transform    0.16s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.chip--active {
  background: var(--chip-bg-active);
  border-color: var(--chip-border-active);
  color: var(--text-primary);
  box-shadow: 0 0 10px rgba(var(--accent-a-raw), 0.2);
}

.chip:hover:not(.chip--active) {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-h);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.chip:active { transform: scale(0.95); }

/* #endregion */

/* ================================================================
   #region 9 — FEED (prompt card grid)
   ================================================================ */

.feed {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 16px 120px; /* bottom pad for FAB */
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* 2-col on wider mobile / tablet */
@media (min-width: 600px) {
  .feed {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* 3-col on desktop */
@media (min-width: 860px) {
  .feed {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* #endregion */

/* ================================================================
   #region 10 — PROMPT CARD (Glass)
   ================================================================ */

.card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;

  /* Glassmorphism core */
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);

  display: flex;
  flex-direction: column;
  gap: 0;

  transition:
    transform    0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow   0.28s ease,
    border-color 0.28s ease,
    background   0.4s ease;

  animation: cardReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* staggered entrance */
.card:nth-child(1) { animation-delay: 0.15s; }
.card:nth-child(2) { animation-delay: 0.25s; }
.card:nth-child(3) { animation-delay: 0.35s; }

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.card:hover {
  transform: translateY(-4px) scale(1.008);
  border-color: var(--glass-border-h);
  box-shadow: var(--glass-shadow-lg);
}

/* Accent top edge glow */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-a), var(--accent-b), transparent);
  opacity: 0.55;
  transition: opacity 0.3s ease;
}

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

/* --- Card Header --- */
.card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 0;
}

.card__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--glass-border), 0 4px 10px rgba(var(--accent-a-raw), 0.3);
}

.card__avatar--b {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  box-shadow: 0 0 0 2px var(--glass-border), 0 4px 10px rgba(245, 158, 11, 0.3);
}

.card__meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.card__author {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.card__badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: rgba(var(--accent-a-raw), 0.15);
  border: 1px solid rgba(var(--accent-a-raw), 0.3);
  color: var(--accent-a);
  flex-shrink: 0;
}

.card__badge--b {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

/* --- Card Image --- */
.card__image {
  position: relative;
  margin: 12px 16px 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
}

.card__image-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(var(--accent-a-raw), 0.08) 0%,
    rgba(var(--accent-b-raw), 0.06) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s ease;
}

.card__image-inner--b {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.08) 0%,
    rgba(236, 72, 153, 0.06) 100%
  );
}

.placeholder-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Floating tag on image */
.card__image-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
}

.card__image-tag--b {
  background: rgba(0, 0, 0, 0.45);
}

/* --- Card Body (Prompt Text) --- */
.card__body {
  padding: 12px 16px 0;
  flex: 1;
}

.card__prompt-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.card__prompt-text {
  font-size: 0.825rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-secondary);
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.card:hover .card__prompt-text { color: var(--text-primary); }

/* --- Card Footer (Stats + Actions) --- */
.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px 14px;
  margin-top: 4px;
  border-top: 1px solid var(--glass-border);
  transition: border-color 0.4s ease;
}

.card__stats {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stat svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Scale down icon btn inside card */
.card__actions .btn-icon {
  width: 34px;
  height: 34px;
}

.card__actions .btn-icon svg {
  width: 15px;
  height: 15px;
}

/* #endregion */

/* ================================================================
   #region 11 — FLOATING ACTION BUTTON (FAB)
   ================================================================ */

.fab {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 90;

  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--fab-bg);
  box-shadow: var(--fab-shadow);
  border: none;
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  transition:
    transform  0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease;

  -webkit-tap-highlight-color: transparent;
}

.fab svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab:hover {
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 12px 36px rgba(var(--accent-a-raw), 0.55);
}

.fab:hover svg { transform: rotate(90deg); }

.fab:active {
  transform: scale(0.94);
  box-shadow: 0 4px 16px rgba(var(--accent-a-raw), 0.35);
}

/* Entrance animation */
.fab {
  animation: fabPop 0.5s 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes fabPop {
  from { opacity: 0; transform: scale(0) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* #endregion */

/* ================================================================
   #region 12 — TOAST NOTIFICATION
   ================================================================ */

.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 200;

  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;

  background: rgba(16, 185, 129, 0.18);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);

  opacity: 0;
  pointer-events: none;
  transition:
    opacity   0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* #endregion */

/* ================================================================
   #region 13 — FOCUS STYLES (Accessibility)
   ================================================================ */

:focus-visible {
  outline: 2px solid var(--accent-a);
  outline-offset: 3px;
  border-radius: 4px;
}

.btn-icon:focus-visible,
.fab:focus-visible,
.btn--login:focus-visible,
.btn--copy:focus-visible {
  outline: 2px solid var(--accent-a);
  outline-offset: 3px;
}

/* #endregion */

/* ================================================================
   #region 14 — RESPONSIVE TWEAKS
   ================================================================ */

@media (max-width: 360px) {
  .header__inner { padding: 0 12px; }
  .logo-text     { font-size: 1.15rem; }
  .btn--login    { padding: 0 12px; font-size: 0.8rem; }
  .hero          { padding: 36px 16px 20px; }
  .filter-bar__track { padding-left: 12px; padding-right: 12px; }
  .feed          { padding: 12px 12px 100px; }
}

@media (min-width: 768px) {
  .hero { padding: 64px 20px 32px; }
  .filter-bar__track { padding: 4px 24px 8px; }
  .feed { padding: 20px 24px 120px; }
  .fab  { bottom: 32px; right: 28px; }
  .toast { bottom: 110px; }
}

/* #endregion */





/* ================================================================
   GENPIX — style.css APPEND BLOCK
   Auth Feature: Login Modal + Header Avatar + Google Sign-In Button
   ================================================================
   INSTRUCTION: Append this entire file to the END of style.css
   ================================================================ */


/* ================================================================
   #region 15 — MODAL BACKDROP OVERLAY
   ================================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

/* Overlay becomes visible when modal is open */
#loginModal.modal--visible ~ .modal-overlay,
.modal-overlay:has(+ #loginModal.modal--visible) {
  opacity: 1;
  pointer-events: auto;
}

/*
  NOTE: We target the overlay via body class for broader browser support
  (the :has() selector above is a progressive enhancement)
*/
body.modal-open .modal-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* #endregion */


/* ================================================================
   #region 16 — LOGIN MODAL (Glassmorphism)
   ================================================================ */

.login-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 160;

  width: min(92vw, 400px);
  transform: translate(-50%, -50%) scale(0.94);

  /* Core glass panel */
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow-lg),
              0 0 0 1px rgba(255, 255, 255, 0.04) inset;

  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;

  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  transition:
    opacity   0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Accent top-edge glow (matches prompt cards) */
.login-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-a),
    var(--accent-b),
    transparent
  );
  opacity: 0.7;
  border-radius: 99px;
}

/* Visible state */
.login-modal.modal--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* --- Close button (top-right) --- */
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  /* Inherits .btn-icon styles */
}

/* --- Modal Header --- */
.modal__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.modal__logo-mark {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 0 12px var(--accent-glow));
  animation: logoPulse 3s ease-in-out infinite alternate;
}

@keyframes logoPulse {
  from { filter: drop-shadow(0 0 8px  var(--accent-glow)); }
  to   { filter: drop-shadow(0 0 18px var(--accent-glow)); }
}

.modal__title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-a));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
}

.modal__subtitle {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 280px;
}

/* --- Context / error message --- */
.modal__context-msg {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.28);
  text-align: center;
  animation: shakeIn 0.35s ease;
}

@keyframes shakeIn {
  0%   { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- Terms line --- */
.modal__terms {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  max-width: 300px;
}

.modal__link {
  color: var(--accent-b);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.modal__link:hover {
  color: var(--accent-a);
  text-decoration-color: var(--accent-a);
}

/* #endregion */


/* ================================================================
   #region 17 — GOOGLE SIGN-IN BUTTON
   ================================================================ */

.btn--google-signin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 50px;
  border-radius: 14px;
  padding: 0 20px;

  background: var(--glass-bg-hover);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.925rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;

  transition:
    background   0.22s ease,
    border-color 0.22s ease,
    transform    0.2s  cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow   0.22s ease;

  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

/* Subtle shimmer sweep on hover */
.btn--google-signin::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn--google-signin:hover::after {
  transform: translateX(100%);
}

.btn--google-signin:hover,
.btn--google-signin:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--glass-border-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--accent-a-raw), 0.18);
}

.btn--google-signin:active {
  transform: scale(0.97) translateY(0);
}

.btn--google-signin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Google coloured "G" icon */
.google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Button text */
.btn--google-signin__text {
  flex: 1;
  text-align: center;
  /* Offset slightly left to account for spinner placeholder on right */
  margin-right: 20px;
}

/* Loading spinner (shown when .btn--loading is active) */
.btn--google-signin__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-b);
  border-radius: 50%;
  flex-shrink: 0;
  position: absolute;
  right: 18px;
}

.btn--google-signin.btn--loading .btn--google-signin__spinner {
  display: block;
  animation: spin 0.7s linear infinite;
}

.btn--google-signin.btn--loading .btn--google-signin__text {
  opacity: 0.6;
}

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

/* #endregion */


/* ================================================================
   #region 18 — HEADER AVATAR (logged-in state)
   ================================================================ */

/*
  When auth.js swaps the Login button to the avatar,
  it removes .btn--login and adds .btn--avatar.
  These styles make it look like a polished circular avatar.
*/
.btn--avatar {
  /* Override pill shape from .btn--login */
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border-radius: 50% !important;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;

  /* Ring glow using accent colours */
  border: 2px solid transparent !important;
  background-clip: padding-box;
  box-shadow:
    0 0 0 2px var(--accent-a),
    0 4px 14px rgba(var(--accent-a-raw), 0.35) !important;

  transition:
    box-shadow 0.25s ease,
    transform  0.22s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn--avatar:hover,
.btn--avatar:focus-visible {
  transform: scale(1.08) !important;
  box-shadow:
    0 0 0 2px var(--accent-b),
    0 6px 20px rgba(var(--accent-b-raw), 0.45) !important;
}

/* The <img> inside the avatar button */
.header-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Fallback initials (shown if no photoURL) */
.header-avatar__initials {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  letter-spacing: 0.04em;
}

/* #endregion */




/* ================================================================
   GENPIX — style.css APPEND BLOCK
   Step 3: Post Prompt Modal, Drop Zone, Category Chips, Submit Btn
   ================================================================
   INSTRUCTION: Append this entire block to the END of style.css
   ================================================================ */


/* ================================================================
   #region 19 — POST PROMPT MODAL (overrides & extensions)
   ================================================================ */

/*
  The post modal reuses .login-modal and .modal-overlay base styles.
  The .post-modal modifier adds extra width and scrollability for
  its taller form content.
*/

.post-modal {
  width: min(95vw, 480px);
  max-height: min(92dvh, 760px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 24px 24px;
  gap: 18px;

  /* Custom scrollbar inside modal */
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.post-modal::-webkit-scrollbar       { width: 4px; }
.post-modal::-webkit-scrollbar-track { background: transparent; }
.post-modal::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 99px;
}

/* Post modal has its own overlay (id="postModalOverlay") —
   body.post-modal-open activates it, same pattern as login modal */
body.post-modal-open .modal-overlay#postModalOverlay {
  opacity: 1;
  pointer-events: auto;
}

body.post-modal-open {
  overflow: hidden;
}

/* Title row: icon + heading inline */
.post-modal__header {
  gap: 8px;
}

.post-modal__title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.post-modal__icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* #endregion */


/* ================================================================
   #region 20 — POST FORM FIELD WRAPPER
   ================================================================ */

.post-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.post-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Field label with inline icon */
.post-form__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.post-form__label svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
}

/* #endregion */


/* ================================================================
   #region 21 — IMAGE DROP ZONE
   ================================================================ */

.post-form__drop-zone {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  border-radius: 14px;
  border: 1.5px dashed var(--glass-border-h);
  background: var(--glass-bg);
  cursor: pointer;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  transition:
    border-color  0.25s ease,
    background    0.25s ease,
    box-shadow    0.25s ease;

  -webkit-tap-highlight-color: transparent;
}

.post-form__drop-zone:hover,
.post-form__drop-zone:focus-visible {
  border-color: var(--accent-a);
  background: rgba(var(--accent-a-raw), 0.06);
  box-shadow: 0 0 0 3px rgba(var(--accent-a-raw), 0.1),
              inset 0 0 24px rgba(var(--accent-a-raw), 0.04);
  outline: none;
}

/* Drag-over active state (applied via JS) */
.post-form__drop-zone.drag-over {
  border-color: var(--accent-b);
  background: rgba(var(--accent-b-raw), 0.08);
  box-shadow: 0 0 0 3px rgba(var(--accent-b-raw), 0.15),
              inset 0 0 32px rgba(var(--accent-b-raw), 0.06);
}

/* Idle / empty state content */
.drop-zone__idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  user-select: none;
}

.drop-zone__icon {
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  opacity: 0.6;
  transition: color 0.25s ease, opacity 0.25s ease, transform 0.3s ease;
}

.post-form__drop-zone:hover .drop-zone__icon,
.post-form__drop-zone.drag-over .drop-zone__icon {
  color: var(--accent-a);
  opacity: 1;
  transform: translateY(-3px);
}

.drop-zone__text {
  font-size: 0.83rem;
  color: var(--text-secondary);
  text-align: center;
}

.drop-zone__cta {
  color: var(--accent-a);
  font-weight: 500;
}

.drop-zone__hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Preview state */
.drop-zone__preview {
  position: absolute;
  inset: 0;
}

.drop-zone__preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

/* Hover overlay on preview */
.drop-zone__preview-overlay {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.post-form__drop-zone:hover .drop-zone__preview-overlay {
  background: rgba(0, 0, 0, 0.42);
}

.drop-zone__preview-change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.drop-zone__preview-change svg {
  width: 14px;
  height: 14px;
}

.post-form__drop-zone:hover .drop-zone__preview-change {
  opacity: 1;
  transform: scale(1);
}

/* #endregion */


/* ================================================================
   #region 22 — CATEGORY CHIPS (post form variant)
   ================================================================ */

.post-form__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* .post-chip shares logic with .chip but is scoped to the form */
.post-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;

  transition:
    background    0.2s ease,
    border-color  0.2s ease,
    color         0.2s ease,
    transform     0.16s ease,
    box-shadow    0.2s ease;

  -webkit-tap-highlight-color: transparent;
}

.post-chip:hover:not(.post-chip--active) {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-h);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.post-chip--active {
  background: rgba(var(--accent-a-raw), 0.2);
  border-color: rgba(var(--accent-a-raw), 0.55);
  color: var(--text-primary);
  box-shadow: 0 0 12px rgba(var(--accent-a-raw), 0.18);
}

.post-chip:active { transform: scale(0.94); }

/* #endregion */


/* ================================================================
   #region 23 — PROMPT TEXTAREA
   ================================================================ */

.post-form__textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.65;

  transition:
    border-color  0.22s ease,
    background    0.22s ease,
    box-shadow    0.22s ease;

  /* Disable ugly default outline */
  outline: none;
}

.post-form__textarea::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.post-form__textarea:focus {
  border-color: rgba(var(--accent-a-raw), 0.5);
  background: rgba(var(--accent-a-raw), 0.04);
  box-shadow: 0 0 0 3px rgba(var(--accent-a-raw), 0.1);
}

/* Character count + error row */
.post-form__char-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 18px;
}

.post-form__char-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

/* Warn when approaching limit */
.post-form__char-count.near-limit  { color: #f59e0b; }
.post-form__char-count.at-limit    { color: #ef4444; }

.post-form__error {
  font-size: 0.75rem;
  color: #ef4444;
  line-height: 1.4;
  animation: shakeIn 0.3s ease;
}

/* #endregion */


/* ================================================================
   #region 24 — SUBMIT BUTTON
   ================================================================ */

.post-form__submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.925rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: white;

  /* Gradient fill using accent pair */
  background: linear-gradient(
    115deg,
    var(--accent-a) 0%,
    color-mix(in srgb, var(--accent-a) 40%, var(--accent-b)) 60%,
    var(--accent-b) 100%
  );
  background-size: 200% 100%;
  background-position: 0% 50%;

  box-shadow:
    0 6px 22px rgba(var(--accent-a-raw), 0.38),
    0 2px 8px  rgba(var(--accent-a-raw), 0.2);

  transition:
    background-position 0.45s ease,
    box-shadow          0.25s ease,
    transform           0.2s  cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity             0.25s ease;

  -webkit-tap-highlight-color: transparent;
}

/* Shimmer sweep on hover */
.post-form__submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.13) 50%,
    transparent 65%
  );
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}

.post-form__submit:hover::before { transform: translateX(100%); }

.post-form__submit:hover,
.post-form__submit:focus-visible {
  background-position: 100% 50%;
  box-shadow:
    0 10px 32px rgba(var(--accent-a-raw), 0.5),
    0 4px 12px  rgba(var(--accent-a-raw), 0.28);
  transform: translateY(-2px);
  outline: none;
}

.post-form__submit:active {
  transform: scale(0.97) translateY(0);
  box-shadow:
    0 4px 14px rgba(var(--accent-a-raw), 0.3),
    0 1px 4px  rgba(var(--accent-a-raw), 0.15);
}

.post-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* Submit icon (plane) */
.post-form__submit-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.post-form__submit:hover .post-form__submit-icon {
  transform: translateX(3px) translateY(-2px);
}

/* Loading spinner (activated by .btn--loading on the button) */
.post-form__submit-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: white;
  border-radius: 50%;
  flex-shrink: 0;
  position: absolute;
  right: 18px;
}

.post-form__submit.btn--loading .post-form__submit-spinner {
  display: block;
  animation: spin 0.7s linear infinite;
}

.post-form__submit.btn--loading .post-form__submit-text,
.post-form__submit.btn--loading .post-form__submit-icon {
  opacity: 0.55;
}

/* #endregion */




/* ================================================================
   GENPIX — style.css APPEND BLOCK
   Step 4: Feed — Skeleton Loader, Empty State, Error State,
           Real Image Cards, Extra Badge Variants, Avatar Photo
   ================================================================
   INSTRUCTION: Append this entire block to the END of style.css
   ================================================================ */


/* ================================================================
   #region 25 — SKELETON LOADING CARDS
   ================================================================ */

/*
  Skeleton cards sit in the grid exactly like real .card elements.
  A CSS shimmer animation sweeps across them while data loads.
*/

@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton-block {
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--glass-bg)       0%,
    var(--glass-bg-hover) 50%,
    var(--glass-bg)       100%
  );
  background-size: 600px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

/* Avatar circle placeholder */
.skeleton-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Text-line placeholder */
.skeleton-line {
  /* width and height supplied inline from JS */
  border-radius: 5px;
}

/* Badge pill placeholder */
.skeleton-badge {
  width: 64px;
  height: 22px;
  border-radius: 99px;
  flex-shrink: 0;
}

/* Image area placeholder — fills the card__image proportions */
.skeleton-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--glass-bg)       0%,
    var(--glass-bg-hover) 50%,
    var(--glass-bg)       100%
  );
  background-size: 600px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  animation-delay: 0.2s;
}

/* Keep skeleton cards non-interactive */
.card--skeleton {
  pointer-events: none;
  user-select: none;
}

/* Stagger shimmer phase across the three skeleton cards */
.card--skeleton:nth-child(1) .skeleton-block { animation-delay: 0s; }
.card--skeleton:nth-child(2) .skeleton-block { animation-delay: 0.15s; }
.card--skeleton:nth-child(3) .skeleton-block { animation-delay: 0.3s; }

/* #endregion */


/* ================================================================
   #region 26 — EMPTY STATE
   ================================================================ */

/*
  .feed__empty centres itself across the full grid.
  On multi-column layouts it spans all columns.
*/

.feed__empty {
  grid-column: 1 / -1;       /* span all grid columns */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 64px 24px;
  text-align: center;
  animation: heroFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.feed__empty-icon {
  width: 80px;
  height: 80px;
  opacity: 0.7;
  animation: logoPulse 3s ease-in-out infinite alternate;
}

.feed__empty-icon svg {
  width: 100%;
  height: 100%;
}

.feed__empty-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-a));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feed__empty-sub {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 320px;
}

.feed__empty-sub strong {
  font-weight: 600;
  color: var(--accent-a);
}

/* #endregion */


/* ================================================================
   #region 27 — ERROR STATE
   ================================================================ */

.feed__error .feed__empty-title {
  background: linear-gradient(135deg, #ef4444, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feed__retry-link {
  color: var(--accent-b);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: transparent;
  cursor: pointer;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.feed__retry-link:hover {
  color: var(--accent-a);
  text-decoration-color: var(--accent-a);
}

/* #endregion */


/* ================================================================
   #region 28 — REAL IMAGE CARDS
   ================================================================ */

/*
  When a card has a real imageUrl from Firestore, we swap the
  card__image-inner to use object-fit cover on the <img>.
*/

.card__image-inner--real {
  background: var(--bg-elevated);
  padding: 0;
}

.card__real-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 11px; /* 1px inside parent's 12px radius */
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              filter    0.3s ease;
}

/* Subtle zoom on card hover for real images */
.card:hover .card__real-img {
  transform: scale(1.03);
  filter: brightness(1.04);
}

/* #endregion */


/* ================================================================
   #region 29 — AVATAR PHOTO VARIANT
   ================================================================ */

/*
  When the author has a photoURL, the avatar contains an <img>
  instead of a text initial span.
*/

.card__avatar--photo {
  padding: 0;
  overflow: hidden;
  /* Keep the existing box-shadow/border from .card__avatar */
}

.card__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* #endregion */


/* ================================================================
   #region 30 — EXTRA BADGE COLOUR VARIANTS
   ================================================================ */

/*
  The dummy cards only had the default (violet) and --b (amber/pink).
  Feed cards can have any category; here are the additional variants
  referenced in feed.js's BADGE_MODIFIERS map.
*/

/* Neon / Cyberpunk — cyan accent */
.card__badge--c {
  background: rgba(var(--accent-b-raw), 0.13);
  border-color: rgba(var(--accent-b-raw), 0.35);
  color: var(--accent-b);
}

/* Film Grain — muted green */
.card__badge--d {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.32);
  color: #10b981;
}

/* Landscape — sky blue */
.card__badge--e {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.32);
  color: #60a5fa;
}

/* #endregion */
