/* ===================================
   Base Styles - Global CSS Variables & Foundation
   GeekDZ - Elite 3D Website
   Dark Futuristic Theme with Neon-Blue Highlights
   =================================== */

:root {
  /* Colors - Dark Futuristic Palette */
  --color-bg-primary: #000000;
  --color-bg-secondary: #0a0a0f;
  --color-bg-surface: rgba(10, 10, 15, 0.8);
  --color-neon-blue: #00d4ff;
  --color-neon-blue-dark: #0099cc;
  --color-neon-blue-light: #33e0ff;
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.7);
  --color-text-muted: rgba(255, 255, 255, 0.5);
  --color-error: #ef4444;
  --color-success: #22c55e;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
  --font-mono: "Courier New", Courier, monospace;
  
  /* Effects */
  --glow-intensity: 0 0 20px rgba(0, 212, 255, 0.5);
  --glow-strong: 0 0 40px rgba(0, 212, 255, 0.8);
  --glow-intense: 0 0 60px rgba(0, 212, 255, 1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
  direction: ltr;
}

/* Ensure all text is visible */
h1, h2, h3, h4, h5, h6, p, span, a, li, label, button, input, textarea, select {
  opacity: 1 !important;
}

h1, h2, h3, h4, h5, h6 {
  color: #ffffff !important;
}

p, span, a, li {
  color: rgba(255, 255, 255, 0.9) !important;
}

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

/* Common Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  padding: var(--spacing-2xl) 0;
  position: relative;
  z-index: 1;
}

/* Flash Messages */
.flash-messages {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 0 var(--spacing-md);
}

.flash-message {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  border: 1px solid transparent;
}

.flash-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
}

.flash-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
  color: var(--color-neon-blue);
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--color-neon-blue);
  margin: var(--spacing-md) auto 0;
  border-radius: 2px;
  box-shadow: var(--glow-intensity);
}

/* Loading & Spinner */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  padding: var(--spacing-2xl);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 212, 255, 0.3);
  border-top-color: var(--color-neon-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Forms */
.registration-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.form-group label {
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: 1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--color-bg-surface);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--color-text-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-neon-blue);
  box-shadow: var(--glow-intensity);
  background: var(--color-bg-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.checkbox-label:hover {
  color: var(--color-neon-blue);
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--color-neon-blue);
}

.submit-btn {
  background: linear-gradient(135deg, var(--color-neon-blue), var(--color-neon-blue-light));
  color: var(--color-bg-primary);
  border: none;
  padding: var(--spacing-md) var(--spacing-2xl);
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--glow-intense);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 212, 255, 1);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-message {
  padding: var(--spacing-md);
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--color-error);
  color: var(--color-error);
}

.form-message.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid var(--color-success);
  color: var(--color-success);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes float-icon {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-15px) rotate(5deg);
  }
  50% {
    transform: translateY(-10px) rotate(0deg);
  }
  75% {
    transform: translateY(-20px) rotate(-5deg);
  }
}

@keyframes glow-pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes glow-sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes modal-appear {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes icon-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 1));
  }
}

@keyframes circuit-pulse {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes node-pulse {
  0%, 100% {
    opacity: 0.6;
    r: 4;
  }
  50% {
    opacity: 1;
    r: 5;
  }
}

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

/* Print Styles */
@media print {
  .three-canvas,
  .join-button-3d,
  .modal-overlay,
  .circuit-footer,
  .header {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
