:root {
  --bg-dark: #07070a;
  --bg-card: rgba(18, 18, 25, 0.6);
  --neon-purple: #7B2FBE;
  --neon-blue: #00D4FF;
  --text-light: #f5f5f5;
  --text-muted: #a0a0b0;
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --blur: blur(12px);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Cyberpunk Mesh Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 15% 50%, rgba(123, 47, 190, 0.15), transparent 40%),
              radial-gradient(circle at 85% 30%, rgba(0, 212, 255, 0.15), transparent 40%);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: linear-gradient(var(--glass-border) 1px, transparent 1px),
  linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  opacity: 0.2;
}

/* Glassmorphism Utilities */
.glass {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
}

.glass:hover {
  border-color: rgba(123, 47, 190, 0.3);
  box-shadow: 0 0 15px rgba(123, 47, 190, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  color: white;
  box-shadow: 0 4px 15px rgba(123, 47, 190, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--neon-blue);
  border: 1px solid var(--neon-blue);
}

.btn-outline:hover {
  background: rgba(0, 212, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Glitch Effect */
.glitch {
  position: relative;
  display: inline-block;
  font-weight: 800;
  letter-spacing: -1px;
}

@keyframes glitch-anim {
  0% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 2px); }
  20% { clip-path: inset(40% 0 10% 0); transform: translate(2px, -2px); }
  40% { clip-path: inset(80% 0 5% 0); transform: translate(-2px, 1px); }
  60% { clip-path: inset(5% 0 60% 0); transform: translate(2px, -1px); }
  80% { clip-path: inset(20% 0 40% 0); transform: translate(-1px, 2px); }
  100% { clip-path: inset(50% 0 30% 0); transform: translate(1px, -2px); }
}

.glitch:hover::before, .glitch:hover::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
}

.glitch:hover::before {
  left: 3px;
  text-shadow: -2px 0 var(--neon-purple);
  animation: glitch-anim 0.3s infinite linear alternate-reverse;
}

.glitch:hover::after {
  left: -3px;
  text-shadow: 2px 0 var(--neon-blue);
  animation: glitch-anim 0.4s infinite linear alternate-reverse;
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1.5rem 5%;
  transition: var(--transition);
}

header.scrolled {
  padding: 1rem 5%;
  background: rgba(7, 7, 10, 0.8);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--neon-blue);
}

/* Mobile Menu */
.menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(7, 7, 10, 0.95);
    backdrop-filter: var(--blur);
    flex-direction: column;
    justify-content: center;
    transition: 0.3s;
  }
  .nav-links.active {
    left: 0;
  }
  .menu-btn {
    display: block;
  }
}

/* Main Layout */
main {
  min-height: calc(100vh - 80px); /* 80px for footer */
  padding-top: 100px; /* Offset for fixed header */
}

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

/* Forms & Inputs */
input, select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

/* Hidden Class */
.hidden {
  display: none !important;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 5%;
  border-top: 1px solid var(--glass-border);
  margin-top: 4rem;
  color: var(--text-muted);
}
footer a {
  color: var(--neon-blue);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  backdrop-filter: var(--blur);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

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

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

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

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--neon-purple);
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Loader */
.loader {
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--neon-blue);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

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