/* Common Variables */
:root {
  --primary-color: #0a0e17;
  --secondary-color: #141b2d;
  --accent-color: #00e5ff;
  --accent-glow: rgba(0, 229, 255, 0.15);
  --text-color: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --neon-glow: 0 0 20px rgba(0, 229, 255, 0.2);
  --glass-background: rgba(20, 27, 45, 0.7);
  --max-width: 1200px;
  --header-height: 80px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* Common Layout */
.page-header {
  text-align: center;
  padding: calc(var(--header-height) + 3rem) 1rem 3rem;
  background: linear-gradient(rgba(10, 14, 23, 0.8), rgba(20, 27, 45, 0.9));
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, #fff, var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.page-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* Common Components */
.glass-panel {
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 229, 255, 0.1);
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    transparent 30%,
    var(--accent-glow) 70%,
    transparent 100%
  );
  opacity: 0;
  transform: translate(-100%, -100%) rotate(0deg);
  transition: transform 0.5s ease-out, opacity 0.3s ease-out;
  pointer-events: none;
}

.glass-panel:hover::before {
  opacity: 0.1;
  transform: translate(0, 0) rotate(45deg);
}

.neon-button {
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: 12px 28px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.neon-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 229, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.neon-button:hover {
  background: var(--accent-color);
  color: var(--primary-color);
  box-shadow: var(--neon-glow);
}

.neon-button:hover::before {
  left: 100%;
}

/* Grid Layouts */
.grid-container {
  display: grid;
  gap: 2rem;
  padding: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  color: var(--text-color);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Card Styles */
.card {
  background: var(--glass-background);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2rem;
  }

  .grid-container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .glass-panel {
    padding: 1.5rem;
  }
}

/* Enhanced Cyber Grid */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(90deg, var(--accent-glow) 1px, transparent 1px),
    linear-gradient(var(--accent-glow) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.15;
  animation: gridPulse 4s ease-in-out infinite;
}

.cyber-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(0, 229, 255, 0.1),
    transparent 70%
  );
  animation: gridGlow 8s ease-in-out infinite;
}

.cyber-grid::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      45deg,
      var(--accent-glow) 0px,
      transparent 1px,
      transparent 30px
    );
  opacity: 0.1;
  animation: diagonalMove 15s linear infinite;
}

/* Grid Animations */
@keyframes gridPulse {
  0%, 100% {
    opacity: 0.15;
    background-size: 30px 30px;
  }
  50% {
    opacity: 0.2;
    background-size: 32px 32px;
  }
}

@keyframes gridGlow {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.2);
  }
}

@keyframes diagonalMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100px 100px;
  }
}

/* Add this class for sections that need an additional grid effect */
.grid-section {
  position: relative;
  overflow: hidden;
}

.grid-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(
      90deg,
      var(--accent-glow) 1px,
      transparent 1px
    ),
    linear-gradient(
      var(--accent-glow) 1px,
      transparent 1px
    );
  background-size: 15px 15px;
  opacity: 0.1;
  transform: perspective(500px) rotateX(60deg);
  transform-origin: top;
  pointer-events: none;
  animation: gridFloat 10s linear infinite;
}

@keyframes gridFloat {
  0% {
    transform: perspective(500px) rotateX(60deg) translateY(0);
  }
  100% {
    transform: perspective(500px) rotateX(60deg) translateY(15px);
  }
}

/* Add hover effects to cards and panels */
.glass-panel:hover .grid-section::before {
  opacity: 0.2;
  animation-duration: 5s;
}