@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

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

body {
  font-family: 'Orbitron', monospace;
  background: #0a0a0a;
  color: #00ffcc;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  touch-action: manipulation;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0, 255, 204, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 0, 150, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
}

.header {
  text-align: center;
  margin-bottom: 20px;
}

.title {
  font-size: clamp(1.8em, 5vw, 3.5em);
  font-weight: 900;
  color: #00ffcc;
  text-shadow: 
    0 0 5px #00ffcc,
    0 0 10px #00ffcc,
    0 0 20px #00ffcc,
    0 0 40px #00ffcc;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.subtitle {
  font-size: clamp(0.8em, 3vw, 1.2em);
  color: #ff0096;
  font-weight: 700;
  letter-spacing: 3px;
  text-shadow: 0 0 10px #ff0096;
}

.game-info {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.info-panel {
  background: rgba(0, 255, 204, 0.05);
  border: 2px solid #00ffcc;
  border-radius: 10px;
  padding: 10px 20px;
  text-align: center;
  box-shadow: 
    0 0 20px rgba(0, 255, 204, 0.3),
    inset 0 0 20px rgba(0, 255, 204, 0.1);
  position: relative;
  overflow: hidden;
  min-width: 80px;
}

.info-panel::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00ffcc, #ff0096, #00ffcc);
  border-radius: 10px;
  z-index: -1;
  animation: borderPulse 3s ease-in-out infinite;
}

@keyframes borderPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

.info-label {
  font-size: 0.8em;
  color: #888;
  margin-bottom: 5px;
  font-weight: 700;
}

.info-value {
  font-size: clamp(1.2em, 4vw, 1.8em);
  font-weight: 900;
  color: #00ffcc;
  text-shadow: 0 0 10px #00ffcc;
}

.instructions {
  text-align: center;
  margin-bottom: 20px;
  padding: 0 10px;
}

.instruction-text {
  font-size: clamp(0.8em, 2.5vw, 1.1em);
  color: #ffff00;
  background: rgba(255, 255, 0, 0.1);
  padding: 10px 20px;
  border-radius: 20px;
  border: 1px solid #ffff00;
  display: inline-block;
  text-shadow: 0 0 5px #ffff00;
  animation: instructionGlow 2s ease-in-out infinite alternate;
}

@keyframes instructionGlow {
  from { box-shadow: 0 0 10px rgba(255, 255, 0, 0.3); }
  to { box-shadow: 0 0 20px rgba(255, 255, 0, 0.6); }
}

.canvas-container {
  text-align: center;
  margin-bottom: 20px;
  padding: 0 10px;
}

