:root {
  --bg: #0D0D12;
  --surface: #1A1A23;
  --fg: #EAEAEE;
  --muted: #8A8A9A;
  --border: rgba(255, 255, 255, 0.1);
  --accent-purple: #A855F7;
  --accent-amber: #F59E0B;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.25s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(13, 13, 18, 0.8);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header__logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--fg);
  text-decoration: none;
}
.header__logo span { color: var(--accent-purple); }
.header__nav { display: flex; gap: 28px; }
.header__nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.header__nav a:hover { color: var(--fg); }
.header__actions { display: flex; align-items: center; gap: 16px; }
.header__search {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color var(--transition);
}
.header__search:hover { color: var(--fg); }
.header__login {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  color: var(--fg);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.header__login:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }
.header__account {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-purple);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ===== Container ===== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 20px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(168,85,247,0.15), transparent 60%);
  pointer-events: none;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(168,85,247,0.15);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: 999px;
  padding: 6px 16px 6px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-purple);
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 800px;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 36px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: linear-gradient(135deg, var(--accent-amber), #E07B00);
  color: #0D0D12;
  box-shadow: 0 0 24px rgba(245,158,11,0.35);
  animation: pulse-glow 2.5s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(245,158,11,0.3); }
  50%      { box-shadow: 0 0 32px rgba(245,158,11,0.55); }
}
.btn--secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
}
.btn--secondary:hover { background: rgba(255,255,255,0.06); }

/* ===== Section ===== */
.section { padding: 5rem 0; }
.section__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 3rem;
  text-transform: uppercase;
}
.section__title--highlight {
  color: var(--accent-amber);
}

/* ===== Categories ===== */
.categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
  cursor: pointer;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.category-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-purple);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.category-card:hover::after { transform: scaleX(1); }
.category-card:hover { transform: translateY(-4px); border-color: rgba(168,85,247,0.3); }
.category-card__icon { font-size: 2.2rem; margin-bottom: 16px; display: inline-block; transition: transform var(--transition); }
.category-card:hover .category-card__icon { transform: scale(1.15); }
.category-card__title { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.category-card__tags { font-size: 0.85rem; color: var(--muted); }

/* ===== Showcase ===== */
.showcase__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.prompt-card {
  background: rgba(26,26,35,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition);
}
.prompt-card:hover { border-color: rgba(168,85,247,0.25); }
.prompt-card__header { display: flex; justify-content: space-between; align-items: center; }
.prompt-card__badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(168,85,247,0.2);
  color: var(--accent-purple);
}
.prompt-card__difficulty {
  font-size: 0.75rem;
  color: #F97316;
  background: rgba(249,115,22,0.15);
  padding: 4px 10px;
  border-radius: 999px;
}
.prompt-card__title { font-size: 1.1rem; font-weight: 700; }
.prompt-card__desc { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.prompt-card__bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.prompt-card__image {
  width: 100%;
  height: 120px;
  background: linear-gradient(145deg, #1A1A23, #252535);
  border-radius: var(--radius-sm);
}
.prompt-card__lock {
  position: relative;
}
.prompt-card__input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(13,13,18,0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: transparent;
  text-shadow: 0 0 10px rgba(234,234,238,0.3);
  font-size: 0.85rem;
  filter: blur(6px);
  pointer-events: none;
}
.prompt-card__lock-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(26,26,35,0.8);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--accent-purple);
  border: 1px solid rgba(168,85,247,0.3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.showcase__cta {
  text-align: center;
  margin-top: 3rem;
}

/* ===== Mechanics ===== */
.mechanics__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  position: relative;
}
.mechanics__steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple), transparent, var(--accent-amber));
  border-top: 2px dashed rgba(168,85,247,0.2);
  display: none;
}
@media (min-width: 900px) {
  .mechanics__steps::before { display: block; }
}
.step {
  text-align: center;
  z-index: 1;
}
.step__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 20px;
}
.step__title { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.step__desc { color: var(--muted); font-size: 0.95rem; max-width: 280px; margin: 0 auto; }

/* ===== Pricing ===== */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: border-color var(--transition);
  position: relative;
}
.pricing-card--featured {
  border-color: var(--accent-amber);
  box-shadow: 0 0 40px rgba(245,158,11,0.12);
}
.pricing-card--featured::before {
  content: 'Выгодно';
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--accent-amber);
  color: #0D0D12;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 16px;
  border-radius: 999px;
}
.pricing-card__title { font-size: 1.3rem; font-weight: 700; }
.pricing-card__price { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em; }
.pricing-card__price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.pricing-card__list { display: flex; flex-direction: column; gap: 8px; font-size: 0.95rem; color: var(--muted); list-style: none; padding: 0; }
.pricing-card__list li { display: flex; align-items: center; gap: 10px; }
.pricing-card__list li::before { content: '✓'; color: var(--accent-purple); font-weight: 700; }
.pricing-card .btn { margin-top: auto; }

/* ===== Order ===== */
.order {
  background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(245,158,11,0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}
.order__info { flex: 1 1 300px; }
.order__title {
  font-size: clamp(1.4rem, 3vw, 1.6rem);
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.order__title--highlight {
  color: var(--accent-amber);
}
.order__desc { color: var(--muted); font-size: 0.95rem; }
.order__form { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; }
.order__form input,
.order__form textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(13,13,18,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}
.order__form input:focus,
.order__form textarea:focus { outline: none; border-color: var(--accent-purple); }
.order__form textarea { min-height: 80px; resize: vertical; }
.order__form .btn { align-self: flex-start; }


/* ===== Order consent checkbox ===== */
.order__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1.4;
}
.order__consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent-purple);
    cursor: pointer;
}
.order__consent a {
    color: var(--accent-purple);
    text-decoration: underline;
}
.order__consent a:hover {
    color: var(--accent-amber);
}


