:root {
  --primary: #ffffff;
  --secondary: #6a89cc;
  --dark: #121820;
  --darker: #0a0e14;
  --text: #e1e2e6;
  --accent: #ff7e5f;
  --slate-blue: #6a89cc;
  --slate-gray: #778899;
  --firefly-color: rgba(255, 255, 255, 0.8);
  --fire-glow-1: rgba(255, 126, 95, 0.4);
  --fire-glow-2: rgba(255, 153, 51, 0.3);
  --candle-light: rgba(255, 185, 75, 0.25);
  --fire-pulse: rgba(255, 107, 53, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}

header {
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.logo {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), var(--slate-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 auto;
  animation: textGlow 4s infinite alternate;
  position: relative;
}

.logo::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 32px;
  margin-right: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.login-btn {
  position: fixed;
  right: 20px;
  top: 20px;
  background: rgba(106, 137, 204, 0.1);
  border: 1px solid rgba(106, 137, 204, 0.2);
  color: var(--text);
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  overflow: hidden;
  opacity: 0.6; 
  z-index: 10;
}

.login-btn:after {
  content: "";
  position: absolute;
  top: -50%;
  left: -100%;
  width: 40px;
  height: 200%;
  background: linear-gradient(
    to right, 
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.3) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(25deg);
  transition: all 0.7s;
}

.login-btn:hover:after {
  left: 200%;
}

.login-btn:hover {
  background: rgba(106, 137, 204, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(106, 137, 204, 0.15);
  opacity: 0.9;
}

main {
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
  flex: 1;
  justify-content: center;
}

.hero {
  margin: 40px 0 80px;
}

.sections {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 60px;
  margin-bottom: 40px;
  align-items: center;
}

.section {
  width: 100%;
  max-width: 800px;
  position: relative;
  padding: 0;
}

.section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  text-align: center;
}

.section-title {
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  padding: 0 20px;
  z-index: 1;
  background: var(--dark);
  position: relative;
  text-shadow: 0 0 10px rgba(106, 137, 204, 0.3);
}

.section-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, rgba(106, 137, 204, 0.1), var(--slate-blue), rgba(106, 137, 204, 0.1));
  top: 50%;
  left: 0;
  z-index: 0;
}

.section-line::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 100%;
  background: var(--accent);
  left: calc(50% - 30px);
  top: 0;
  opacity: 0.5;
  filter: blur(10px);
  animation: pulse 3s infinite alternate;
  box-shadow: 0 0 15px 5px var(--fire-glow-1);
}

@keyframes pulse {
  0% { opacity: 0.3; transform: scaleX(0.8); filter: brightness(0.9); }
  100% { opacity: 0.8; transform: scaleX(1.2); filter: brightness(1.1); }
}

.nav-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 5px 0;
}

