/* ========== Base Reset ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: #000;
  color: #fff;
  font: 400 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== Video: top half, show entire frame (letterboxed if needed) ========== */
.bg-video{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50vh;           /* TOP HALF */
  object-fit: contain;    /* show full video, no cropping */
  object-position: center;
  background-color: #000; /* fill pillar/letterbox bars */
  z-index: -2;            /* behind UI */
  filter: none;
}



/* ========== AI Pong Background ========== */
.pong-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.8;
  background: rgba(0, 0, 20, 0.2); /* More visible background */
  pointer-events: none;
}

/* ========== Digital Brain Background ========== */
#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  display: none;
}

.digital-brain-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: radial-gradient(ellipse at center, 
    rgba(15, 35, 60, 1) 0%, 
    rgba(10, 25, 45, 1) 30%, 
    rgba(5, 15, 30, 1) 70%, 
    rgba(0, 5, 15, 1) 100%);
  overflow: hidden;
  /* Add subtle animated background pattern */
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 200, 255, 0.1) 0%, transparent 50%);
}

.brain-node {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #FFD700;
  border-radius: 50%;
  opacity: 1;
  box-shadow: 0 0 10px rgba(255, 215, 0, 1), 0 0 20px rgba(255, 215, 0, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

.brain-connection {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #FFD700 50%, transparent 100%);
  opacity: 0.9;
  box-shadow: 0 0 4px rgba(255, 215, 0, 0.8);
  animation: flow 3s ease-in-out infinite;
}

.brain-circuit {
  position: absolute;
  border: 1px solid #D4A017;
  border-radius: 50%;
  opacity: 0.2;
  animation: rotate 20s linear infinite;
}

.brain-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #8dd7ff;
  border-radius: 50%;
  opacity: 1;
  box-shadow: 0 0 8px rgba(141, 215, 255, 1), 0 0 16px rgba(141, 215, 255, 0.5);
  animation: float 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { 
    opacity: 0.3; 
    transform: scale(1); 
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
  }
  50% { 
    opacity: 1; 
    transform: scale(1.2); 
    box-shadow: 0 0 0 8px rgba(255, 215, 0, 0);
  }
}

@keyframes flow {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.6; }
}

@keyframes rotate {
  0% { transform: rotate(0deg) scale(1); opacity: 0.1; }
  50% { opacity: 0.3; }
  100% { transform: rotate(360deg) scale(1); opacity: 0.1; }
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0) translate(0); 
    opacity: 0.3; 
  }
  25% { 
    transform: translateY(-20px) translate(10px); 
    opacity: 0.7; 
  }
  50% { 
    transform: translateY(-10px) translate(-15px); 
    opacity: 1; 
  }
  75% { 
    transform: translateY(-30px) translate(5px); 
    opacity: 0.5; 
  }
}

/* Optional: gentle seam line at 50vh */
body::before{
  content: "";
  position: fixed;
  left: 0;
  top: 50vh;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,0), rgba(255,255,255,.18));
  z-index: -1;
}

/* ========== Bottom-half content area ========== */
.hero-overlay{
  position: fixed;
  top: 50vh;              /* BOTTOM HALF */
  left: 0;
  width: 100%;
  height: 50vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(16px, 3vw, 40px);
  pointer-events: none;   /* overlay itself doesn’t capture clicks */
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.75)); /* improve legibility */
}

.hero-overlay h1{
  font-weight: 800;
  font-size: clamp(26px, 5.5vw, 56px);
  letter-spacing: .02em;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0,0,0,.35), 0 0 24px rgba(255,255,255,.08);
  margin-bottom: clamp(10px, 2vh, 16px);
}

/* ========== Download Card (glass) ========== */
.download-card{
  pointer-events: auto;   /* enable clicks inside */
  width: min(720px, 92vw);
  margin-inline: auto;
  padding: clamp(16px, 3vw, 28px);
  border-radius: 14px;

  background: rgba(10,14,18,.32);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px) saturate(115%);
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.03) inset;
  transition: transform .18s ease, box-shadow .25s ease;
}
.download-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(0,0,0,.38), 0 0 0 1px rgba(255,255,255,.05) inset;
}

.download-card h2{
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 8px;
}
.download-card .muted{
  color: rgba(255,255,255,.80);
  font-size: clamp(14px, 1.9vw, 15px);
  margin-bottom: 18px;
}

/* ========== Primary CTA (works for <a> or <button> with .big-btn) ========== */
.big-btn,
a.big-btn,
button.big-btn{
  display: inline-block;
  width: 100%;
  text-decoration: none;
  user-select: none;
  padding: 14px 18px;
  border-radius: 12px;

  font-weight: 800;
  font-size: clamp(16px, 2.2vw, 18px);
  letter-spacing: .02em;
  color: #fff;

  background: linear-gradient(90deg, #1fb6ff, #ff4d88);
  border: none;
  box-shadow: 0 10px 22px rgba(31,182,255,.22), 0 2px 0 rgba(255,255,255,.06) inset;
  transition: transform .12s ease, filter .2s ease, box-shadow .2s ease;
}
.big-btn:hover{ transform: translateY(-1px); filter: brightness(1.06); }
.big-btn:active{ transform: translateY(0); filter: brightness(.98); }

/* ========== Status / Disclaimer ========== */
#download-status{
  min-height: 1em;
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255,255,255,.72);
}
.disclaimer{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.6);
  font-style: italic;
}

