:root {
  --primary: #0d6efd;
  --success: #198754;
  --warning: #e67e22;
  --dark: #0d1b2a;
  --topbar: #0d1b2a;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1a1a2e;
}

.top-bar {
  background: var(--topbar);
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
}

.logo-circle {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #198754 0%, #0d6efd 100%);
}

.btn-join {
  border-radius: 6px;
  font-weight: 500;
  padding: 0.45rem 1.2rem;
}

.hero-section {
  background: #f8fafc;
}

/* Venn diagram approximation */
.venn-diagram {
  position: relative;
  width: 320px;
  height: 280px;
}

.venn-diagram .circle {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  opacity: 0.75;
}

.circle-blue {
  background: #3b82f6;
  top: 20px;
  left: 30px;
}

.circle-green {
  background: #22c55e;
  top: 20px;
  left: 120px;
}

.circle-orange {
  background: #f59e0b;
  top: 100px;
  left: 75px;
}

.venn-diagram .legend {
  position: absolute;
  right: -20px;
  top: 40px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.venn-diagram .legend span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.feature-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1) !important;
}

.cta-section {
  background: var(--dark);
}

.footer {
  background: #0a1628;
}

.footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer a:hover {
  color: #fff;
}

/* Forms */
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

/* Cards for publications etc */
.resource-card {
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}

.resource-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.resource-card .card-body .resource-actions {
  margin-top: auto;   /* pushes button to bottom */
  padding-top: 0.75rem;
}

.resource-card:hover {
  transform: translateY(-3px);
}

.resource-thumb {
  background: #f1f5f9;
  /*height: 200px;*/
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem 0.375rem 0 0;
  overflow: hidden;
}
.resource-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.resource-thumb i {
  font-size: 2.5rem;
  color: rgba(30,41,59,0.4);
}

/* Member cards */
.member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #fff;
  font-size: 0.9rem;
}

/* Timeline */
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

/* Stats */
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

/* Privacy box */
.privacy-box {
  background: #d1fae5;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

/* Section labels */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--success);
}

/* Navbar active */
.nav-link.active {
  color: var(--primary) !important;
  font-weight: 500;
}

/* Simple network graphic */
.network-graphic {
  position: relative;
  width: 280px;
  height: 220px;
  margin: 0 auto;
}

.network-graphic .node {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.network-graphic .ring {
  position: absolute;
  border: 2px solid rgba(59,130,246,0.3);
  border-radius: 50%;
}

/* Page loader */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#page-loader .loader-spinner {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#page-loader .loader-spinner::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #0d6efd;
  border-right-color: #198754;
  animation: loader-spin 1s linear infinite;
}

#page-loader .loader-spinner::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: #0d6efd;
  border-left-color: #198754;
  animation: loader-spin 1.6s linear infinite reverse;
}

#page-loader img {
  width: 100px;
  height: auto;
  display: block;
}

#page-loader .loader-text {
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 1.75rem;
  letter-spacing: 0.05em;
}

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

body.loading {
  overflow: hidden;
}