canvas {
  border: 3px solid #00ffcc;
  background: radial-gradient(circle at center, #1a1a2e 0%, #0f0f1a 100%);
  border-radius: 15px;
  box-shadow: 
    0 0 30px rgba(0, 255, 204, 0.5),
    inset 0 0 30px rgba(0, 255, 204, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%;
  height: auto;
  touch-action: none;
}

canvas:hover {
  box-shadow: 
    0 0 40px rgba(0, 255, 204, 0.7),
    inset 0 0 40px rgba(0, 255, 204, 0.2);
}

/* Correct Order Table Styles */
.correct-order-container {
  margin: 20px auto;
  max-width: 900px;
  padding: 0 10px;
}

.correct-order-title {
  font-size: clamp(1em, 3vw, 1.3em);
  color: #ffff00;
  text-align: center;
  margin-bottom: 15px;
  text-shadow: 0 0 10px #ffff00;
  font-weight: 700;
  letter-spacing: 2px;
}

.table-container {
  overflow-x: auto;
  border-radius: 15px;
  background: rgba(0, 255, 204, 0.05);
  border: 2px solid #00ffcc;
  box-shadow: 
    0 0 20px rgba(0, 255, 204, 0.3),
    inset 0 0 20px rgba(0, 255, 204, 0.1);
}

.correct-order-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Orbitron', monospace;
}

.correct-order-table td {
  padding: 15px 10px;
  text-align: center;
  border: 2px solid rgba(0, 255, 204, 0.3);
  position: relative;
  font-weight: 700;
  font-size: clamp(0.8em, 2.5vw, 1em);
  min-width: 80px;
}

.step-cell {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  color: #fff;
  text-shadow: 0 0 5px currentColor;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.step-cell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.step-cell:hover::before {
  transform: translateX(100%);
}

.step-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
}

.step-number {
  display: block;
  font-size: 0.8em;
  color: #00ffcc;
  margin-bottom: 5px;
  text-shadow: 0 0 5px #00ffcc;
}

.step-name {
  display: block;
  font-weight: 900;
  letter-spacing: 1px;
}

/* Color coding for different steps */
.step-cell[data-step="BUILD"] { border-color: #00ffcc; color: #00ffcc; }
.step-cell[data-step="CODE"] { border-color: #ff0096; color: #ff0096; }
.step-cell[data-step="PLAN"] { border-color: #00ccff; color: #00ccff; }
.step-cell[data-step="TEST"] { border-color: #ffff00; color: #ffff00; }
.step-cell[data-step="SECURITY"] { border-color: #ff6600; color: #ff6600; }
.step-cell[data-step="PACKAGE"] { border-color: #ff6600; color: #ff6600; }
.step-cell[data-step="DEPLOY"] { border-color: #00ff00; color: #00ff00; }
.step-cell[data-step="RELEASE"] { border-color: #ff3300; color: #ff3300; }
.step-cell[data-step="MONITOR"] { border-color: #9900ff; color: #9900ff; }

.status-message {
  text-align: center;
  font-size: clamp(0.9em, 3vw, 1.2em);
  font-weight: 700;
  margin-bottom: 20px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 255, 204, 0.1);
  border: 1px solid #00ffcc;
  text-shadow: 0 0 5px currentColor;
  margin: 0 10px 20px 10px;
}

.status-message.success {
  color: #00ff00;
  background: rgba(0, 255, 0, 0.1);
  border-color: #00ff00;
  animation: successPulse 0.5s ease-in-out;
}

.status-message.error {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
  border-color: #ff4444;
  animation: errorShake 0.5s ease-in-out;
}

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

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.control-panel {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  padding: 0 10px;
}

.cyber-button {
  background: linear-gradient(45deg, #1a1a2e, #16213e);
  border: 2px solid #00ffcc;
  color: #00ffcc;
  padding: 12px 20px;
  font-family: 'Orbitron', monospace;
  font-size: clamp(0.8em, 2.5vw, 1em);
  font-weight: 700;
  cursor: pointer;
  border-radius: 25px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 
    0 0 20px rgba(0, 255, 204, 0.3),
    inset 0 0 20px rgba(0, 255, 204, 0.1);
  min-width: 120px;
  touch-action: manipulation;
}

.cyber-button:hover {
  background: linear-gradient(45deg, #00ffcc, #00ccaa);
  color: #0a0a0a;
  transform: translateY(-2px);
  box-shadow: 
    0 5px 25px rgba(0, 255, 204, 0.5),
    inset 0 0 30px rgba(0, 255, 204, 0.2);
}

.cyber-button:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 15px rgba(0, 255, 204, 0.4),
    inset 0 0 20px rgba(0, 255, 204, 0.3);
}

.cyber-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 ease;
}

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

.button-text {
  position: relative;
  z-index: 1;
}

.cyber-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: linear-gradient(45deg, #333, #555);
  border-color: #666;
  color: #666;
}

.cyber-button:disabled:hover {
  transform: none;
  background: linear-gradient(45deg, #333, #555);
  color: #666;
  box-shadow: 
    0 0 20px rgba(102, 102, 102, 0.3),
    inset 0 0 20px rgba(102, 102, 102, 0.1);
}

/* Mobile specific styles */
@media (max-width: 768px) {
  .container {
    padding: 5px;
  }
  
  .game-info {
    gap: 10px;
  }
  
  .info-panel {
    padding: 8px 15px;
    min-width: 70px;
  }
  
  .control-panel {
    gap: 8px;
  }
  
  .cyber-button {
    padding: 10px 15px;
    min-width: 100px;
  }
  
  canvas {
    border-width: 2px;
  }
  
  .correct-order-table td {
    padding: 10px 5px;
    font-size: clamp(0.7em, 2vw, 0.9em);
  }
  
  .table-container {
    border-width: 1px;
  }
}

@media (max-width: 480px) {
  .control-panel {
    flex-direction: column;
    align-items: center;
  }
  
  .cyber-button {
    width: 200px;
  }
  
  .correct-order-table td {
    padding: 8px 3px;
    min-width: 60px;
  }
  
  .step-number {
    font-size: 0.7em;
    margin-bottom: 3px;
  }
}

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

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #00ffcc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00ccaa;
}
