/* Sistema de Design Futurista - Tema Interestelar */
:root {
  /* Cores Principais */
  --space-dark: #0a0a0f;
  --space-darker: #050508;
  --nebula-purple: #6b46c1;
  --nebula-blue: #3b82f6;
  --nebula-cyan: #06b6d4;
  --nebula-pink: #ec4899;
  --star-white: #f8fafc;
  --star-gray: #e2e8f0;
  --cosmic-gold: #f59e0b;
  --cosmic-silver: #94a3b8;
  
  /* Gradientes */
  --gradient-space: linear-gradient(135deg, #0a0a0f 0%, #1e1b4b 50%, #0a0a0f 100%);
  --gradient-nebula: linear-gradient(135deg, #6b46c1 0%, #3b82f6 50%, #06b6d4 100%);
  --gradient-cosmic: linear-gradient(135deg, #ec4899 0%, #6b46c1 50%, #3b82f6 100%);
  --gradient-stellar: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, #6b46c1 100%);
  
  /* Sombras */
  --shadow-cosmic: 0 0 30px rgba(107, 70, 193, 0.3);
  --shadow-nebula: 0 0 40px rgba(59, 130, 246, 0.2);
  --shadow-stellar: 0 0 20px rgba(236, 72, 153, 0.4);
  --shadow-deep-space: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Animações */
@keyframes cosmicFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes nebulaPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes stellarGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(107, 70, 193, 0.3); }
  50% { box-shadow: 0 0 40px rgba(107, 70, 193, 0.6); }
}

@keyframes cosmicDrift {
  0% { transform: translateX(-100px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(100vw); opacity: 0; }
}

@keyframes hologramFlicker {
  0%, 100% { opacity: 1; }
  25% { opacity: 0.8; }
  50% { opacity: 0.9; }
  75% { opacity: 0.7; }
}

/* Classes Utilitárias */
.space-bg {
  background: var(--gradient-space);
  min-height: 100vh;
}

.nebula-gradient {
  background: var(--gradient-nebula);
}

.cosmic-gradient {
  background: var(--gradient-cosmic);
}

.stellar-gradient {
  background: var(--gradient-stellar);
}

.cosmic-card {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(107, 70, 193, 0.3);
  border-radius: 20px;
  box-shadow: var(--shadow-cosmic);
}

.hologram-card {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 15px;
  box-shadow: var(--shadow-nebula);
  animation: hologramFlicker 3s ease-in-out infinite;
}

.cosmic-button {
  background: var(--gradient-nebula);
  border: 1px solid rgba(107, 70, 193, 0.5);
  border-radius: 12px;
  padding: 12px 24px;
  color: var(--star-white);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-cosmic);
  position: relative;
  overflow: hidden;
}

.cosmic-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-stellar);
  border-color: rgba(236, 72, 153, 0.6);
}

.cosmic-button:active {
  transform: translateY(0);
}

.cosmic-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.cosmic-button:hover::before {
  left: 100%;
}

.stellar-button {
  background: var(--gradient-stellar);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 12px;
  padding: 12px 24px;
  color: var(--star-white);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-stellar);
}

.stellar-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
}

.nebula-button {
  background: var(--gradient-nebula);
  border: 1px solid rgba(6, 182, 212, 0.5);
  border-radius: 12px;
  padding: 12px 24px;
  color: var(--star-white);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-nebula);
}

.nebula-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.35);
  border-color: rgba(6, 182, 212, 0.7);
}

.nebula-text {
  background: var(--gradient-nebula);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.cosmic-text {
  background: var(--gradient-cosmic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.stellar-text {
  background: var(--gradient-stellar);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.cosmic-border {
  border: 2px solid transparent;
  background: linear-gradient(var(--space-dark), var(--space-dark)) padding-box,
              var(--gradient-nebula) border-box;
}

.stellar-border {
  border: 2px solid transparent;
  background: linear-gradient(var(--space-dark), var(--space-dark)) padding-box,
              var(--gradient-stellar) border-box;
}

/* Efeitos de Partículas */
.cosmic-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--star-white);
  border-radius: 50%;
  animation: cosmicDrift 20s linear infinite;
}

.particle:nth-child(odd) {
  background: var(--nebula-purple);
  animation-duration: 25s;
}

.particle:nth-child(3n) {
  background: var(--nebula-cyan);
  animation-duration: 30s;
}

/* Efeitos de Holograma */
.hologram-effect {
  position: relative;
  overflow: hidden;
}

.hologram-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.1), transparent);
  animation: hologramScan 3s ease-in-out infinite;
}