/* ========== Mobile tweaks ========== */
@media (max-width: 560px){
  .download-card{ padding: 14px; }
}

/* ========== Governance Theme Elements ========== */
.nav-tagline {
  font-size: 0.7rem;
  color: rgba(255, 215, 0, 0.8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.governance-tagline {
  font-size: clamp(0.9rem, 2.2vw, 1.3rem);
  color: rgba(255, 215, 0, 0.9);
  font-weight: 600;
  text-align: center;
  opacity: 1;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,.7);
}

.secondary-btn {
  background: linear-gradient(135deg, #1a1a1a, #333) !important;
  border: 2px solid rgba(255, 215, 0, 0.4) !important;
  color: #fff !important;
}

.secondary-btn:hover {
  background: linear-gradient(135deg, #2a2a2a, #444) !important;
  border-color: rgba(255, 215, 0, 0.6) !important;
}

.action-buttons-center {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  position: relative;
  z-index: 10;
}

.action-btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: inline-block;
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.btn-icon-img {
  width: 32px;
  height: 32px;
  margin-right: 12px;
  vertical-align: middle;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
  border-radius: 6px;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  padding: 4px;
  box-shadow: 
    inset 1px 1px 2px rgba(255,255,255,0.8),
    inset -1px -1px 2px rgba(0,0,0,0.1),
    2px 2px 6px rgba(0,0,0,0.2);
}

.security-review {
  text-align: center;
  margin: 1.5rem 0;
  opacity: 0.8;
}

.security-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.security-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.security-logo {
  height: 30px;
  width: auto;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.security-logo:hover {
  opacity: 0.9;
}

.pong-controls {
  position: fixed;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 16px;
  border-radius: 25px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  z-index: 100;
  backdrop-filter: blur(10px);
}

.level-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level-btn:hover {
  background: linear-gradient(135deg, #FFED4A, #FFD700);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

.level-btn:active {
  transform: scale(0.95);
}

#level-display {
  color: #FFD700;
  font-size: 14px;
  font-weight: 600;
  min-width: 60px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 0;
  z-index: 50;
}

footer .security-review {
  margin: 0;
  padding: 5px 0;
}

/* Enhanced Brain Animation - Governance Theme */
.governance-grid {
  position: absolute;
  width: 2px;
  height: 100px;
  background: linear-gradient(to bottom, transparent, rgba(255, 215, 0, 0.8), transparent);
  opacity: 1;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
  animation: dataFlow 2s ease-in-out infinite;
}

.control-node {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255, 69, 0, 1);
  border-radius: 50%;
  border: 2px solid #ff4500;
  animation: controlPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(255, 69, 0, 1), 0 0 32px rgba(255, 69, 0, 0.5);
}

.rule-pathway {
  position: absolute;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 127, 1), transparent);
  opacity: 1;
  box-shadow: 0 0 8px rgba(0, 255, 127, 0.8);
  animation: ruleFlow 3s ease-in-out infinite;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(50px) scale(0.95); filter: blur(5px); }
  50% { opacity: 0.8; transform: translateY(10px) scale(1.02); filter: blur(1px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0px); }
}

@keyframes dataFlow {
  0%, 100% { opacity: 0; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-30px); }
}

@keyframes controlPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

@keyframes ruleFlow {
  0%, 100% { opacity: 0; transform: scaleX(0); }
  50% { opacity: 0.8; transform: scaleX(1); }
}

/* Responsive Updates for Governance Elements */
@media (max-width: 768px) {
  .nav-tagline { font-size: 0.6rem; }
  .governance-tagline { font-size: 0.9rem; }
  .action-buttons { flex-direction: column; gap: 0.8rem; }
}

@media (max-width: 480px) {
  .nav-tagline { font-size: 0.5rem; }
  .governance-tagline { font-size: 0.8rem; margin-bottom: 0.8rem; }
  .action-btn { font-size: 0.95rem; padding: 0.8rem 1.5rem; }
}

/* ========== Motion preferences ========== */
@media (prefers-reduced-motion: reduce){
  .download-card,
  .big-btn{ transition: none; }
}
/* ========== Version Selector Styles ========== */
.version-selector {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

.version-btn {
  padding: 10px 24px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.version-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

.version-btn.active {
  background: linear-gradient(135deg, #FFD700, #D4A017);
  color: #1a1a2e;
}

.version-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.version-tag {
  font-size: 11px;
  color: #FFD700;
  background: rgba(255, 215, 0, 0.15);
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: -4px;
}

.version-tag.classic {
  color: #42a5ff;
  background: rgba(66, 165, 255, 0.15);
}

.dl-grid.hidden {
  display: none !important;
}

.license-purchase {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.license-purchase a {
  color: #22c55e;
  text-decoration: none;
  font-weight: 600;
}

.license-purchase a:hover {
  text-decoration: underline;
}