.nav-item {
  background: rgba(12, 20, 30, 0.4);
  border: 1px solid rgba(106, 137, 204, 0.1);
  border-radius: 4px;
  padding: 12px 24px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

.nav-item::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-item:hover {
  transform: translateY(-3px);
  border-color: var(--slate-blue);
  box-shadow: 0 5px 20px rgba(106, 137, 204, 0.15), 0 0 15px var(--fire-glow-1);
}

.nav-item:hover::before {
  opacity: 1;
}

.nav-item:hover .nav-icon {
  color: var(--primary);
  transform: translateY(-2px);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.nav-icon {
  font-size: 20px;
  margin-right: 10px;
  transition: all 0.3s ease;
  color: var(--slate-blue);
}

.nav-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.nav-item:hover .nav-title {
  color: var(--primary);
}

.forge-container {
  width: 100%;
  max-width: 800px;
  position: relative;
  height: 2px;
  background: rgba(106, 137, 204, 0.1);
  overflow: visible;
  margin-top: 20px;
  box-shadow: 0 0 10px var(--fire-glow-1);
}

.forge-spark {
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px 2px var(--accent);
  transform: translate(-50%, -50%);
  animation: spark 8s linear infinite, flicker 0.5s infinite alternate;
}

.forge-spark:nth-child(2) {
  animation-delay: 1s;
}

.forge-spark:nth-child(3) {
  animation-delay: 3s;
}

.forge-spark:nth-child(4) {
  animation-delay: 5s;
}

@keyframes spark {
  0% { 
      left: 0%; 
      opacity: 0;
      box-shadow: 0 0 5px 1px var(--accent);
  }
  10% { 
      opacity: 1;
      box-shadow: 0 0 15px 3px var(--accent), 0 0 5px 8px rgba(255, 126, 95, 0.3);
  }
  80% { 
      opacity: 1;
      box-shadow: 0 0 10px 2px var(--accent);
  }
  100% { 
      left: 100%; 
      opacity: 0;
  }
}

@keyframes flicker {
  0%, 100% { opacity: 0.6; }
  25% { opacity: 0.8; }
  50% { opacity: 0.5; }
  75% { opacity: 0.7; }
}

footer {
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
  opacity: 0.6;
  color: var(--slate-gray);
  margin-bottom: auto;
}

/* Fireflies Animation */
.fireflies-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.firefly {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--firefly-color);
  box-shadow: 0 0 10px 2px var(--firefly-color);
  animation: firefly 15s linear infinite;
  opacity: 0;
}

.firefly:nth-child(1) { animation-delay: 0s; top: 20%; left: 50%; }
.firefly:nth-child(2) { animation-delay: 2s; top: 40%; left: 10%; }
.firefly:nth-child(3) { animation-delay: 4s; top: 60%; left: 80%; }
.firefly:nth-child(4) { animation-delay: 6s; top: 10%; left: 30%; }
.firefly:nth-child(5) { animation-delay: 8s; top: 80%; left: 60%; }
.firefly:nth-child(6) { animation-delay: 10s; top: 30%; left: 90%; }
.firefly:nth-child(7) { animation-delay: 12s; top: 70%; left: 20%; }
.firefly:nth-child(8) { animation-delay: 14s; top: 50%; left: 40%; }
.firefly:nth-child(9) { animation-delay: 16s; top: 15%; left: 70%; }
.firefly:nth-child(10) { animation-delay: 18s; top: 85%; left: 15%; }

@keyframes firefly {
  0% {
    opacity: 0;
    transform: translateX(0) translateY(0) scale(1);
  }
  10% {
    opacity: 0.8;
  }
  30% {
    opacity: 0.6;
    transform: translateX(30px) translateY(-50px) scale(1.2);
  }
  50% {
    opacity: 0.8;
    transform: translateX(-20px) translateY(-80px) scale(0.8);
  }
  70% {
    opacity: 0.6;
    transform: translateX(50px) translateY(-100px) scale(1.1);
  }
  90% {
    opacity: 0.8;
    transform: translateX(-10px) translateY(-150px) scale(0.9);
  }
  100% {
    opacity: 0;
    transform: translateX(20px) translateY(-180px) scale(0.7);
  }
}

/* Fire & Candle Glow Effects */
.glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 2.5s ease-in-out;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  transform: scale(0);
  transition: transform 3s ease-in-out, opacity 3s ease-in-out;
}

.glow.active {
  opacity: 1;
  transform: scale(1);
}

.glow-1 {
  bottom: 10%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--fire-glow-1) 0%, rgba(255, 126, 95, 0) 70%);
}

.glow-2 {
  top: 30%;
  right: 20%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--fire-glow-2) 0%, rgba(255, 153, 51, 0) 70%);
}

.glow-3 {
  top: 60%;
  left: 40%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--candle-light) 0%, rgba(255, 185, 75, 0) 70%);
}

.glow-container.active {
  opacity: 1;
}

/* Enhanced Logo Animation */
@keyframes textGlow {
  0% { text-shadow: 0 0 5px rgba(106, 137, 204, 0.1); }
  50% { text-shadow: 0 0 15px rgba(106, 137, 204, 0.5), 0 0 25px var(--accent); }
  100% { text-shadow: 0 0 5px rgba(106, 137, 204, 0.1); }
}

/* Full Page Fire Glow Effect */
.fire-pulse {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, var(--fire-pulse) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.fire-pulse.active {
  animation: pulseGlow 3s ease-in-out;
}

@keyframes pulseGlow {
  0% { opacity: 0; }
  20% { opacity: 0.8; }
  60% { opacity: 0.6; }
  100% { opacity: 0; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .login-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    margin: 0;
    padding: 5px 12px;
    font-size: 11px;
  }
  
  header {
      flex-direction: column;
      gap: 10px;
  }
  
  .nav-links {
      flex-direction: column;
      gap: 10px;
  }
}