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

body {
  font-family: 'Inter', sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  overflow: hidden;
  height: 100vh;
}

/* Animação de estrelas */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: 
    radial-gradient(2px 2px at 20px 30px, #eee, transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 90px 40px, #fff, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 160px 30px, #ddd, transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: sparkle 20s linear infinite;
}

@keyframes sparkle {
  from { transform: translateX(0); }
  to { transform: translateX(-200px); }
}

/* Telas */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease-in-out;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.screen.active {
  opacity: 1;
  visibility: visible;
}

/* Tela de Login */
.login-container {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 3rem;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.eva-logo {
  margin-bottom: 2rem;
}

.logo-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(79, 172, 254, 0.4);
  animation: pulse 2s infinite;
}

.logo-text {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff;
}

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

.main-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #e0e0e0;
}

.input-group input {
  width: 100%;
  padding: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: #4facfe;
  box-shadow: 0 0 20px rgba(79, 172, 254, 0.3);
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.btn-primary {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(79, 172, 254, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 1rem 2rem;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.error-message {
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.error-message.show {
  opacity: 1;
}

/* Tela de Cores */
.color-container {
  text-align: center;
  max-width: 800px;
  width: 90%;
}

.screen-title {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.instruction {
  font-size: 1.1rem;
  margin-bottom: 3rem;
  color: #e0e0e0;
}

.color-sequence {
  margin-bottom: 3rem;
}

.color-slots {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.color-slot {
  width: 80px;
  height: 80px;
  border: 3px dashed rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.color-slot.filled {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.5);
}

.color-slot.drop-zone {
  border-color: #4facfe;
  background: rgba(79, 172, 254, 0.2);
}

.color-options {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.color-option {
  width: 100px;
  height: 100px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
}

.color-option:active {
  cursor: grabbing;
}

.color-option:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.color-option span {
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.color-option.dragging {
  opacity: 0.5;
  transform: rotate(5deg);
}

.color-option.placed {
  opacity: 0.3;
  pointer-events: none;
}

/* Tela Hexadecimal */
.hex-container {
  text-align: center;
  max-width: 500px;
  width: 90%;
}

.hex-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 15px;
  padding: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.hex-symbol {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: #4facfe;
  margin-right: 0.5rem;
}

#hex-input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  width: 200px;
  text-align: center;
}

#hex-input:focus {
  outline: none;
}

.color-preview {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 2rem auto;
  border: 3px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  background: #333;
}

/* Tela de Sucesso */
.success-container {
  text-align: center;
  max-width: 600px;
  width: 90%;
}

.success-animation {
  margin-bottom: 2rem;
}

.success-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  animation: successPulse 2s infinite;
  box-shadow: 0 20px 60px rgba(67, 233, 123, 0.4);
}

.checkmark {
  font-size: 3rem;
  color: #fff;
  font-weight: bold;
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.success-title {
  font-family: 'Orbitron', monospace;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #43e97b, #38f9d7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.success-message {
  font-size: 1.2rem;
  margin-bottom: 3rem;
  color: #e0e0e0;
}

.success-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: #4facfe;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.feedback-message {
  margin-top: 1rem;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feedback-message.show {
  opacity: 1;
}

.feedback-message.success {
  color: #43e97b;
}

.feedback-message.error {
  color: #ff6b6b;
}

/* Tela de Xadrez */
.chess-container {
  text-align: center;
  max-width: 700px;
  width: 90%;
}

.chess-story {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: left;
}

.chess-story p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #e0e0e0;
}

.chess-instruction {
  font-weight: 600;
  color: #4facfe !important;
  margin-top: 1.5rem !important;
  text-align: center;
}

.chess-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 15px;
  padding: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

#chess-input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  width: 200px;
  text-align: center;
  letter-spacing: 3px;
}

#chess-input:focus {
  outline: none;
}

#chess-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
  letter-spacing: normal;
}

/* Tela de Reconhecimento Facial */
.facial-container {
  text-align: center;
  max-width: 700px;
  width: 90%;
}

.facial-story {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: left;
}

.facial-story p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #e0e0e0;
}

.facial-instruction {
  font-weight: 600;
  color: #4facfe !important;
  margin-top: 1.5rem !important;
  text-align: center;
}

.facial-scanner {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.scanner-frame {
  width: 200px;
  height: 200px;
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  overflow: hidden;
}

.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #4facfe, transparent);
  animation: scan 2s linear infinite;
}

@keyframes scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(200px); }
}

.scanner-corners {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #4facfe;
}

.corner.top-left {
  top: 10px;
  left: 10px;
  border-right: none;
  border-bottom: none;
}

.corner.top-right {
  top: 10px;
  right: 10px;
  border-left: none;
  border-bottom: none;
}

.corner.bottom-left {
  bottom: 10px;
  left: 10px;
  border-right: none;
  border-top: none;
}

.corner.bottom-right {
  bottom: 10px;
  right: 10px;
  border-left: none;
  border-top: none;
}

.facial-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 15px;
  padding: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

#facial-input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  width: 200px;
  text-align: center;
  letter-spacing: 3px;
}

#facial-input:focus {
  outline: none;
}

#facial-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
  letter-spacing: normal;
}

/* Responsividade */
@media (max-width: 768px) {
  .screen-title {
    font-size: 1.5rem;
  }
  
  .color-slots {
    gap: 0.5rem;
  }
  
  .color-slot {
    width: 60px;
    height: 60px;
  }
  
  .color-option {
    width: 80px;
    height: 80px;
  }
  
  .success-stats {
    gap: 2rem;
  }
  
  .hex-input-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  #hex-input {
    width: 150px;
    font-size: 1.5rem;
  }
}