/* ===== Order form alerts ===== */
.order-alert {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.4;
}
.order-alert--ok {
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #86efac;
}
.order-alert--err {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}
.order-alert__icon {
    font-size: 1.1rem;
    line-height: 1;
}
.order-alert__text {
    font-size: 0.9rem;
}
.order-alert__again {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--fg);
    font-family: var(--font);
    font-size: 0.8rem;
    padding: 8px 16px;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.order-alert__again:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
}

/* ===== FAQ ===== */
.faq__list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item__question {
  width: 100%;
  background: none;
  border: none;
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}
.faq-item__question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--muted);
  transition: transform 0.3s;
}
.faq-item[open] .faq-item__question::after { transform: rotate(45deg); }
.faq-item__answer {
  padding: 0 0 20px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 24px 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  max-width: 1240px;
  margin: 0 auto;
}
.footer__col h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }
.footer__col p, .footer__col a {
  color: var(--muted);
  font-size: 0.9rem;
  display: block;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--fg); }
.footer__bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header__nav { display: none; }
  .hero { min-height: 60vh; padding: 3rem 16px; }
  .section { padding: 3rem 0; }
  .categories__grid { grid-template-columns: repeat(2, 1fr); }
  .order { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
  .categories__grid { grid-template-columns: 1fr 1fr; }
  .showcase__grid { grid-template-columns: 1fr; }
  .pricing__grid { grid-template-columns: 1fr; }
}


/* ===== Header nav active ===== */
.header__nav a {
  position: relative;
  padding-bottom: 4px;
}
.header__nav a.active {
  color: var(--fg);
}
.header__nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-amber);
  border-radius: 2px;
}

/* ===== Catalog layout ===== */
.catalog {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 68px);
}

/* ===== Sidebar ===== */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  padding: 28px 20px 28px 24px;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 68px;
  align-self: flex-start;
  height: calc(100vh - 68px);
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar__section { margin-bottom: 28px; }
.sidebar__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}
.sidebar__radio-group { display: flex; flex-direction: column; gap: 4px; }

/* Accordion sidebar */
.sidebar__accordion-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  text-align: left;
}
.sidebar__accordion-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--fg);
}
.sidebar__accordion-btn .radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.5;
}
.sidebar__accordion.open > .sidebar__accordion-btn {
  color: var(--fg);
}
.sidebar__accordion.open > .sidebar__accordion-btn .radio-dot {
  opacity: 1;
  background: var(--accent-purple);
}
.sidebar__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.sidebar__chevron {
  font-size: 0.6rem;
  transition: transform 0.2s;
  opacity: 0.5;
  line-height: 1;
}
.sidebar__accordion-btn .sidebar__chevron {
  font-size: 0.75rem;
}
.sidebar__accordion.open > .sidebar__accordion-btn .sidebar__chevron {
  transform: rotate(180deg);
}
.sidebar__accordion-body {
  display: none;
  padding-left: 20px;
}
.sidebar__accordion.open > .sidebar__accordion-body {
  display: block;
}
.sidebar__accordion--sub > .sidebar__accordion-btn {
  font-size: 0.9rem;
  padding: 8px 12px;
}
.sidebar__accordion--sub .sidebar__accordion-body {
  padding-left: 16px;
}
.sidebar__sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
}
.sidebar__sub:hover {
  background: rgba(255,255,255,0.05);
  color: var(--fg);
}
.sidebar__sub.active {
  background: rgba(168,85,247,0.12);
  color: var(--accent-purple);
}
.sidebar__count {
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.6;
  flex-shrink: 0;
  min-width: 2.5em;
  text-align: right;
}
.sidebar__radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  text-decoration: none;
}
.sidebar__radio:hover { background: rgba(255,255,255,0.04); color: var(--fg); }
.sidebar__radio.active { background: rgba(168,85,247,0.12); color: var(--accent-purple); }
.sidebar__radio .radio-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar__radio.active .radio-dot::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-purple);
}
.sidebar__checkbox-group { display: flex; flex-direction: column; gap: 4px; }
.sidebar__checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  text-decoration: none;
}
.sidebar__checkbox:hover { background: rgba(255,255,255,0.04); color: var(--fg); }
.sidebar__checkbox .check-box {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 2px solid var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition);
}
.sidebar__checkbox.active .check-box {
  border-color: var(--accent-purple);
  background: var(--accent-purple);
}
.sidebar__checkbox.active .check-box::after {
  content: '\2713';
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.sidebar__checkbox.active { color: var(--fg); }

/* ===== Main content ===== */
.main {
  flex: 1;
  padding: 28px 32px 40px;
  min-width: 0;
}

/* ===== Search section ===== */
.search-section { margin-bottom: 28px; text-align: center; }
.search-section__title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 4px 4px 16px;
  max-width: 740px;
  margin: 0 auto;
  transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--accent-purple); }
.search-bar__icon {
  color: var(--muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-right: 12px;
}
.search-bar__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 12px 0;
}
.search-bar__input::placeholder { color: var(--muted); }
.search-bar__btn {
  background: linear-gradient(135deg, var(--accent-amber), #E07B00);
  color: #0D0D12;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 28px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity var(--transition);
}
.search-bar__btn:hover { opacity: 0.9; }
.search-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.search-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}
.search-tag:hover { border-color: var(--accent-purple); color: var(--fg); }

