:root {
  --color-bg: #030508;
  --color-bg-light: rgba(14, 21, 35, 0.6);
  --color-primary: #3b82f6;
  --color-primary-glow: rgba(59, 130, 246, 0.5);
  --color-secondary: #8b5cf6;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-border: rgba(255, 255, 255, 0.1);
  --font-main: 'Inter', 'Noto Sans SC', sans-serif;
  --glass-bg: rgba(15, 23, 42, 0.5);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Dynamic Star Background */
#stars, #stars2, #stars3 {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: transparent;
}

#stars { animation: animStar 50s linear infinite; }
#stars2 { animation: animStar 100s linear infinite; }
#stars3 { animation: animStar 150s linear infinite; }

/* We'll use CSS radial gradients for stars instead of shadows for better performance */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 40px 70px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 50px 160px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 90px 40px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 130px 80px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 160px 120px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 200px 200px;
  z-index: -2;
  opacity: 0.3;
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: radial-gradient(circle at center, rgba(14, 21, 35, 0) 0%, rgba(3, 5, 8, 1) 100%);
  z-index: -1;
  pointer-events: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
  z-index: 10;
}

/* Glassmorphism utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Typography */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 40px;
  text-align: center;
  background: linear-gradient(to right, #fff, var(--color-text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-title span {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--color-primary);
  -webkit-text-fill-color: var(--color-primary);
}

.section-title.small {
  font-size: 1.8rem;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  font-size: 1.1rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(3, 5, 8, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
  position: relative;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  cursor: pointer;
}

.mobile-menu-btn .bar {
  width: 25px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
}

.hero-text-area {
  flex: 1;
  max-width: 600px;
}

.glitch-text {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 10px;
  position: relative;
  color: #fff;
}

.subtitle {
  font-size: 1.5rem;
  color: var(--color-primary);
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 20px var(--color-primary-glow);
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--color-primary-glow);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

.hero-image-area {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-particle-container {
  position: relative;
  width: 400px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.particle-logo {
  width: 100%;
  max-width: 280px;
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.4));
  /* Remove floating animation */
}

/* About Section */
.about-section .container {
  padding: 60px 40px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.about-text strong {
  color: #fff;
}

.card-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.glass-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateX(10px);
  border-color: rgba(255,255,255,0.2);
}

.glass-card.primary-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
  border-color: rgba(59,130,246,0.3);
}

.glass-card.primary-card:hover {
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.glass-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #fff;
}

.glass-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Join Section */
.join-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
}

.join-info {
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-item .label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-item .value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}

.info-item .value.highlight {
  color: var(--color-primary);
  font-size: 1.5rem;
}

.join-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.join-link:hover {
  color: var(--color-primary);
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.discord-link {
  color: #5865F2; /* Discord branding color */
  font-size: 1.2rem;
}

.discord-link:hover {
  color: #7289da;
  text-shadow: 0 0 10px rgba(88, 101, 242, 0.5);
}

.discord-contact {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.hover-wrapper {
  position: relative;
  display: inline-block;
}

.qr-popup {
  position: absolute;
  bottom: 110%;
  left: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(10px);
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.qr-popup img {
  width: 120px;
  height: 120px;
  border-radius: 4px;
  background: white; /* Ensure QR code is scannable */
}

.qr-popup span {
  font-size: 0.8rem;
  color: var(--color-text);
  font-weight: normal;
  white-space: nowrap;
}

.hover-wrapper:hover .qr-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Bottom Sections Grid */
.bottom-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 100px;
}

.half-section {
  padding: 40px;
}

.grid-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-link {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--color-border);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.grid-link span {
  color: var(--color-primary);
  font-size: 1.2rem;
}

.grid-link:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-5px);
}

.tools-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.tool-link:hover {
  background: rgba(255,255,255,0.08);
  padding-left: 32px;
}

.tool-name {
  font-weight: 600;
}

.tool-arrow {
  color: var(--color-primary);
  font-size: 1.2rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
  background: rgba(3,5,8,0.8);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  justify-self: start;
}

.footer-logo img {
  height: 30px;
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  justify-self: center;
}

.footer-copyright {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.footer-copyright p {
  margin-bottom: 4px;
}

.footer-icp {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.icp-link {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icp-link:hover {
  color: #fff;
}

.gongan-icon {
  width: 16px;
  height: 16px;
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

/* Responsive */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 40px;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .join-content {
    grid-template-columns: 1fr;
  }
  
  .bottom-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(3,5,8,0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    transition: 0.3s;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .glitch-text {
    font-size: 3rem;
  }
  
  .floating-logo-container {
    width: 250px;
    height: 250px;
  }
  
  .join-info {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}
