/* ===== Explore Page — Unified People & Groups ===== */

/* ---- Hero Header ---- */
.exp-hero {
  background: linear-gradient(175deg, #080618 0%, #0d0b2b 60%, #100e24 100%);
  padding: 56px 0 0;
  position: relative; overflow: hidden;
  text-align: center;
}
.exp-hero-orb { display: none; }
.exp-hero .container { position: relative; z-index: 1; }

.exp-hero-title {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; letter-spacing: -1.2px;
  margin-bottom: 12px;
}
.exp-hero-title span {
  background: linear-gradient(135deg, #C4AAFF 0%, #9B6FFF 50%, #FF8060 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 16px rgba(155,111,255,0.3));
}
.exp-hero-sub {
  color: rgba(210,208,255,0.65); font-size: 1rem; margin-bottom: 32px;
}

/* ---- Search Bar ---- */
.exp-search-wrap { max-width: 560px; margin: 0 auto 32px; }
.exp-search-bar {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 50px; padding: 14px 22px;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.exp-search-bar:focus-within {
  border-color: rgba(155,111,255,0.7);
  box-shadow: 0 0 0 4px rgba(155,111,255,0.14);
}
.exp-search-icon { color: rgba(255,255,255,0.4); flex-shrink: 0; }
.exp-search-input {
  flex: 1; background: none; border: none; outline: none;
  color: #fff; font-size: 0.95rem; font-family: var(--font-body);
}
.exp-search-input::placeholder { color: rgba(255,255,255,0.35); }
.exp-search-clear {
  background: none; border: none; color: rgba(255,255,255,0.4);
  cursor: pointer; font-size: 1rem; padding: 2px 6px;
  transition: color 0.2s;
}
.exp-search-clear:hover { color: #fff; }

/* ---- Tab Switcher ---- */
.exp-tab-switcher {
  display: inline-flex; gap: 0; justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 0;
  margin-top: 12px;
}
.exp-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 14px 28px; border-radius: 0;
  font-size: 0.9rem; font-weight: 600;
  color: rgba(200,198,255,0.48);
  background: none; border: none; cursor: pointer;
  position: relative; transition: color 0.2s;
}
.exp-tab::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--purple), #FF8060);
  transform: scaleX(0); transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
}
.exp-tab:hover { color: rgba(240,239,255,0.85); }
.exp-tab.active {
  color: #fff; font-weight: 700;
  background: none; box-shadow: none;
}
.exp-tab.active::after { transform: scaleX(1); }
.exp-tab-icon { font-size: 0.75rem; }

/* ---- Controls Row ---- */
.exp-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; margin-top: 8px;
}
.exp-filter-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 30px;
  font-size: 0.84rem; font-weight: 600;
  background: rgba(255,255,255,0.05); color: rgba(200,198,255,0.8);
  border: 1.5px solid rgba(155,111,255,0.2);
  cursor: pointer; transition: all var(--transition);
}
.exp-filter-toggle:hover { border-color: rgba(155,111,255,0.5); color: #C4AAFF; background: rgba(155,111,255,0.08); }
.exp-filter-count {
  background: var(--coral); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.exp-results-label { font-size: 0.84rem; color: var(--text-muted); }
.exp-results-label strong { color: var(--text); }

/* ---- Filter Panel ---- */
.exp-filter-panel {
  background: rgba(19,17,42,0.9); backdrop-filter: blur(14px);
  border: 1px solid rgba(155,111,255,0.12);
  border-radius: var(--radius); padding: 0 28px;
  margin-bottom: 28px;
  max-height: 0; overflow: hidden;
  transition: max-height 0.45s ease, padding 0.3s, opacity 0.3s;
  opacity: 0;
}
.exp-filter-panel.open {
  max-height: 700px; opacity: 1;
  padding: 24px 28px;
}
.fp-group { margin-bottom: 20px; }
.fp-label {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-muted); margin-bottom: 10px;
}
.fp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fp-actions { display: flex; gap: 10px; padding-top: 4px; }

/* ---- Section Headers ---- */
.exp-section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.exp-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1rem; font-weight: 700; color: var(--text);
  font-family: var(--font-body);
}
.exp-section-title svg { color: var(--purple); }
.exp-see-all {
  font-size: 0.82rem; font-weight: 600; color: var(--purple);
  background: none; border: none; cursor: pointer;
  transition: opacity 0.2s; text-decoration: none;
}
.exp-see-all:hover { opacity: 0.7; }