/* ===== Toolbar ===== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.toolbar__count {
  font-size: 0.9rem;
  color: var(--muted);
}
.toolbar__count strong { color: var(--fg); font-weight: 600; }
.toolbar__sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.sort-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  appearance: auto;
}
.sort-select:focus { border-color: var(--accent-purple); }

/* ===== Grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ===== Card ===== */
/* ===== Card link wrapper ===== */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link:hover {
  text-decoration: none;
  color: inherit;
}

.card-link:visited {
  color: inherit;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: rgba(168,85,247,0.3); transform: translateY(-2px); }
.card__cover {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
}
.card__cover img,
.card__cover .cover-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card__cover img,
.card:hover .card__cover .cover-placeholder { transform: scale(1.05); }
.cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.cover-placeholder--text {
  background: 
    linear-gradient(145deg, rgb(9 9 12 / 80%), rgb(33 4 40 / 55%)),
    url('/storage/images/design/cover-text.webp') center/cover no-repeat;
}
.cover-placeholder--image {
  background: linear-gradient(145deg, #1E1E2E, #2A2A3E);
}
.cover-placeholder--music {
  background: linear-gradient(145deg, #1A1A28, #282838);
}
.cover-placeholder--code {
  background: linear-gradient(145deg, #14141E, #222230);
}

/* Video card cover with play overlay */
.card__cover--video {
  position: relative;
}
.card__cover--video:not(.no-poster)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.12);
  pointer-events: none;
  z-index: 2;
}
.card__cover--video:not(.no-poster)::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 65px;
  height: 65px;
  border-radius: 15px;
  background: rgba(0,0,0,0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='65' height='65' viewBox='0 0 65 65'%3E%3Crect x='2' y='2' width='61' height='61' rx='14' fill='none' stroke='rgba(255,255,255,0.8)' stroke-width='3'/%3E%3Cpolygon points='25,19 25,46 45,32.5' fill='rgba(255,255,255,0.88)'/%3E%3C/svg%3E");
  background-size: 65px 65px;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 3;
  pointer-events: none;
}
.card__cover--music {
  position: relative;
}
.card__cover--music:not(.no-cover)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.12);
  pointer-events: none;
  z-index: 2;
}
.card__cover--music:not(.no-cover)::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 65px;
  height: 65px;
  border-radius: 15px;
  background: rgba(0,0,0,0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='65' height='65' viewBox='0 0 65 65'%3E%3Crect x='2' y='2' width='61' height='61' rx='14' fill='none' stroke='rgba(255,255,255,0.8)' stroke-width='3'/%3E%3Cpath d='M20 25 L28 25 L36 19 L36 46 L28 40 L20 40 Z' fill='rgba(255,255,255,0.88)'/%3E%3Cpath d='M41 25 C45 28 45 37 41 40' fill='none' stroke='rgba(255,255,255,0.88)' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='M46 22 C52 27 52 38 46 43' fill='none' stroke='rgba(255,255,255,0.88)' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 65px 65px;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 3;
  pointer-events: none;
}

.card__badge-tool {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(13,13,18,0.85);
  backdrop-filter: blur(8px);
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fg);
  border: 1px solid var(--border);
}
.card__badge-tool .tool-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.card__badge-new {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-amber);
  color: #0D0D12;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card__title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}
.card__desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}
.card__difficulty {
  display: flex;
  align-items: center;
  gap: 4px;
}
.card__copies {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== Empty state ===== */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  gap: 16px;
}
.empty-state.visible { display: flex; }
.empty-state__icon { font-size: 3.5rem; opacity: 0.4; }
.empty-state__title { font-size: 1.4rem; font-weight: 700; }
.empty-state__desc { color: var(--muted); font-size: 0.95rem; max-width: 400px; }
.empty-state__actions { display: flex; gap: 12px; margin-top: 8px; }

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.pagination__btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 32px;
  color: var(--fg);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  font-family: var(--font);
}
.pagination__btn:hover { background: rgba(255,255,255,0.04); border-color: rgba(168,85,247,0.3); }
.pagination__pages {
  display: flex;
  gap: 4px;
}
.pagination__page {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.pagination__page:hover { border-color: var(--border); color: var(--fg); }
.pagination__page.active { border-color: var(--accent-purple); color: var(--fg); font-weight: 600; }
.pagination__page.ellipsis { border: none; cursor: default; }

/* ===== Catalog responsive ===== */
@media (max-width: 1024px) {
  .catalog .sidebar { display: none; }
  .catalog .main { padding: 24px 20px 32px; }
}
@media (max-width: 768px) {
  .search-bar { max-width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
}


/* ===== Single prompt page ===== */
:root {
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--muted); transition: color var(--transition); text-decoration: none; }
.breadcrumbs a:hover { color: var(--fg); }
.breadcrumbs span { color: var(--muted); }
.breadcrumbs .current { color: var(--fg); }

/* ===== Prompt meta ===== */
.prompt-meta {
  padding: 32px 0 0;
}
.prompt-meta__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(13,13,18,0.6);
  color: var(--fg);
}
.badge--purple { border-color: rgba(168,85,247,0.3); color: var(--accent-purple); background: rgba(168,85,247,0.08); }
.badge--amber { border-color: rgba(245,158,11,0.3); color: var(--accent-amber); background: rgba(245,158,11,0.08); }
.badge--orange { border-color: rgba(249,115,22,0.3); color: #F97316; background: rgba(249,115,22,0.08); }
.badge .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.prompt-meta__title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.prompt-meta__desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.prompt-meta__stats {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.prompt-meta__stats span { display: flex; align-items: center; gap: 6px; }

/* ===== Showcase ===== */
.showcase {
  margin-top: 32px;
  margin-bottom: 32px;
}
.showcase__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}
.showcase__chat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.showcase__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.showcase__bubble {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 4px 16px 16px 16px;
  padding: 16px 20px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--fg);
  max-width: 580px;
}
.showcase__bubble strong { color: var(--accent-amber); }

