:root {
  /* Neon Accents */
  --neon-cyan: #0ff;
  --neon-purple: #b0f;
  --dark-blue: #0b0f19;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  
  --shadow-color: rgba(0, 255, 255, 0.2);
  --bg-gradient: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #0f0c29 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
  scroll-behavior: smooth;
}

body {
  background: var(--dark-blue);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Loader */
.loader-container {
  position: fixed;
  inset: 0;
  background: var(--dark-blue);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid transparent;
  border-top-color: var(--neon-cyan);
  border-right-color: var(--neon-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Typography & Utilities */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.05em; margin-bottom: 1rem; }
.accent { color: var(--neon-cyan); text-shadow: 0 0 10px var(--shadow-color); }
p { color: var(--text-muted); line-height: 1.6; margin-bottom: 1.5rem; }
.section-title { font-size: 3rem; text-align: center; margin-bottom: 4rem; }

/* Buttons */
.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  white-space: nowrap;
}

.text-btn { background: transparent; color: var(--text-main); }
.text-btn:hover { color: var(--neon-cyan); }

.outline-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
}
.outline-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }

.glow-btn {
  background: linear-gradient(45deg, var(--neon-purple), var(--neon-cyan));
  color: white;
  position: relative;
  z-index: 1;
}

.glow-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, var(--neon-purple), var(--neon-cyan));
  filter: blur(10px);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.glow-btn:hover::before { opacity: 0.8; }
.giant-glow-btn { font-size: 1.2rem; padding: 1rem 2.5rem; margin-top: 1rem; }
.full-width { width: 100%; margin-top: 1rem; }

/* Navbar */
.glass-nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(11, 15, 25, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--neon-cyan);
  transition: width 0.3s;
}

.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--neon-cyan); }

.nav-content {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-main);
  transition: 0.3s;
}

/* Sections */
.section {
  padding: 8rem 5% 4rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Hero */
.hero { text-align: center; }
.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.glitch {
  font-size: clamp(3rem, 8vw, 6rem);
  position: relative;
}

/* Floating Animation */
.floating {
  animation: float 6s ease-in-out infinite;
}

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

/* Cards Area */
.features .card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
  perspective: 1000px;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  transform-style: preserve-3d;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.glass-card:hover {
  border-color: rgba(0, 255, 255, 0.3);
  box-shadow: 0 15px 45px rgba(0, 255, 255, 0.1);
}

.card-content { transform: translateZ(40px); }
.icon { font-size: 3rem; margin-bottom: 1rem; }

/* Dashboard specific */
.dashboard-card { max-width: 600px; width: 100%; }
.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

/* Modal Auth Area */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  width: 90%;
  max-width: 400px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content { transform: translateY(0); }

.close-btn {
  position: absolute;
  top: 1rem; right: 1.5rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover { color: var(--neon-cyan); }

/* Form Elements */
.form-container h2 { margin-bottom: 2rem; font-size: 2rem; }
.error-msg { color: #ff4d4d; font-size: 0.9rem; margin-bottom: 1rem; text-align: center; }

.input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.input-group input {
  width: 100%;
  padding: 1rem 1rem 1rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
}

.input-group label {
  position: absolute;
  top: 1rem;
  left: 0;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.3s ease;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
  top: -10px;
  font-size: 0.8rem;
  color: var(--neon-cyan);
}

.input-glow {
  position: absolute;
  bottom: 0; left: 0;
  width: 0%; height: 2px;
  background: var(--neon-cyan);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--neon-cyan);
}

.input-group input:focus ~ .input-glow { width: 100%; }

.social-login { margin-top: 2rem; text-align: center; }
.social-login p { font-size: 0.9rem; margin-bottom: 1rem; }
.social-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.social-btn:hover {
  background: var(--neon-cyan);
  color: var(--dark-blue);
  box-shadow: 0 0 15px var(--neon-cyan);
}

.switch-form { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; }
.switch-form a { color: var(--neon-cyan); text-decoration: none; }
.switch-form a:hover { text-decoration: underline; }

/* User Auth Box Nav */
.user-info-box { display: flex; align-items: center; gap: 1rem; }
.user-name { font-weight: 600; color: var(--neon-cyan); }
.auth-actions-box { display: flex; gap: 1rem; }

/* Footer */
footer { padding: 2rem 5%; text-align: center; border-top: 1px solid var(--glass-border); }
.glass-footer p { font-size: 0.9rem; margin-bottom: 0; }
.nav-overlay { display: none; }

/* Responsive Media Queries */
@media (max-width: 768px) {
  .hamburger { display: flex; z-index: 1001;}
  
  .glass-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(11, 15, 25, 0.98);
  }

  .nav-overlay {
    display: block;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }
  .nav-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  .nav-content {
    position: fixed;
    top: 0; right: -100%;
    width: 70%; height: 100vh;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 100px;
    padding-bottom: 50px;
    overflow-y: auto;
    transition: 0.5s ease;
    border-left: 1px solid var(--glass-border);
  }

  .nav-content.active { right: 0; }
  .nav-links { flex-direction: column; align-items: center; gap: 2rem; margin-bottom: 2rem; }
  
  .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  
  .auth-actions-box, .user-info-box { 
    flex-direction: column; 
    width: 100%; 
    padding: 0 15%; 
    align-items: stretch;
    gap: 1.5rem; 
  }
  
  .auth-actions-box .btn, .user-info-box .btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
    box-sizing: border-box;
  }
}
