/* Custom styles for CTF training page */
:root {
  --bg-dark: #0a0e17;
  --bg-darker: #050709;
  --accent-red: #ff3547;
  --accent-blue: #00d8ff;
  --text-glow: 0 0 10px rgba(0, 216, 255, 0.7);
}

@keyframes glitch {
  0% {
    text-shadow: 0.05em 0 0 var(--accent-red), -0.05em -0.025em 0 var(--accent-blue);
  }
  14% {
    text-shadow: 0.05em 0 0 var(--accent-red), -0.05em -0.025em 0 var(--accent-blue);
  }
  15% {
    text-shadow: -0.05em -0.025em 0 var(--accent-red), 0.025em 0.025em 0 var(--accent-blue);
  }
  49% {
    text-shadow: -0.05em -0.025em 0 var(--accent-red), 0.025em 0.025em 0 var(--accent-blue);
  }
  50% {
    text-shadow: 0.025em 0.05em 0 var(--accent-red), 0.05em 0 0 var(--accent-blue);
  }
  99% {
    text-shadow: 0.025em 0.05em 0 var(--accent-red), 0.05em 0 0 var(--accent-blue);
  }
  100% {
    text-shadow: -0.025em 0 0 var(--accent-red), -0.025em -0.025em 0 var(--accent-blue);
  }
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent }
}

.terminal-text {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent-blue);
  animation: typing 3.5s steps(40, end), blink .75s step-end infinite;
}

.glitch-text {
  animation: glitch 1.5s infinite alternate-reverse;
}

.cyber-badge {
  background: linear-gradient(135deg, rgba(0, 216, 255, 0.2), rgba(255, 53, 71, 0.2));
  border: 1px solid rgba(0, 216, 255, 0.3);
}

.cyber-badge-difficult {
  background: linear-gradient(135deg, rgba(255, 53, 71, 0.3), rgba(255, 53, 71, 0.1));
  border: 1px solid rgba(255, 53, 71, 0.5);
}

.cyber-card {
  transition: all 0.3s ease;
  background: rgba(10, 14, 23, 0.7);
  border: 1px solid rgba(0, 216, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 216, 255, 0.1);
  overflow: hidden;
}

.cyber-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0, 216, 255, 0.3);
  border: 1px solid rgba(0, 216, 255, 0.3);
}

.cyber-card:hover .card-title {
  color: var(--accent-blue);
  text-shadow: var(--text-glow);
}

.bg-cyber {
  background-color: var(--bg-dark);
  background-image: linear-gradient(rgba(10, 14, 23, 0.9), rgba(10, 14, 23, 0.95)), url('../images/bg-pattern.png');
  background-size: cover;
  background-attachment: fixed;
}

.cyber-progress-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-red));
  box-shadow: 0 0 10px rgba(0, 216, 255, 0.5);
}

.countdown-box {
  background: rgba(5, 7, 9, 0.7);
  border: 1px solid rgba(0, 216, 255, 0.3);
}

.countdown-number {
  color: var(--accent-blue);
  text-shadow: var(--text-glow);
  font-family: monospace;
}

.leaderboard-row:hover {
  background: rgba(0, 216, 255, 0.1);
  cursor: pointer;
}

.code-terminal {
  background: var(--bg-darker);
  border: 1px solid rgba(0, 216, 255, 0.3);
  font-family: monospace;
}

.challenge-modal {
  background: rgba(10, 14, 23, 0.95);
  border: 1px solid rgba(0, 216, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.modal-backdrop {
  background: rgba(5, 7, 9, 0.8);
  backdrop-filter: blur(5px);
}

.glow-text {
  color: var(--accent-blue);
  text-shadow: var(--text-glow);
}

.glow-red-text {
  color: var(--accent-red);
  text-shadow: 0 0 10px rgba(255, 53, 71, 0.7);
}

.flag-input {
  background: rgba(10, 14, 23, 0.7);
  border: 1px solid rgba(0, 216, 255, 0.3);
  color: white;
  font-family: monospace;
}

.flag-input:focus {
  border: 1px solid var(--accent-blue);
  box-shadow: 0 0 10px rgba(0, 216, 255, 0.3);
  outline: none;
}

.cyber-btn {
  background: linear-gradient(135deg, rgba(0, 216, 255, 0.1), rgba(0, 216, 255, 0.05));
  border: 1px solid rgba(0, 216, 255, 0.3);
  color: var(--accent-blue);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  text-shadow: var(--text-glow);
}

.cyber-btn:hover {
  background: linear-gradient(135deg, rgba(0, 216, 255, 0.2), rgba(0, 216, 255, 0.1));
  box-shadow: 0 0 15px rgba(0, 216, 255, 0.3);
  transform: translateY(-2px);
}

.cyber-btn-danger {
  background: linear-gradient(135deg, rgba(255, 53, 71, 0.1), rgba(255, 53, 71, 0.05));
  border: 1px solid rgba(255, 53, 71, 0.3);
  color: var(--accent-red);
  text-shadow: 0 0 10px rgba(255, 53, 71, 0.7);
}

.cyber-btn-danger:hover {
  background: linear-gradient(135deg, rgba(255, 53, 71, 0.2), rgba(255, 53, 71, 0.1));
  box-shadow: 0 0 15px rgba(255, 53, 71, 0.3);
  transform: translateY(-2px);
}

.discord-widget {
  background: rgba(114, 137, 218, 0.1);
  border: 1px solid rgba(114, 137, 218, 0.3);
}

/* Progress bar animation */
@keyframes progressAnimation {
  0% { width: 0%; }
  100% { width: 30%; }
}

.animate-progress {
  animation: progressAnimation 3s forwards;
}