/* ===== Code block ===== */
.code-block {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 28px;
}
.code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(13,13,18,0.6);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}
.code-block__header .file-name {
  display: flex;
  align-items: center;
  gap: 6px;
}
.code-block__body {
  background: #0A0A0E;
  padding: 24px 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: #D4D4D8;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.code-block__body .line { white-space: pre-wrap; }
.code-block__body .line .var {
  color: var(--accent-purple);
  font-weight: 500;
}
.code-block__body .line .comment { color: #6B7280; }
.code-block__body .line .keyword { color: #93C5FD; }
.code-block__body .line .string { color: #A7F3D0; }

/* ===== STATE: Guest (blur) ===== */
.code-block--guest .code-block__body {
  position: relative;
}
.blur-layer {
  position: absolute;
  inset: 0;
  background: rgba(10,10,14,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
  padding: 1.25rem;
}
.blur-layer__icon { font-size: 2.8rem; }
.blur-layer__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
}
.blur-layer__text {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  max-width: 320px;
}
.blur-layer .btn { margin-top: 4px; white-space: nowrap; }
.blur-layer .btn--ghost { margin-top: 0; }
.copy-feedback {
  display: none;
  align-items: center;
  gap: 6px;
  color: #34D399;
  font-weight: 600;
  font-size: 0.85rem;
}
.copy-feedback.visible { display: flex; }

/* ===== Instructions ===== */
.instructions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
.instructions__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  grid-column: 1 / -1;
}
.instr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.instr-card__head {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-purple);
  margin-bottom: 16px;
}
.instr-card__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.instr-card__item:last-child { border-bottom: none; }
.instr-card__item .key {
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}
.instr-card__item .value {
  color: var(--muted);
}
.instr-card__item .value code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-purple);
  background: rgba(168,85,247,0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ===== Related ===== */
.related { margin-bottom: 48px; }
.related__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
  text-decoration: none;
  color: var(--fg);
}
.mini-card:hover { border-color: rgba(168,85,247,0.3); transform: translateY(-2px); }
.mini-card__header { display: flex; justify-content: space-between; align-items: center; }
.mini-card__badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(168,85,247,0.15);
  color: var(--accent-purple);
}
.mini-card__title { font-size: 0.9rem; font-weight: 600; }
.mini-card__desc {
  font-size: 0.78rem; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mini-card__footer {
  display: flex; justify-content: space-between;
  font-size: 0.7rem; color: var(--muted);
  padding-top: 6px; border-top: 1px solid var(--border);
}

/* ===== Ghost button ===== */
.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: none;
  font-size: 0.85rem;
  padding: 8px 16px;
}
.btn--ghost:hover { color: var(--fg); transform: none; }

/* ===== Single page responsive ===== */
@media (max-width: 768px) {
  .instructions { grid-template-columns: 1fr; }
  .showcase__chat { flex-direction: column; }
}


/* ===== Article page (page type) ===== */
:root {
  --fg-soft: rgba(255,255,255,0.85);
  --code-bg: #0A0A0E;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --radius-xs: 8px;
}

/* ===== Breadcrumbs (page) ===== */
.breadcrumbs--page {
  max-width: 840px;
  margin: 0 auto;
}

/* ===== Article container ===== */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* ===== Article header ===== */
.article__meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.article__title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 16px;
}
.article__lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--fg);
  font-weight: 500;
  margin-bottom: 24px;
}
.article__cover {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #1A1A28, #252540);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ===== Article typography ===== */
.article h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-top: 48px;
  margin-bottom: 12px;
  line-height: 1.3;
}
.article h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
  margin-top: 32px;
  margin-bottom: 8px;
  line-height: 1.4;
}
.article p {
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 20px;
  color: var(--fg-soft);
}
.article ul, .article ol {
  margin-bottom: 20px;
  padding-left: 24px;
  font-size: 1.05rem;
  line-height: 1.65;
}
.article li {
  margin-bottom: 8px;
  color: var(--fg-soft);
}
.article ul li::marker { color: var(--accent-purple); }
.article ol li::marker {
  color: var(--accent-purple);
  font-weight: 600;
}
.article a {
  color: var(--accent-purple);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--transition);
}
.article a:hover { color: #C084FC; }

/* ===== Article blockquote ===== */
.article blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  background: rgba(168,85,247,0.06);
  border-left: 4px solid var(--accent-purple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--fg);
  font-style: italic;
}
.article blockquote p { margin-bottom: 0; }

/* ===== Article code block ===== */
.article .code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 28px 0;
  position: relative;
}
.article .code-block__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}
.article .code-block__copy {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--muted);
  padding: 4px 12px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  font-family: var(--font);
}
.article .code-block__copy:hover { border-color: var(--accent-purple); color: var(--fg); }
.article pre {
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: #D4D4D8;
  margin: 0;
}
.article pre code { font-family: inherit; background: none; padding: 0; }

/* ===== Article image block ===== */
.article .image-block {
  margin: 28px 0;
}
.article .image-block img {
  width: 100%;
  border-radius: var(--radius);
}
.article .image-block figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
}

/* ===== Article tags ===== */
.article__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 40px;
  margin-bottom: 24px;
}
.article__tag {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.article__tag:hover { border-color: var(--accent-purple); color: var(--fg); }

/* ===== Article share ===== */
.article__share {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 32px;
}
.article__share button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  color: var(--muted);
  transition: border-color var(--transition), color var(--transition);
}
.article__share button:hover { border-color: var(--accent-purple); color: var(--fg); }

