:root {
  --bg-color: #000000;
  --text-color: #ffffff;
  --mission-bg: #000000;
  --mission-text: #ffffff;
  --header-bg: rgba(0, 0, 0, 0.6);
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  /* Enable vertical scroll */
  font-family: 'Space Grotesk', sans-serif;
  transition: background 0.3s, color 0.3s;
  scroll-behavior: smooth;
  /* Smooth Scrolling */
}

#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

#main-nav {
  display: flex;
  gap: 30px;
}

#main-nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  opacity: 0.8;
  transition: opacity 0.2s;
}

#main-nav a:hover {
  opacity: 1;
}

canvas {
  display: block;
  position: fixed;
  /* Fix canvas to viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  /* Let scroll events pass through, we use window listener for mouse */
}

/* Spacer to allow scrolling past the Hero area */
.spacer {
  height: 100vh;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Marquee Section */
#recruit-marquee {
  position: relative;
  width: 100%;
  background: #000000;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  padding: 20px 0;
  z-index: 20;
  /* Ensure it sits above transitions */
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 20px;
  will-change: transform;
}

.marquee-track span {
  font-size: 32px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

#mission {
  position: relative;
  z-index: 10;
  background: #f2f4f6;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  /* Allow content to stack */
  align-items: center;
  justify-content: center;
  color: #000000;
  padding: 40px;
  box-sizing: border-box;
  overflow: hidden;
  /* Contain bubbles */
  transition: background 0.3s, color 0.3s;
}

.mission-content {
  max-width: 800px;
  text-align: center;
  opacity: 1;
  position: relative;
  z-index: 2;
  /* Above bubbles */
}

.mission-content h2 {
  font-size: 80px;
  font-weight: 900;
  margin-bottom: 40px;
  letter-spacing: -2px;
}

.mission-content p {
  font-size: 24px;
  line-height: 1.6;
  opacity: 0.8;
  font-weight: 300;
}

#game-controls {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#game-controls.active {
  opacity: 1;
  pointer-events: auto;
}

#game-controls button {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 50%;
  transition: background 0.2s;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-controls button:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Theme Nav Removed */

/* Sections */
#mission,
#what-is-monad {
  position: relative;
  z-index: 10;
  background: #f2f4f6;
  /* Light Theme Fixed */
  min-height: 80vh;
  /* Reduced slightly to allow flow */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #000000;
  /* Dark Text */
  padding: 80px 40px;
  box-sizing: border-box;
  overflow: hidden;
}

#what-is-monad {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  /* Subtle separate */
}

/* Members Page */
#members-page {
  position: relative;
  z-index: 10;
  background: linear-gradient(145deg, #0b0b10 0%, #0f141c 100%);
  color: #e9ecf1;
  padding: 100px 32px 120px;
  box-sizing: border-box;
}

.member-hero {
  max-width: 900px;
  margin: 0 auto 60px auto;
  text-align: center;
}

.member-hero .eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7da0ff;
  margin: 0 0 12px 0;
}

.member-hero h1 {
  font-size: 56px;
  margin: 0 0 16px 0;
  letter-spacing: -1px;
}

.member-hero .lede {
  margin: 0;
  font-size: 18px;
  opacity: 0.8;
}

.selector-row {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.selector-label {
  font-size: 14px;
  opacity: 0.7;
}

.cohort-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.cohort-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e9ecf1;
  border-radius: 999px;
  padding: 14px 22px;
  cursor: pointer;
  font-size: 17px;
  transition: all 0.2s ease;
}

.cohort-button:hover {
  border-color: rgba(125, 160, 255, 0.6);
  background: rgba(255, 255, 255, 0.09);
}

.cohort-button.active {
  background: rgba(125, 160, 255, 0.2);
  border-color: rgba(125, 160, 255, 0.8);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(125, 160, 255, 0.25);
}

#members-container {
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 1100px;
  margin: 0 auto;
}

.member-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
}

.member-card {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 24px;
  min-height: 180px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.member-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 160, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.member-avatar {
  width: 144px;
  height: 144px;
  border-radius: 36px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.member-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-cohort {
  margin: 0;
  font-size: 13px;
  opacity: 0.7;
}

.member-name {
  margin: 0;
  font-size: 22px;
}

.member-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.8;
}

.members-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* Awards */
#awards-section {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  width: 100%;
  background: #000000;
  /* Dark Theme Fixed */
  color: #ffffff;
  /* Light Text */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#awards-list {
  position: relative;
  z-index: 10;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: #000000;
  /* Dark Theme Fixed */
  color: #ffffff;
  /* Light Text */
}

#trophy {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 100px;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
  z-index: 5;
}

#awards-orbit {
  position: relative;
  width: 800px;
  /* Orbit Diameter */
  height: 800px;
  border-radius: 50%;
  /* border: 1px dashed rgba(255,255,255,0.1); Optional guide */
  /* animation removed for scroll linkage */
  transform-origin: center center;
}

.award-bubble {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Default center, JS will offset */
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  /* Circle bubbles look better in orbit */
  width: 180px;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  opacity: 0.9;

  /* Defaults for JS manipulation */
  transform: translate(-50%, -50%);
}

.award-bubble strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.award-bubble span {
  display: block;
  font-size: 12px;
  opacity: 0.8;
  font-weight: 300;
}

.award-card {
  width: 100%;
  max-width: 600px;
  border: 1px solid #FFD700;
  border-radius: 50px;
  /* Pill shape */
  padding: 20px 40px;
  text-align: center;
  background: rgba(128, 128, 128, 0.05);
  transition: all 0.3s ease;
  color: inherit;
  cursor: default;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.award-card:hover {
  background: rgba(255, 215, 0, 0.05);
  /* Height expands automatically based on content reveal */
}

.award-card strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: inherit;
}

.award-details {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transition: all 0.4s ease;
}

.award-card:hover .award-details {
  max-height: 100px;
  /* Arbitrary limit, needs to be enough for text */
  opacity: 1;
  margin-top: 10px;
}

.award-details p {
  font-size: 14px;
  color: rgba(150, 150, 150, 1);
  /* Fallback gray */
  color: gray;
  /* Explicit gray as requested, or opacity mix */
  margin: 0 0 5px 0;
}

/* Theme aware gray */
:root {
  --text-gray: rgba(255, 255, 255, 0.6);
}

/* We can adjust this variable based on theme in JS if needed, but 'gray' is safe enough usually. */

.award-details span {
  display: block;
  font-size: 12px;
  opacity: 0.6;
  font-weight: 300;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes counter-spin {
  100% {
    transform: translate(-50%, -50%) rotate(-360deg);
  }

  /* Note: translate(-50%, -50%) is needed if centering, but we set margins/transform in JS?
     Actually, if we position with left/top, bubble origin is top-left.
     Effectively we want to rotate around its own center.
     Let's handle the translate in the main rule or JS.
  */
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
}