/* ---- People Grid ---- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 16px;
}

/* ---- Groups Grid ---- */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---- Group Card ---- */
.exp-group-card {
  text-decoration: none; color: inherit;
  border-radius: 20px; overflow: hidden;
  transition: all var(--transition);
  position: relative;
  background: rgba(19,17,42,0.88);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(155,111,255,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.exp-group-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 56px rgba(0,0,0,0.5), 0 0 0 1px rgba(155,111,255,0.2);
  border-color: rgba(155,111,255,0.25);
}
.egc-cover {
  height: 130px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: relative; overflow: hidden;
}
.egc-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.04) 100%);
}
.egc-emoji {
  font-size: 3.2rem; position: relative; z-index: 1;
  transition: transform var(--transition);
}
.exp-group-card:hover .egc-emoji { transform: scale(1.15) rotate(-5deg); }
.egc-freq {
  font-size: 0.68rem; font-weight: 700;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(8px);
  color: rgba(200,198,255,0.7); padding: 4px 12px; border-radius: 20px;
  position: relative; z-index: 1;
  border: 1px solid rgba(255,255,255,0.12);
}
.egc-body { padding: 20px 22px 22px; }
.egc-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.egc-count { font-size: 0.76rem; color: var(--text-muted); font-weight: 500; }
.egc-body h3 { font-size: 1rem; margin-bottom: 8px; color: #F0EFFF; }
.egc-body p { font-size: 0.84rem; line-height: 1.6; margin-bottom: 16px; color: rgba(200,198,255,0.6); }
.egc-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.76rem; color: rgba(200,198,255,0.5);
  border-top: 1px solid rgba(155,111,255,0.1); padding-top: 12px;
}
.egc-arrow {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.8rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.exp-group-card:hover .egc-arrow { transform: translateX(3px); box-shadow: 0 4px 12px rgba(122,90,248,0.4); }

/* ---- Tab Content ---- */
.exp-tab-content { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Empty State ---- */
.exp-empty {
  text-align: center; padding: 56px 24px;
  background: rgba(19,17,42,0.75); border-radius: 20px;
  border: 1px dashed rgba(155,111,255,0.2);
  grid-column: 1 / -1;
}
.exp-empty-icon { font-size: 2.8rem; margin-bottom: 14px; }
.exp-empty h3 { font-family: var(--font-body); font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }
.exp-empty p { font-size: 0.88rem; margin-bottom: 20px; }

/* ---- Profile Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(13,11,43,0.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.exp-profile-modal {
  background: rgba(13,11,35,0.97);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(155,111,255,0.18);
  border-radius: 24px;
  width: min(520px, 94vw); max-height: 90vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: modalSlideUp 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalSlideUp {
  from { transform: translateY(40px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.06); border: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
  color: rgba(200,198,255,0.6); transition: all var(--transition); z-index: 1;
  backdrop-filter: blur(4px);
}
.modal-close:hover { background: rgba(155,111,255,0.2); color: #fff; }
.epm-photo {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, rgba(19,17,42,1), rgba(30,24,60,1));
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  border-radius: 24px 24px 0 0;
}
.epm-content { padding: 24px 28px 28px; }
.epm-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.epm-name { font-size: 1.3rem; font-weight: 800; color: #F0EFFF; }
.epm-meta { font-size: 0.82rem; color: rgba(200,198,255,0.55); margin-top: 4px; }
.epm-verified {
  background: rgba(155,111,255,0.15); color: #C4AAFF;
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid rgba(155,111,255,0.25);
}
.epm-bio {
  font-size: 0.9rem; color: rgba(200,198,255,0.65); line-height: 1.7;
  border-left: 3px solid rgba(155,111,255,0.45); padding-left: 14px;
  margin-bottom: 20px;
}
.epm-interests { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.epm-interest {
  font-size: 0.78rem; font-weight: 600; padding: 5px 12px; border-radius: 20px;
  background: rgba(122,90,248,0.12); color: #C4AAFF;
  border: 1px solid rgba(122,90,248,0.25);
}
.epm-actions { display: flex; gap: 10px; }
.epm-actions .btn { flex: 1; }

/* ---- Mobile Bottom Nav ---- */
.mobile-bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  background: rgba(8,6,24,0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(155,111,255,0.12);
  padding: 8px 0 env(safe-area-inset-bottom);
  justify-content: space-around;
}
.mbn-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted); font-size: 0.68rem; font-weight: 600;
  padding: 6px 0; transition: color var(--transition);
  text-decoration: none;
}
.mbn-tab.active { color: var(--purple); }
.mbn-tab span { font-size: 0.65rem; }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .people-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 900px) {
  .groups-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .people-grid { grid-template-columns: repeat(2,1fr); gap: 14px; }
  .mobile-bottom-nav { display: flex; }
  .app-shell-inner { padding-bottom: 90px; }
  .fp-row { grid-template-columns: 1fr; }
  .exp-hero { padding: 40px 0 0; }
  .exp-hero-title { font-size: 1.6rem; }
  .exp-section-header { margin-top: 36px; }
}
@media (max-width: 480px) {
  .people-grid { grid-template-columns: 1fr; }
  .groups-grid { grid-template-columns: 1fr; }
  .exp-controls { flex-direction: column; align-items: flex-start; gap: 10px; }
  .exp-tab-switcher { gap: 4px; flex-wrap: wrap; }
  .exp-tab { padding: 9px 16px; font-size: 0.82rem; }
}
