/**
 * Nexora — public community page shell (hero, tabs, overview cards).
 */

.nex-cp {
  --cp-accent: #7c3aed;
  --cp-text: #f8fafc;
  --cp-muted: #94a3b8;
  --cp-soft: #cbd5e1;
  --cp-surface: rgba(15, 23, 42, 0.78);
  --cp-border: rgba(148, 163, 184, 0.16);
  max-width: 960px;
  margin: 0 auto 3.5rem;
  padding: 1.25rem 1.15rem 2rem;
}

.nex-cp a {
  color: color-mix(in srgb, var(--cp-accent) 70%, #c4b5fd);
}

.nex-cp__crumb {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--cp-muted);
}

.nex-cp__crumb a {
  color: #a5b4fc;
  font-weight: 600;
  text-decoration: none;
}

.nex-cp__crumb a:hover {
  text-decoration: underline;
}

.nex-cp-hero {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--cp-border);
  background:
    radial-gradient(ellipse 95% 80% at 12% -20%, color-mix(in srgb, var(--cp-accent) 28%, transparent), transparent 58%),
    radial-gradient(ellipse 70% 60% at 100% 0%, rgba(79, 70, 229, 0.14), transparent 50%),
    var(--cp-surface);
  padding: 1.35rem 1.25rem 1.2rem;
  margin-bottom: 0.85rem;
  overflow: hidden;
}

.nex-cp-hero__row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.nex-cp-hero__logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: contain;
  object-position: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
}

.nex-cp-hero__logo--mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: #475569;
  background: #fff;
}

.nex-cp-hero__title {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(1.55rem, 4vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--cp-text);
  line-height: 1.15;
}

.nex-cp-hero__meta {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--cp-muted);
}

.nex-cp-hero__meta strong {
  color: color-mix(in srgb, var(--cp-accent) 55%, #e2e8f0);
  font-weight: 700;
}

.nex-cp-hero__desc {
  margin: 0.85rem 0 0;
  max-width: 40rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--cp-soft);
}

.nex-cp-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.nex-cp-kpi {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  padding: 0.65rem 0.5rem;
  text-align: center;
  min-width: 0;
}

.nex-cp-kpi span {
  display: block;
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--cp-muted);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nex-cp-kpi strong {
  font-size: 1.05rem;
  color: var(--cp-text);
  font-weight: 750;
}

.nex-cp-discord-cta {
  margin-top: 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
}

.nex-cp-discord-cta__hint {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c4b5fd;
  text-align: center;
}

.nex-cp-discord-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 56px;
  padding: 0.85rem 1.35rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #6875f5 0%, #5865f2 55%, #4752c4 100%);
  border: 1px solid #3c45a5;
  color: #fff !important;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  box-shadow:
    0 0 0 0 rgba(88, 101, 242, 0.55),
    0 14px 32px rgba(88, 101, 242, 0.42);
  overflow: hidden;
  isolation: isolate;
  animation: nex-cp-discord-pulse 1.8s ease-in-out infinite;
  transition: transform 0.15s ease, filter 0.15s ease;
  box-sizing: border-box;
  z-index: 1;
}

.nex-cp-discord-btn:hover,
.nex-cp-discord-btn:focus-visible {
  color: #fff !important;
  filter: brightness(1.07);
  transform: translateY(-2px) scale(1.01);
  outline: none;
}

.nex-cp-discord-btn:focus-visible {
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.35),
    0 16px 36px rgba(88, 101, 242, 0.5);
}

.nex-cp-discord-btn .fa-discord {
  font-size: 1.45rem;
  line-height: 1;
  animation: nex-cp-discord-icon-bob 1.4s ease-in-out infinite;
}

.nex-cp-discord-btn__label {
  position: relative;
  z-index: 1;
}

.nex-cp-discord-btn__glow {
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.28), transparent 55%);
  animation: nex-cp-discord-shine 2.4s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.nex-cp-discord-btn__pulse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
  pointer-events: none;
  z-index: 0;
}

@keyframes nex-cp-discord-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(88, 101, 242, 0.55),
      0 14px 32px rgba(88, 101, 242, 0.42);
  }
  50% {
    box-shadow:
      0 0 0 12px rgba(88, 101, 242, 0),
      0 18px 36px rgba(88, 101, 242, 0.5);
  }
}

@keyframes nex-cp-discord-icon-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes nex-cp-discord-shine {
  0% { transform: translateX(-18%) rotate(8deg); opacity: 0.55; }
  50% { opacity: 0.9; }
  100% { transform: translateX(18%) rotate(8deg); opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .nex-cp-discord-btn,
  .nex-cp-discord-btn .fa-discord,
  .nex-cp-discord-btn__glow {
    animation: none;
  }
}

.nex-cp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.nex-cp-actions .nex-btn {
  min-height: 44px;
  min-width: 7.5rem;
  justify-content: center;
  font-weight: 700;
}

.nex-cp-actions .nex-btn-ghost {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.35);
  background: transparent;
}

.nex-cp-actions .nex-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nex-cp-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  margin: 0 0 1rem;
  padding: 0.25rem;
  border-radius: 14px;
  border: 1px solid var(--cp-border);
  background: rgba(15, 23, 42, 0.55);
}

.nex-cp-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cp-muted);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nex-cp-tab:hover {
  color: var(--cp-text);
  background: rgba(255, 255, 255, 0.04);
}

.nex-cp-tab.is-active {
  color: #fff;
  background: color-mix(in srgb, var(--cp-accent) 55%, #1e1b4b);
  border-color: color-mix(in srgb, var(--cp-accent) 45%, transparent);
}

.nex-cp-panel {
  border-radius: 16px;
  border: 1px solid var(--cp-border);
  background: var(--cp-surface);
  padding: 1.15rem 1.1rem 1.25rem;
}

.nex-cp-panel__head {
  margin-bottom: 0.95rem;
}

.nex-cp-panel__head h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cp-text);
  letter-spacing: -0.02em;
}

.nex-cp-panel__head p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--cp-muted);
  line-height: 1.45;
}

.nex-cp-empty {
  margin: 0;
  padding: 1.25rem 0.75rem;
  text-align: center;
  color: var(--cp-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.nex-cp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.nex-cp-card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(0, 0, 0, 0.22);
  padding: 0.9rem 0.95rem;
  min-width: 0;
}

.nex-cp-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--cp-text);
}

.nex-cp-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--cp-muted);
  line-height: 1.45;
}

.nex-cp-card__list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nex-cp-card__list li {
  font-size: 0.84rem;
  color: var(--cp-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nex-cp-card__list a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.nex-cp-card__list a:hover {
  color: #fff;
  text-decoration: underline;
}

.nex-cp-card__more {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.nex-cp-alert {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}

.nex-cp-alert--ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.nex-cp-alert--err {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

@media (max-width: 720px) {
  .nex-cp-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nex-cp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .nex-cp-hero__logo {
    width: 56px;
    height: 56px;
  }
}