/* ===== CTA banner ===== */
.cta-banner {
  background: linear-gradient(135deg, rgba(168,85,247,0.1), rgba(245,158,11,0.1));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.cta-banner__text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  margin-top: 0;
  color: var(--fg);
}
.cta-banner__text p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* ===== Related cards ===== */
.section-header {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 20px;
  margin-top: 0;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}
.related-card:hover { border-color: rgba(168,85,247,0.25); transform: translateY(-2px); }
.related-card__badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-purple);
  margin-bottom: 8px;
}
.related-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--fg);
}
.related-card__desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Page responsive ===== */
@media (max-width: 768px) {
  .article { padding: 24px 16px 40px; }
}


/* ===== Auth pages (login/register) ===== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.auth-page .header,
.auth-page .footer { display: none; }
.auth-page main { width: 100%; display: flex; align-items: center; justify-content: center; }

/* ===== Auth card ===== */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  animation: auth-card-in 0.25s ease;
}
@keyframes auth-card-in {
  from { transform: translateY(12px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.auth-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--fg);
}
.auth-card__subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.auth-card__switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--muted);
}
.auth-card__switch a {
  color: var(--accent-purple);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}
.auth-card__switch a:hover { color: #C084FC; text-decoration: underline; }

/* ===== Auth error ===== */
.auth-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #EF4444;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* ===== Auth form ===== */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form__group { display: flex; flex-direction: column; gap: 6px; }
.auth-form__label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auth-form__label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}
.auth-form__forgot {
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--transition);
  background: none;
  border: none;
  font-family: var(--font);
}
.auth-form__forgot:hover { color: var(--accent-purple); }
.auth-form__hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: -4px;
}

.auth-input {
  position: relative;
}
.auth-input input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(13,13,18,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.auth-input input::placeholder { color: #555; }
.auth-input input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.1);
}
.auth-input input.input-error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.auth-input .toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: color var(--transition);
}
.auth-input .toggle-pw:hover { color: var(--fg); }
.auth-input .input-error-text {
  font-size: 0.78rem;
  color: #EF4444;
  margin-top: 4px;
  display: none;
}
.auth-input .input-error-text.visible { display: block; }

.auth-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-amber), #E07B00);
  color: #0D0D12;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 20px rgba(245,158,11,0.25);
  font-family: var(--font);
}
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 0 28px rgba(245,158,11,0.4); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-social { display: flex; flex-direction: column; gap: 10px; }
.auth-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: rgba(13,13,18,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  font-family: var(--font);
}
.auth-social__btn:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.2); }

.auth-legal {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  margin-top: 4px;
}
.auth-legal a {
  color: var(--accent-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-legal a:hover { color: #C084FC; }

/* ===== Overlay + Popup ===== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.overlay.visible { display: flex; }

.popup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 28px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: popup-in 0.25s ease;
}
@keyframes popup-in {
  from { transform: translateY(12px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  font-family: var(--font);
}
.popup__close:hover { background: rgba(255,255,255,0.06); color: var(--fg); }

.popup__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--fg);
}
.popup__subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.popup__switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--muted);
}
.popup__switch button {
  background: none;
  border: none;
  color: var(--accent-purple);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: color var(--transition);
  font-family: var(--font);
}
.popup__switch button:hover { color: #C084FC; text-decoration: underline; }

.popup-section { display: none; }
.popup-section.active { display: block; }

/* ===== Auth responsive ===== */
@media (max-width: 480px) {
  .auth-card,
  .popup { padding: 28px 20px 24px; }
}


/* ===== Header: user area ===== */
.header__right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header__bell {
  position: relative;
  background: none;
  border: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: color var(--transition);
}
.header__bell:hover { color: var(--fg); }
.header__bell .dot {
  position: absolute;
  top: -2px; right: -2px;
  width: 8px; height: 8px;
  background: var(--accent-amber);
  border-radius: 50%;
}
.header__user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--fg);
}
.header__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-amber));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  text-decoration: none;
}
.header__logout {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font);
  transition: color var(--transition), border-color var(--transition);
}
.header__logout:hover { color: #EF4444; border-color: rgba(239,68,68,0.3); }

/* ===== Dashboard layout ===== */
.dashboard {
  display: flex;
  min-height: calc(100vh - 68px);
}

/* ===== Sidebar ===== */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 68px;
  align-self: flex-start;
  height: calc(100vh - 68px);
}
.sidebar__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition), color var(--transition);
}
.sidebar__item:hover { background: rgba(255,255,255,0.04); color: var(--fg); }
.sidebar__item.active {
  background: rgba(168,85,247,0.12);
  color: var(--accent-purple);
}
.sidebar__item--logout { margin-top: auto; color: var(--muted); font-weight: 400; }
.sidebar__item--logout:hover { color: #EF4444; background: rgba(239,68,68,0.08); }

/* ===== Main content ===== */
.main {
  flex: 1;
  padding: 32px 32px 40px;
  min-width: 0;
  overflow-y: auto;
}

/* ===== Panel sections ===== */
.panel { display: none; }
.panel.active { display: block; }
.panel__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--fg);
}

