/* ════════════════════════════════════════
   PAGES.CSS — Crystal AI Systems
   Page-specific styles: hero, products, blog, contact, admin, profile, developer, feed components
════════════════════════════════════════ */

/* ── HERO ── */
.hero {
  min-height: calc(100vh - 102px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.12) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 0.8; }
  50%       { transform: translate(-50%,-50%) scale(1.1); opacity: 1; }
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ap);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 1.8rem;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--purple);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}
.hero-title .line1 {
  display: block;
  background: linear-gradient(135deg, #fff 30%, var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title .line2 {
  display: block;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  color: var(--t2);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 2.2rem;
}
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-btn-main {
  background: linear-gradient(135deg, var(--violet), var(--blue));
  border: none; color: #fff;
  padding: 0.85rem 2.2rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s;
  box-shadow: 0 4px 20px rgba(124,58,237,.3);
}
.hero-btn-main:hover { opacity: 0.88; transform: translateY(-2px); }
.hero-btn-sec {
  background: transparent;
  border: 1px solid var(--b2);
  color: var(--blue);
  padding: 0.85rem 2.2rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s;
}
.hero-btn-sec:hover { background: var(--ab); }
.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-lbl { font-size: 0.72rem; color: var(--t3); letter-spacing: 2px; text-transform: uppercase; margin-top: 3px; }

/* ── CATEGORY CARDS ── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1rem; }
.cat-card {
  background: var(--bg3); border: 1px solid var(--b1); border-radius: var(--radius-lg);
  padding: 1.4rem 1rem; text-align: center; cursor: pointer; transition: 0.25s; overflow: hidden; position: relative;
}
.cat-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, var(--ab), var(--ap)); opacity: 0; transition: 0.25s; }
.cat-card:hover { border-color: var(--b2); transform: translateY(-4px); }
.cat-card:hover::before { opacity: 1; }
.cat-icon { font-size: 2rem; margin-bottom: 0.6rem; display: block; position: relative; }
.cat-name { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.5px; color: var(--t2); position: relative; transition: 0.2s; }
.cat-card:hover .cat-name { color: var(--blue); }
.cat-count { font-family: var(--font-mono); font-size: 0.68rem; color: var(--t3); margin-top: 3px; position: relative; }

/* ── PRODUCT GRID ── */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

/* ── PRODUCT CARDS (updated) ── */
.prod-card { background: var(--bg2); border: 1px solid var(--b1); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: 0.22s; display: flex; flex-direction: column; }
.prod-card:hover { border-color: var(--b2); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,212,255,.08); }
.prod-media { position: relative; background: linear-gradient(135deg,var(--bg3),var(--bg4)); padding: 2rem; display: flex; align-items: center; justify-content: center; min-height: 130px; }
.prod-emoji { font-size: 3rem; }
.prod-badge { position: absolute; top: 0.75rem; left: 0.75rem; background: linear-gradient(135deg,var(--violet),var(--blue)); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; letter-spacing: 0.5px; }
.wish-btn { position: absolute; top: 0.75rem; right: 0.75rem; background: rgba(0,0,0,.4); border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; transition: 0.15s; }
.wish-btn:hover { background: rgba(0,0,0,.6); transform: scale(1.1); }
.prod-body { padding: 1.1rem 1.25rem; display: flex; flex-direction: column; flex: 1; gap: 0.35rem; }
.prod-cat { font-size: 0.68rem; color: var(--blue); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.prod-name { font-family: var(--font-head); font-size: 0.95rem; font-weight: 700; line-height: 1.3; }
.prod-desc { font-size: 0.78rem; color: var(--t2); line-height: 1.5; flex: 1; }
.prod-rating { display: flex; align-items: center; gap: 5px; margin-top: 0.25rem; }
.stars { color: var(--gold); font-size: 0.75rem; }
.rating-num { font-size: 0.8rem; font-weight: 700; }
.review-count { font-size: 0.72rem; color: var(--t3); }
.prod-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--b1); }
.prod-price { font-size: 0.75rem; color: var(--t2); }
.prod-buy-btn { background: linear-gradient(135deg,var(--violet),var(--blue)); color: #fff; border: none; border-radius: 7px; padding: 0.4rem 0.85rem; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: 0.15s; font-family: var(--font-body); }
.prod-buy-btn:hover { opacity: 0.88; transform: scale(1.03); }

/* ── PRODUCT COVER IMAGE ── */
.prod-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; border-radius: 0; }

