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

body {
  font-family: 'Azeret Mono', monospace;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  min-height: 100vh;
  color: #fff;
  overflow-x: hidden;
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

/* Start Screen */
.start-screen {
  background: radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
}

.glitch-container {
  position: relative;
  margin-bottom: 2rem;
}

.title {
  font-family: 'Azeret Mono', monospace;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  text-align: center;
  color: #00ff88;
  text-shadow: 
    0 0 10px rgba(0, 255, 136, 0.8),
    0 0 20px rgba(0, 255, 136, 0.6),
    0 0 30px rgba(0, 255, 136, 0.4);
  animation: glitch 3s infinite;
  letter-spacing: 0.1em;
}

@keyframes glitch {
  0%, 90%, 100% {
    transform: translate(0);
  }
  92% {
    transform: translate(-2px, 2px);
  }
  94% {
    transform: translate(2px, -2px);
  }
  96% {
    transform: translate(-2px, -2px);
  }
  98% {
    transform: translate(2px, 2px);
  }
}

.subtitle {
  font-size: 1.5rem;
  font-weight: 100;
  text-align: center;
  margin-bottom: 3rem;
  color: #a0a0ff;
  letter-spacing: 0.2em;
}

.instructions {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(0, 255, 136, 0.3);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  max-width: 500px;
}

.instructions p {
  font-size: 1.1rem;
  margin: 1rem 0;
  font-weight: 400;
}

.btn-start {
  font-family: 'Azeret Mono', monospace;
  font-size: 1.5rem;
  font-weight: 900;
  padding: 1.5rem 4rem;
  background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
  color: #0f0c29;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
  letter-spacing: 0.1em;
}

.btn-start:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 255, 136, 0.7);
}

.btn-start:active {
  transform: translateY(-1px) scale(1.02);
}

/* Game Screen */
.game-screen {
  justify-content: flex-start;
  padding-top: 4rem;
}

.game-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  margin-bottom: 3rem;
  font-family: 'Space Mono', monospace;
}

.challenge-counter {
  font-size: 1.2rem;
  color: #a0a0ff;
  font-weight: 700;
}

.timer {
  font-size: 2rem;
  color: #00ff88;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
}

.captcha-wrapper {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 255, 136, 0.3);
  border-radius: 16px;
  padding: 3rem;
  max-width: 600px;
  width: 100%;
  position: relative;
}

.shake {
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.success-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 255, 136, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  color: #00ff88;
  z-index: 100;
  border-radius: 16px;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.captcha-question {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #00ff88;
  font-weight: 400;
}

.captcha-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

/* Distorted Text */
.captcha-canvas {
  border: 2px solid rgba(0, 255, 136, 0.5);
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  height: auto;
}

.captcha-form {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
}

.captcha-input {
  flex: 1;
  font-family: 'Space Mono', monospace;
  font-size: 1.2rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  color: #fff;
  text-align: center;
  letter-spacing: 0.3em;
}

.captcha-input:focus {
  outline: none;
  border-color: #00ff88;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.btn-submit {
  font-family: 'Azeret Mono', monospace;
  font-weight: 900;
  padding: 1rem 2rem;
  background: #00ff88;
  color: #0f0c29;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
  letter-spacing: 0.1em;
}

.btn-submit:hover:not(:disabled) {
  background: #00cc6a;
  transform: translateY(-2px);
}

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

/* Image Grid */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 400px;
}

.image-cell {
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  cursor: pointer;
  transition: all 0.2s;
}

.image-cell:hover {
  transform: scale(1.05);
  border-color: #00ff88;
}

.image-cell.selected {
  background: rgba(0, 255, 136, 0.2);
  border-color: #00ff88;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

/* Arrows */
.arrow-display {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.arrow-symbol {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.3);
  transition: all 0.3s;
}

.arrow-symbol.completed {
  color: #00ff88;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
}

.arrow-input {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 300px;
}

.arrow-btn {
  font-size: 3rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.arrow-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: #00ff88;
  transform: scale(1.1);
}

/* Math */
.math-equation {
  font-family: 'Space Mono', monospace;
  font-size: 3rem;
  font-weight: 700;
  color: #00ff88;
  margin-bottom: 2rem;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Slider */
.slider-container {
  width: 100%;
  max-width: 400px;
}

.slider-track {
  position: relative;
  height: 100px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.slider-target {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 80px;
  background: rgba(0, 255, 136, 0.3);
  border: 2px dashed #00ff88;
  border-radius: 4px;
}

.slider-piece {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  cursor: grab;
}

.slider-input {
  width: 100%;
  height: 40px;
  -webkit-appearance: none;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  background: #00ff88;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.slider-input::-moz-range-thumb {
  width: 30px;
  height: 30px;
  background: #00ff88;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Results Screen */
.results-screen {
  padding: 2rem;
}

.results-title {
  font-family: 'Azeret Mono', monospace;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  color: #00ff88;
  margin-bottom: 3rem;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
  letter-spacing: 0.1em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
  margin-bottom: 3rem;
}

.stat-card {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 255, 136, 0.3);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: #00ff88;
  box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.stat-value {
  font-family: 'Space Mono', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: #00ff88;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: #a0a0ff;
  font-weight: 400;
}

.performance-section {
  width: 100%;
  max-width: 900px;
  margin-bottom: 3rem;
}

.speed-rating {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 255, 136, 0.3);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.speed-rating .label {
  font-size: 1rem;
  color: #a0a0ff;
  margin-bottom: 1rem;
}

.speed-rating .value {
  font-size: 2rem;
  font-weight: 700;
  color: #00ff88;
}

.human-verdict {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 255, 136, 0.3);
  border-radius: 12px;
  padding: 2rem;
}

.gauge {
  width: 100%;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff0044 0%, #ffaa00 50%, #00ff88 100%);
  transition: width 1s ease;
  border-radius: 20px;
}

.verdict-text {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: #00ff88;
}

.time-breakdown {
  width: 100%;
  max-width: 900px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 255, 136, 0.3);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
}

.time-breakdown h3 {
  font-size: 1.5rem;
  color: #00ff88;
  margin-bottom: 1.5rem;
  text-align: center;
}

.time-bar {
  margin-bottom: 1rem;
}

.time-label {
  font-size: 0.9rem;
  color: #a0a0ff;
  margin-bottom: 0.5rem;
}

.bar-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bar-fill {
  height: 30px;
  background: linear-gradient(90deg, #00ff88 0%, #00cc6a 100%);
  border-radius: 15px;
  min-width: 40px;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.time-value {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  color: #fff;
  white-space: nowrap;
}

.btn-play-again {
  font-family: 'Azeret Mono', monospace;
  font-size: 1.3rem;
  font-weight: 900;
  padding: 1.2rem 3rem;
  background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
  color: #0f0c29;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.btn-play-again:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 255, 136, 0.7);
}

.footer {
  margin-top: auto;
  padding: 2rem;
  text-align: center;
}

.footer a {
  color: #a0a0ff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.footer a:hover {
  color: #00ff88;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .image-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .captcha-wrapper {
    padding: 2rem;
  }
  
  .arrow-display {
    gap: 0.5rem;
  }
  
  .arrow-symbol {
    font-size: 2rem;
  }
}