/* ===== Widget card ===== */
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.widget__left { display: flex; align-items: center; gap: 16px; }
.widget__indicator {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.widget__indicator--green { background: #34D399; box-shadow: 0 0 8px rgba(52,211,153,0.5); }
.widget__indicator--amber { background: var(--accent-amber); box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.widget__indicator--gray { background: var(--muted); }
.widget__text { font-size: 0.95rem; color: var(--fg); }
.widget__text strong { font-weight: 600; }
.widget__text small { color: var(--muted); font-size: 0.85rem; display: block; margin-top: 2px; }
.widget__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Favorites grid ===== */
.fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.fav-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: border-color var(--transition);
}
.fav-card:hover { border-color: rgba(168,85,247,0.25); }
.fav-card__header { display: flex; justify-content: space-between; align-items: center; }
.fav-card__badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(168,85,247,0.15);
  color: var(--accent-purple);
}
.fav-card__heart {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #EF4444;
  cursor: pointer;
  transition: transform 0.2s;
}
.fav-card__heart:hover { transform: scale(1.2); }

/* ===== Favorites heart button (catalog) ===== */
.fav-heart {
  background: rgba(168,85,247,0.08);
  border: 1px solid rgba(168,85,247,0.25);
  color: var(--fg);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.fav-heart:hover {
  background: rgba(168,85,247,0.15);
  border-color: rgba(168,85,247,0.4);
}
.fav-heart--active {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.3);
}
.fav-heart--active:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.5);
}
.fav-heart__icon { font-size: 1rem; line-height: 1; }
.fav-heart__label { line-height: 1; }
.fav-card__title { font-size: 0.9rem; font-weight: 600; color: var(--fg); }
.fav-card__desc { font-size: 0.78rem; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fav-card__footer { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--muted); padding-top: 6px; border-top: 1px solid var(--border); }

/* ===== History table ===== */
.history-table-wrap { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.history-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.history-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: middle;
  color: var(--fg);
}
.history-table tr:hover td { background: rgba(255,255,255,0.02); }
.history-table .tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(168,85,247,0.1);
  color: var(--accent-purple);
}
.history-table .copy-again {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 4px 12px;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
  transition: border-color var(--transition), color var(--transition);
}
.history-table .copy-again:hover { border-color: var(--accent-purple); color: var(--fg); }

/* ===== Settings form ===== */
.settings-form {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.settings-form__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-form input {
  padding: 12px 16px;
  background: rgba(13,13,18,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}
.settings-form input:focus { border-color: var(--accent-purple); }
.settings-form__success {
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  color: #34D399;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.settings-form__error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #EF4444;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* ===== Profile empty state ===== */
.profile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  gap: 8px;
}
.profile-empty__icon { font-size: 3rem; opacity: 0.5; }
.profile-empty__title { font-size: 1.2rem; font-weight: 700; color: var(--fg); }
.profile-empty__text { color: var(--muted); font-size: 0.9rem; max-width: 340px; }

/* ===== Dashboard responsive ===== */
@media (max-width: 900px) {
  .sidebar { width: 60px; padding: 20px 8px; }
  .sidebar__item span:not(.icon) { display: none; }
  .sidebar__item { justify-content: center; padding: 10px; }
  .main { padding: 24px 20px; }
  .fav-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 600px) {
  .dashboard { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; gap: 0; padding: 8px 12px; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar__item { flex: 1; min-width: 60px; justify-content: center; }
  .sidebar__item--logout { margin-top: 0; }
  .widget { flex-direction: column; align-items: flex-start; }
}

/* ===== Notification dot ===== */
.header__bell .dot { display: none; }
.header__bell.has-notification .dot { display: block; }
/* ===== Search page ===== */
.search-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.search-page__header {
  margin-bottom: 2rem;
}
.search-page__title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.search-page__form {
  display: flex;
  gap: 0.5rem;
}
.search-page__input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font);
  background: var(--bg-card);
  color: var(--fg);
  outline: none;
  transition: border-color var(--transition);
}
.search-page__input:focus { border-color: var(--accent-purple); }
.search-page__input::placeholder { color: var(--muted); }
.search-page__btn {
  padding: 0.75rem 1.5rem;
  background: var(--accent-purple);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font);
  font-weight: 600;
  transition: opacity var(--transition);
}
.search-page__btn:hover { opacity: 0.9; }
.search-page__count {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.search-card {
  display: block;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color var(--transition);
}
.search-card:hover { border-color: var(--accent-purple); }
.search-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.search-card__snippet {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}
.search-card__snippet strong,
.search-card__snippet b {
  color: var(--accent-amber);
  font-weight: 600;
}
.search-page__empty {
  text-align: center;
  padding: 3rem 0;
  color: var(--muted);
}
.search-page__empty-icon { font-size: 3rem; margin-bottom: 1rem; }

/* ===== SHOWCASE GRID ===== */
.showcase__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.showcase__image-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border, #2A2A35);
}
.showcase__image-link:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 24px rgba(245,158,11,0.15);
}
.showcase__image-link img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1/1;
}
.showcase__media {
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface, #1A1A23);
  border: 1px solid var(--border, #2A2A35);
}
.showcase__media audio,
.showcase__media video {
  display: block;
  width: 100%;
}
.showcase__media audio {
  padding: 12px;
  box-sizing: border-box;
}

/* Video showcase spans 2 grid columns for larger display */
.showcase__media--video {
  grid-column: span 2;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox__content {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: default;
}
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 32px;
  color: #fff;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  transition: opacity 0.2s;
  z-index: 10000;
}
.lightbox__close:hover {
  opacity: 0.7;
}
/* ===== CARD COVER IMAGE ===== */
.card__cover .cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}
/* ===== SHOWCASE FIGURE + CAPTION ===== */
.showcase__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.showcase__caption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted, #8A8A9A);
  padding: 4px 0;
}


/* ===== HEADER SEARCH EXPAND ===== */
.header__search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.header__search-form {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, width 0.25s ease;
}
.header__search-form.active {
  opacity: 1;
  pointer-events: auto;
}
.header__search-input {
  width: 240px;
  padding: 8px 40px 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
}
.header__search-input:focus {
  border-color: var(--accent-purple);
}
.header__search-input::placeholder {
  color: var(--muted);
}
.header__search-submit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color var(--transition);
}
.header__search-submit:hover {
  color: var(--fg);
}