/* ── PRODUCT MODAL ── */
.prod-modal { padding: 2rem; max-width: 680px; }
.prod-modal-top { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.prod-modal-emoji { font-size: 4rem; background: var(--bg3); border-radius: var(--radius); padding: 1.25rem 1.75rem; flex-shrink: 0; }
.prod-modal-info { flex: 1; min-width: 200px; }
.prod-modal-feats { background: var(--bg3); border: 1px solid var(--b1); border-radius: 10px; padding: 1.25rem; }
.feats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1rem; }
.feat-item { font-size: 0.8rem; color: var(--t2); display: flex; gap: 6px; align-items: flex-start; }

/* ── 3D PRODUCT TABS ── */
.prod-tabs-wrap {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  background: var(--bg2);
  border: 1px solid var(--b1);
  border-radius: 14px;
}
.prod-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--t2);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  letter-spacing: 0.2px;
}
.prod-tab:hover {
  background: var(--bg3);
  color: var(--t1);
  border-color: var(--b1);
}
.prod-tab .tab-icon { font-size: 1rem; }
.prod-tab .tab-count {
  background: var(--bg4);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--t3);
  border: 1px solid var(--b1);
  transition: 0.2s;
}
/* ACTIVE STATE — 3D Elevated look */
.prod-tab.active-tab {
  background: linear-gradient(135deg, #7c3aed, #00d4ff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3), 0 2px 6px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}
.prod-tab.active-tab .tab-count {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.prod-tab.active-tab .tab-label { color: #fff; }

/* ── TAG PILLS ── */
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 20px;
  border: 1px solid var(--b1);
  background: var(--bg3);
  color: var(--t3);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: var(--font-body);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.tag-pill:hover {
  border-color: var(--b2);
  color: var(--blue);
  background: var(--ab);
}
.tag-pill.active-tag {
  background: linear-gradient(135deg, var(--violet), var(--blue));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0,212,255,0.25);
}
.tag-pill.tag-more {
  border-style: dashed;
  color: var(--t3);
}
.tag-pill.tag-more:hover { color: var(--blue); border-color: var(--b2); border-style: solid; }

/* ── BLOG CARDS ── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 1.25rem; }
.blog-card { background: var(--bg2); border: 1px solid var(--b1); border-radius: var(--radius); padding: 1.5rem; cursor: pointer; transition: 0.2s; }
.blog-card:hover { border-color: var(--b2); transform: translateY(-2px); }
.blog-emoji { font-size: 2.2rem; margin-bottom: 0.75rem; }
.blog-tag { display: inline-block; padding: 2px 10px; border-radius: 20px; background: var(--ap); border: 1px solid var(--b3); font-size: 0.7rem; font-weight: 700; color: var(--purple); margin-bottom: 0.65rem; letter-spacing: 0.3px; }
.blog-title { font-family: var(--font-head); font-size: 0.95rem; font-weight: 700; line-height: 1.4; margin-bottom: 0.5rem; }
.blog-meta { font-size: 0.72rem; color: var(--t3); margin-bottom: 0.65rem; }
.blog-excerpt { font-size: 0.8rem; color: var(--t2); line-height: 1.6; margin-bottom: 0.85rem; }
.blog-read-more { font-size: 0.78rem; color: var(--blue); font-weight: 600; }

/* ── TESTIMONIALS ── */
.test-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px,1fr)); gap: 1.25rem; }
.test-card {
  background: var(--bg3); border: 1px solid var(--b1);
  border-radius: var(--radius-lg); padding: 1.5rem;
  transition: 0.25s; position: relative;
}
.test-card:hover { border-color: var(--b2); transform: translateY(-4px); }
.test-card::before { content: '\275D'; font-size: 2.5rem; color: var(--purple); opacity: .2; position: absolute; top: .8rem; right: 1.2rem; font-family: serif; }
.test-text { font-size: 0.88rem; color: var(--t2); line-height: 1.7; margin-bottom: 1.1rem; }
.test-auth { display: flex; align-items: center; gap: 10px; }
.test-av { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: #fff; flex-shrink: 0; }
.test-name { font-size: 0.85rem; font-weight: 700; }
.test-role { font-size: 0.72rem; color: var(--t3); }

/* ── HOW IT WORKS ── */
.how-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.how-card { background: var(--bg2); border: 1px solid var(--b1); border-radius: var(--radius); padding: 1.75rem 1.5rem; text-align: center; position: relative; overflow: hidden; transition: 0.2s; }
.how-card:hover { border-color: var(--b2); transform: translateY(-2px); }
.how-num { position: absolute; top: 1rem; right: 1.1rem; font-family: var(--font-head); font-size: 2.5rem; font-weight: 800; color: rgba(0,212,255,.07); }
.how-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.how-title { font-family: var(--font-head); font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; }
.how-desc { font-size: 0.8rem; color: var(--t2); line-height: 1.6; }

/* ── FOOTER ── */
.site-footer { background: var(--bg0); border-top: 1px solid var(--b1); padding: 3.5rem 2rem 2rem; }
.footer-inner { max-width: 1180px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-logo { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.75rem; }
.footer-desc { font-size: 0.82rem; color: var(--t3); line-height: 1.7; max-width: 260px; margin-bottom: 1rem; }
.footer-socials { display: flex; gap: 0.6rem; }
.social-link { width: 36px; height: 36px; background: var(--bg3); border: 1px solid var(--b1); border-radius: 8px; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 0.9rem; transition: 0.2s; cursor: pointer; }
.social-link:hover { border-color: var(--b2); background: var(--ab); }
.footer-col-title { font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--t1); margin-bottom: 1rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.82rem; color: var(--t3); cursor: pointer; transition: 0.15s; text-decoration: none; }
.footer-links a:hover { color: var(--blue); }
.footer-bar { display: flex; align-items: center; justify-content: space-between; padding-top: 1.5rem; border-top: 1px solid var(--b1); gap: 1rem; flex-wrap: wrap; }

/* ── CONTACT CARDS ── */
.contact-card {
  background: var(--bg2);
  border: 1px solid var(--b1);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  height: 100%;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact-card-blue { border-color: rgba(0,136,204,.25); }
.contact-card-blue:hover { border-color: var(--blue); box-shadow: 0 8px 30px rgba(0,212,255,.15); }
.contact-card-purple { border-color: rgba(139,92,246,.25); }
.contact-card-purple:hover { border-color: var(--purple); box-shadow: 0 8px 30px rgba(139,92,246,.15); }
.contact-card-violet { border-color: rgba(124,58,237,.25); }
.contact-card-violet:hover { border-color: var(--violet); box-shadow: 0 8px 30px rgba(124,58,237,.15); }

/* ── DEVELOPER PAGE ── */
.dev-hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.dev-hero-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 20px;
  background: var(--ap);
  border: 1px solid var(--b3);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}
.dev-hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}
.dev-hero-sub {
  font-size: 1rem;
  color: var(--t2);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── PROFILE TABS ── */
.profile-tab { background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--t3); font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; padding: 0.6rem 1.2rem; cursor: pointer; transition: 0.15s; }
.profile-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.profile-tab:hover { color: var(--t1); }