@keyframes hologramScan {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Responsividade */
@media (max-width: 768px) {
  .cosmic-card {
    border-radius: 15px;
    padding: 1rem;
  }
  
  .cosmic-button {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--space-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-nebula);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-cosmic);
}

/* === COMPONENTES ESPECÍFICOS PARA JOGOS === */
.game-card {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(107, 70, 193, 0.3);
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 15px 30px rgba(107, 70, 193, 0.2);
}

.score-display {
  background: var(--gradient-nebula);
  color: var(--star-white);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  font-weight: bold;
}

.question-card {
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(107, 70, 193, 0.3);
  border-radius: 16px;
  padding: 24px;
  margin: 16px 0;
  transition: all 0.3s ease;
}

.question-card:hover {
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 10px 25px rgba(107, 70, 193, 0.2);
}

.option-button {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(107, 70, 193, 0.3);
  color: #cbd5e1;
  padding: 12px 20px;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.option-button:hover {
  background: rgba(107, 70, 193, 0.2);
  border-color: #6b46c1;
  color: #f8fafc;
}

.option-button.selected {
  background: var(--gradient-nebula);
  border-color: #6b46c1;
  color: white;
}

.option-button.correct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
  color: white;
}

.option-button.incorrect {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: #ef4444;
  color: white;
}

/* === COMPONENTES PARA FORMULÁRIOS === */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  color: #cbd5e1;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(107, 70, 193, 0.3);
  color: #f8fafc;
  padding: 12px 16px;
  border-radius: 12px;
  width: 100%;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #6b46c1;
  box-shadow: 0 0 20px rgba(107, 70, 193, 0.3);
}

.form-textarea {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(107, 70, 193, 0.3);
  color: #f8fafc;
  padding: 12px 16px;
  border-radius: 12px;
  width: 100%;
  min-height: 120px;
  resize: vertical;
  transition: all 0.3s ease;
}

.form-textarea:focus {
  outline: none;
  border-color: #6b46c1;
  box-shadow: 0 0 20px rgba(107, 70, 193, 0.3);
}

/* === COMPONENTES PARA TABELAS === */
.data-table {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(107, 70, 193, 0.3);
}

.data-table th {
  background: rgba(107, 70, 193, 0.2);
  color: #f8fafc;
  padding: 16px;
  font-weight: 600;
  text-align: left;
}

.data-table td {
  color: #cbd5e1;
  padding: 16px;
  border-bottom: 1px solid rgba(107, 70, 193, 0.1);
}

.data-table tr:hover {
  background: rgba(107, 70, 193, 0.1);
}

/* === COMPONENTES PARA FEEDBACK === */
.feedback-panel {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(107, 70, 193, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
}

.feedback-success {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.feedback-error {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.feedback-warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.feedback-info {
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
}

/* === NAVEGAÇÃO CÓSMICA === */
.cosmic-nav {
  background: rgba(5, 5, 8, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(107, 70, 193, 0.3);
}

.nav-link {
  color: #cbd5e1;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #f8fafc;
  text-shadow: 0 0 10px rgba(107, 70, 193, 0.6);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-nebula);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* === COMPONENTES PARA MISSÕES === */
.mission-card {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(107, 70, 193, 0.3);
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mission-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 20px 40px rgba(107, 70, 193, 0.3);
}

.mission-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.1), transparent);
  transition: left 0.6s;
}

.mission-card:hover::before {
  left: 100%;
}

.mission-icon {
  font-size: 3rem;
  filter: drop-shadow(0 0 20px rgba(107, 70, 193, 0.6));
  animation: cosmicFloat 4s ease-in-out infinite;
}

.mission-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mission-description {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
}

.status-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gradient-nebula);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  animation: nebulaPulse 2s ease-in-out infinite;
}