@media (max-width: 480px) {
  .header__search-input {
    width: 180px;
  }
}

/* ===== HAMBURGER BUTTON ===== */
.header__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 110;
  order: -1;
}
.header__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.header__hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.header__hamburger.active span:nth-child(2) {
  opacity: 0;
}
.header__hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .header__hamburger {
    display: flex;
  }
}

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===== MOBILE MENU PANEL ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 200;
  padding: 80px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: right 0.3s ease;
  overflow-y: auto;
}
.mobile-menu.active {
  right: 0;
}
.mobile-menu__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  font-family: var(--font);
}
.mobile-menu__close:hover {
  background: rgba(255,255,255,0.06);
  color: var(--fg);
}
.mobile-menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
  display: block;
}
.mobile-menu a:hover {
  color: var(--fg);
}
.mobile-menu a:last-of-type {
  border-bottom: none;
}

/* ===== CATALOG MOBILE FILTER BUTTON ===== */
.catalog__filter-btn {
  display: none;
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  text-align: center;
  transition: background var(--transition), border-color var(--transition);
}
.catalog__filter-btn:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(168,85,247,0.3);
}
@media (max-width: 1024px) {
  .catalog__filter-btn {
    display: block;
  }
}

/* ===== CATALOG MOBILE SIDEBAR ===== */
.sidebar--mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  border-right: 1px solid var(--border);
  z-index: 200;
  padding: 60px 20px 24px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.sidebar--mobile.active {
  transform: translateX(0);
}
@media (max-width: 1024px) {
  .sidebar--mobile {
    display: block;
  }
}
.sidebar--mobile::-webkit-scrollbar {
  width: 4px;
}
.sidebar--mobile::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ===== CATEGORY CARD AS LINK ===== */
a.category-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ===== CARD FOOTER LOCK (home page popular) ===== */
.card__footer--lock {
  justify-content: center;
  padding: 10px 16px 14px;
}
.card__footer--lock .prompt-card__lock {
  width: 100%;
}

/* ===== Fix article links overriding buttons ===== */
.article .btn {
  text-decoration: none;
}
.article .btn--primary {
  color: #0D0D12;
}
.article .btn--primary:hover {
  color: #0D0D12;
}
.article .btn--secondary {
  color: var(--fg);
}
.article .btn--secondary:hover {
  color: var(--fg);
}

/* ===== Pricing period ===== */
.pricing-card__period {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: -16px;
  margin-bottom: 8px;
}

/* ===== Prompts Feed Plugin ===== */

/* --- Feed pages --- */
.feeds-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.feeds-page__title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}
.feeds-page__subtitle {
    color: var(--muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.feeds-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.feed-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.feed-card__info {
    flex: 1;
    min-width: 200px;
}
.feed-card__name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.feed-card__meta {
    font-size: 0.8rem;
    color: var(--muted);
}
.feed-card__url {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
}
.feed-card__actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.feed-card__btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
}
.feed-card__btn--edit {
    background: var(--card-border);
    color: var(--fg);
    border: none;
}
.feed-card__btn--delete {
    background: transparent;
    color: #FF6B6B;
    border: 1px solid #3A1A1A;
}
.feeds-empty {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: var(--muted);
}
.feeds-empty__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}
.feeds-empty__title {
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 0.25rem;
}
.feeds-create {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}
.feeds-create__input {
    padding: 0.5rem 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: var(--fg);
    font-size: 0.9rem;
    width: 200px;
}
.feeds-create__btn {
    padding: 0.5rem 1rem;
    background: var(--accent-purple);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}
.feeds-create__btn:hover {
    opacity: 0.9;
}
.feeds-limit {
    color: var(--muted);
    font-size: 0.85rem;
}
.feeds-help {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    font-size: 0.8rem;
    color: var(--muted);
}
.feeds-help ol {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.feeds-error {
    color: #FF6B6B;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    display: none;
}

/* --- Feed edit --- */
.feed-edit {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.feed-edit__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.feed-edit__back {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
}
.feed-edit__title {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}
.feed-edit__url {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    min-width: 280px;
}
.feed-edit__section-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.feed-edit__count {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.85rem;
}
.feed-prompt-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.feed-prompt-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.feed-prompt-item__main {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    flex: 1;
}
.feed-prompt-item__emoji {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.feed-prompt-item__name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.feed-prompt-item__cat {
    font-size: 0.75rem;
    color: var(--muted);
}
.feed-prompt-item__remove {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid #3A1A1A;
    color: #FF6B6B;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    cursor: pointer;
}
.feed-prompt-item__remove:hover {
    background: #3A1A1A;
}
.catalog-add-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 500px;
    overflow-y: auto;
}
.catalog-add-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    gap: 0.5rem;
    transition: background 0.15s;
}
.catalog-add-item:hover {
    background: var(--card-bg);
}
.catalog-add-item__name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.catalog-add-item__cat {
    font-size: 0.7rem;
    color: var(--muted);
}
.catalog-add-item__btn {
    flex-shrink: 0;
    background: var(--card-border);
    color: var(--fg);
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    cursor: pointer;
}
.catalog-add-item__btn:hover {
    background: var(--accent-purple);
    color: #fff;
}

/* --- Catalog card button (injected by JS) --- */
.pf-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}
.card:hover .pf-btn,
.card-link:hover .pf-btn {
    opacity: 1;
}
.pf-btn:hover {
    background: var(--card-border);
    color: var(--fg);
}