/* ── SELL FORM GRID / CONTACT GRID ── */
.sell-form-grid { grid-template-columns: 1fr 1fr; }
.contact-grid { grid-template-columns: 1fr 1fr; }

/* ── ADMIN LAYOUT ──
   Grid + sticky sidebar defined in components.css (240px 1fr).
   Here we only add per-element styles that components.css doesn't cover. */
.admin-brand { padding: 1.25rem 1.25rem 0.75rem; border-bottom: 1px solid var(--b1); }
/* nav is the 1fr row in the sidebar grid — min-height:0 allows it to shrink/scroll */
.admin-nav { padding: 0.75rem 0; overflow-y: auto; overflow-x: hidden; min-height: 0; }
.admin-nav ul { list-style: none; }
.admin-nav li a { display: block; padding: 0.65rem 1.25rem; font-size: 0.83rem; color: var(--t3); cursor: pointer; transition: 0.15s; border-left: 3px solid transparent; }
.admin-nav li a:hover { color: var(--t1); background: var(--bg2); }
.admin-nav li a.active { color: var(--blue); background: var(--ab); border-left-color: var(--blue); font-weight: 600; }
/* back-to-site button wrapper — auto row, always pinned at bottom */
.admin-back-btn { padding: 1rem; border-top: 1px solid var(--b1); }
.admin-main { padding: 1.75rem; min-width: 0; overflow: hidden; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-pg-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; margin-bottom: 1.25rem; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 1rem; }
.admin-stat-card { background: var(--bg2); border: 1px solid var(--b1); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.admin-card { background: var(--bg2); border: 1px solid var(--b1); border-radius: var(--radius); padding: 1.25rem; }
.admin-card-title { font-family: var(--font-head); font-size: 0.85rem; font-weight: 700; margin-bottom: 1rem; }
.admin-row { display: flex; align-items: center; gap: 0.85rem; padding: 0.9rem 1rem; background: var(--bg2); border: 1px solid var(--b1); border-radius: 10px; margin-bottom: 0.6rem; }
.admin-act-btn { background: var(--bg3); border: 1px solid var(--b1); border-radius: 7px; padding: 4px 9px; cursor: pointer; font-size: 0.85rem; transition: 0.15s; color: var(--t2); }
.admin-act-btn:hover { border-color: var(--b2); color: var(--blue); }
.admin-act-btn.danger:hover { border-color: rgba(239,68,68,.4); color: #f87171; }
.admin-2col { grid-template-columns: 1fr 1fr; }

/* ── ACTIVE NAV LINK ── */
.active-nav { color: var(--blue) !important; }

/* ── FILTER BTN ── */
.active-filter { background: linear-gradient(135deg,var(--violet),var(--blue)) !important; color: #fff !important; border-color: transparent !important; }

/* ── EMAIL DOMAIN PICKER (register form) ── */
.email-split-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--b1);
  border-radius: 9px;
  background: var(--bg2);
  overflow: visible;
  position: relative;
}
.email-user-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.65rem 0.75rem;
  color: var(--t1);
  font-family: var(--font-body);
  font-size: 0.9rem;
  min-width: 0;
}
.email-at {
  color: var(--t3);
  font-size: 0.9rem;
  padding: 0 4px;
  flex-shrink: 0;
}
.email-domain-picker {
  position: relative;
  flex-shrink: 0;
}
.email-domain-selected {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
  user-select: none;
  border-left: 1px solid var(--b1);
  transition: background 0.15s;
}
.email-domain-selected:hover { background: var(--bg3); }
.email-domain-arrow { font-size: 0.7rem; }
.email-domain-drop {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg2);
  border: 1.5px solid var(--b2);
  border-radius: 10px;
  z-index: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  scrollbar-width: thin;
  scrollbar-color: var(--b2) transparent;
}
.email-domain-drop::-webkit-scrollbar { width: 4px; }
.email-domain-drop::-webkit-scrollbar-track { background: transparent; }
.email-domain-drop::-webkit-scrollbar-thumb { background: var(--b2); border-radius: 4px; }
.email-domain-drop.open { display: block; }
.email-domain-opt {
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--t1);
  transition: background 0.12s;
}
.email-domain-opt:hover { background: var(--ab); color: var(--blue); }