/* --- Feed modal (injected by JS) --- */
.pf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pf-modal {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 280px;
    max-width: 360px;
    color: var(--fg);
}
.pf-modal__title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.pf-modal__list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    max-height: 250px;
    overflow-y: auto;
}
.pf-modal__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}
.pf-modal__item:hover {
    background: var(--card-border);
}
.pf-modal__item-count {
    color: var(--muted);
    font-size: 0.75rem;
}
.pf-modal__empty {
    color: var(--muted);
    padding: 0.5rem;
}
.pf-modal__link {
    color: var(--accent-purple);
}
.pf-modal__close {
    display: block;
    width: 100%;
    padding: 0.4rem;
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* --- Toast (injected by JS) --- */
.pf-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    color: var(--fg);
    font-size: 0.85rem;
    z-index: 1001;
    animation: pf-fadein .2s;
}
.pf-toast--error {
    color: #FF6B6B;
    border-color: #3A1A1A;
}
@keyframes pf-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Profile sidebar item --- */
.sidebar__item--feeds .icon {
    font-size: 1.1rem;
}


/* Override: pf-btn in card footer (not absolute) */
.card__footer .pf-btn {
    position: static;
    opacity: 1;
    width: auto;
    height: auto;
    padding: 2px 6px;
    font-size: 0.85rem;
    margin-left: auto;
    background: transparent;
}
.card__footer .pf-btn:hover {
    background: var(--card-border);
}


/* pf-btn on single catalog page — inline, not absolute */
.prompt-meta__stats .pf-btn {
    position: static;
    opacity: 1;
    display: inline-flex;
    margin-left: 12px;
    vertical-align: middle;
}

/* ===== Prompts Feed Plugin — styles (v2) ===== */

/* --- "Add to JSON" link on single page --- */
.pf-add-link {
    color: var(--accent-purple);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    margin-left: 12px;
    vertical-align: middle;
}
.pf-add-link:hover {
    text-decoration: underline;
    color: #C084FC;
}

/* --- Feed list inside auth-style popup --- */
.pf-modal__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    max-height: 240px;
    overflow-y: auto;
}
.pf-modal__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--fg);
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.pf-modal__item:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border);
}
.pf-modal__item-count {
    color: var(--muted);
    font-size: 0.8rem;
}
.pf-modal__empty {
    color: var(--muted);
    padding: 12px 0;
    font-size: 0.9rem;
    text-align: center;
}
.pf-modal__link {
    color: var(--accent-purple);
    text-decoration: none;
}
.pf-modal__link:hover {
    text-decoration: underline;
}

/* --- Toast --- */
.pf-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 0.9rem;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: pf-fadein 0.2s;
}
.pf-toast--error {
    color: #FF6B6B;
    border-color: rgba(255,107,107,0.3);
}
@keyframes pf-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Feed page inputs — match auth-input style --- */
.feeds-create__input {
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 0.95rem;
    font-family: var(--font);
    width: 240px;
    transition: border-color 0.2s;
    outline: none;
}
.feeds-create__input:focus {
    border-color: var(--accent-purple);
}
.feeds-create__input::placeholder {
    color: #555;
}

/* URL input on feed edit page */
.feed-card__url {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    font-size: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    outline: none;
}

/* --- Feed pages layout --- */
.feeds-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.feeds-page__title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--fg);
}
.feeds-page__subtitle {
    color: var(--muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.feeds-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.feed-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.feed-card__info {
    flex: 1;
    min-width: 200px;
}
.feed-card__name {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--fg);
}
.feed-card__meta {
    font-size: 0.8rem;
    color: var(--muted);
}
.feed-card__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.feed-card__btn {
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s, color 0.15s;
}
.feed-card__btn--edit {
    background: var(--border);
    color: var(--fg);
    border: none;
}
.feed-card__btn--edit:hover {
    background: rgba(255,255,255,0.15);
}
.feed-card__btn--delete {
    background: transparent;
    color: #FF6B6B;
    border: 1px solid rgba(255,107,107,0.3);
}
.feed-card__btn--delete:hover {
    background: rgba(255,107,107,0.1);
}

.feeds-empty {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--muted);
}
.feeds-empty__icon {
    font-size: 2rem;
    margin-bottom: 12px;
}
.feeds-empty__title {
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 4px;
}

.feeds-create {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.feeds-create__btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--accent-amber, #F59E0B), #E07B00);
    color: #0D0D12;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font);
    transition: transform 0.15s, box-shadow 0.15s;
}
.feeds-create__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 28px rgba(245,158,11,0.4);
}
.feeds-limit {
    color: var(--muted);
    font-size: 0.85rem;
}
.feeds-help {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}
.feeds-help ol {
    padding-left: 1.25rem;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.feeds-error {
    color: #FF6B6B;
    margin-top: 8px;
    font-size: 0.85rem;
    display: none;
}

/* --- Feed edit page --- */
.feed-edit {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.feed-edit__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.feed-edit__back {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
}
.feed-edit__back:hover {
    color: var(--fg);
}
.feed-edit__title {
    font-size: 1.5rem;
    margin-top: 4px;
    color: var(--fg);
}
.feed-edit__url {
    padding: 10px 14px;
    font-size: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    min-width: 300px;
    outline: none;
}
.feed-edit__section-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--fg);
}
.feed-edit__count {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.85rem;
}
.feed-prompt-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 2rem;
}
.feed-prompt-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.feed-prompt-item__main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.feed-prompt-item__emoji {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.feed-prompt-item__name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--fg);
}
.feed-prompt-item__cat {
    font-size: 0.75rem;
    color: var(--muted);
}
.feed-prompt-item__remove {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid rgba(255,107,107,0.3);
    color: #FF6B6B;
    border-radius: var(--radius);
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s;
}
.feed-prompt-item__remove:hover {
    background: rgba(255,107,107,0.1);
}

/* --- Sidebar feeds icon --- */
.sidebar__item--feeds .icon {
    font-size: 1.1rem;
}