/* ── Password strength bar ── */
.pass-strength-bar {
  height: 4px;
  background: var(--bg3);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

/* ── PAGE VISIBILITY TOGGLE SWITCH (Admin) ── */
.pg-toggle { position: relative; display: inline-flex; cursor: pointer; }
.pg-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.pg-toggle-track {
  width: 44px; height: 24px;
  background: rgba(239,68,68,.35); border-radius: 12px;
  border: 1px solid rgba(239,68,68,.4);
  transition: background 0.25s, border-color 0.25s;
  position: relative;
}
.pg-toggle input:checked ~ .pg-toggle-track {
  background: rgba(0,212,255,.2);
  border-color: var(--blue);
}
.pg-toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #ef4444; transition: transform 0.25s, background 0.25s;
}
.pg-toggle input:checked ~ .pg-toggle-track .pg-toggle-thumb {
  transform: translateX(20px);
  background: var(--blue);
}

/* ── CUSTOM TAB CONTENT ── */
.custom-tab-content {
  background: var(--bg1);
  border: 1px solid var(--b1);
  border-radius: var(--radius);
  padding: 1.5rem;
  min-height: 200px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Channel items in community sidebar */
.channel-item {
  display: flex; align-items: center; gap: 8px;
  padding: 0.6rem 1.1rem;
  font-size: 0.84rem; color: var(--t2);
  cursor: pointer; transition: 0.2s;
  border-bottom: 1px solid var(--b1);
}
.channel-item:last-child { border-bottom: none; }
.channel-item:hover { color: var(--blue); background: var(--ab); }
.channel-icon { font-size: 1rem; width: 22px; text-align: center; }
.channel-name { flex: 1; }
.channel-lock { font-size: 0.7rem; opacity: 0.7; }

/* ── REPLY INDICATOR (community feed) ── */
.reply-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  background: var(--ab);
  border-left: 3px solid var(--blue);
  border-radius: 0 6px 6px 0;
  font-size: 0.78rem;
  color: var(--blue);
  font-weight: 600;
}
.comment-reply-quote {
  background: var(--bg3);
  border-left: 3px solid var(--blue);
  border-radius: 0 5px 5px 0;
  padding: 4px 8px;
  font-size: 0.75rem;
  color: var(--t3);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── DISCORD-STYLE REPLY QUOTE IN COMMENTS ── */
.discord-quote {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: var(--bg4);
  border-radius: 8px;
  border: 1px solid var(--b1);
}
.discord-quote-bar {
  width: 3px;
  min-height: 100%;
  border-radius: 3px;
  background: var(--blue);
  flex-shrink: 0;
}

/* ── UNSEEN POSTS (Discord-style new post glow) ── */
.post-card.post-unseen {
  border-left: 3px solid var(--blue);
  box-shadow: -2px 0 16px rgba(0, 212, 255, 0.15), var(--shadow);
  animation: unseenPulse 2s ease-in-out;
}
@keyframes unseenPulse {
  0%   { box-shadow: -2px 0 24px rgba(0,212,255,0.35), var(--shadow); }
  100% { box-shadow: -2px 0 16px rgba(0,212,255,0.15), var(--shadow); }
}

/* Quick reply panel slide-up animation */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Facebook-style post dropdown menu ── */
.post-dropdown { animation: fadeIn 0.12s ease; }
.post-dd-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 0.65rem 1rem; background: transparent; border: none;
  color: var(--t1); font-size: 0.87rem; font-weight: 500; cursor: pointer;
  text-align: left; transition: background 0.1s;
}
.post-dd-item:hover { background: var(--bg2); }
.post-dd-item.post-dd-danger { color: #f87171; }
.post-dd-item.post-dd-danger:hover { background: rgba(239,68,68,.08); }
.post-dd-sep { height: 1px; background: var(--b1); margin: 0; }

/* Share inline popover item */
.share-pop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.6rem 1rem; font-size: 0.88rem; font-weight: 600;
  text-decoration: none; transition: background 0.12s; cursor: pointer;
  color: var(--t1);
}
.share-pop-item:hover { background: var(--bg2); }
.share-pop-item span { flex: 1; }

/* Share social buttons */
.share-btn-social {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid; border-radius: 9px; padding: 0.65rem 0.5rem;
  font-size: 0.82rem; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: 0.15s;
}
.share-btn-social:hover { filter: brightness(1.2); transform: translateY(-1px); }

/* ── COMMENT EMOJI BUTTON + PICKER ── */
.comment-emoji-btn {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.1rem;
  color: var(--t3); padding: 0; z-index: 1; line-height: 1;
}
.comment-emoji-btn:hover { color: var(--t1); }
.comment-input { padding-left: 32px !important; }

.comment-emoji-picker {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 800;
  background: var(--bg3);
  border: 1px solid var(--b1);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-width: 240px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.4);
  animation: fadeIn 0.1s ease;
}
.comment-emoji-picker button {
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  border-radius: 6px;
  padding: 3px 5px;
  transition: background 0.1s;
  line-height: 1;
}
.comment-emoji-picker button:hover { background: var(--b1); }

/* ── USER BADGE PILL (feed/profile) ── */
.user-badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ── ADMIN POST BADGE ── */
.admin-post-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  color: #fff;
  letter-spacing: 0.3px;
}
