/* Pipe Game Styles - duct.software */

.pipe-game-wrapper {
  background: #0a0a0f;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
  color: #00d4ff;
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.08), inset 0 0 0 1px #1a1a2e;
  border: 1px solid #1a1a2e;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

.pipe-game-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00d4ff, #7b2ff7, transparent);
  opacity: 0.6;
}

.pipe-game-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 440px;
  align-items: center;
  padding: 0 4px;
}

.pipe-game-timer {
  font-size: 28px;
  font-weight: bold;
  color: #00d4ff;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.pipe-game-timer-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #00a8e8;
  opacity: 0.7;
}

.pipe-game-timer.warning {
  color: #ff3366;
  text-shadow: 0 0 12px rgba(255, 51, 102, 0.6);
  animation: pipe-pulse 0.8s ease-in-out infinite;
}

.pipe-game-level {
  font-size: 14px;
  color: #7b2ff7;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(123, 47, 247, 0.4);
}

.pipe-game-canvas-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 168, 232, 0.15), inset 0 0 0 2px #00a8e8;
}

.pipe-game-canvas {
  display: block;
  cursor: pointer;
  background: #0a0a0f;
}

.pipe-game-canvas-wrap:hover {
  box-shadow: 0 0 40px rgba(0, 168, 232, 0.25), inset 0 0 0 2px #00d4ff;
}

.pipe-game-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.pipe-game-btn {
  background: transparent;
  border: 2px solid #00d4ff;
  color: #00d4ff;
  padding: 10px 28px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: bold;
  position: relative;
  overflow: hidden;
}

.pipe-game-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.15), transparent);
  transition: left 0.4s ease;
}

.pipe-game-btn:hover::before {
  left: 100%;
}

.pipe-game-btn:hover {
  background: rgba(0, 212, 255, 0.08);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.3);
  border-color: #00f0ff;
  color: #00f0ff;
  transform: translateY(-1px);
}

.pipe-game-btn:active {
  transform: translateY(0);
}

.pipe-game-btn.secondary {
  border-color: #7b2ff7;
  color: #7b2ff7;
}

.pipe-game-btn.secondary:hover {
  background: rgba(123, 47, 247, 0.08);
  box-shadow: 0 0 24px rgba(123, 47, 247, 0.3);
  border-color: #9a5fff;
  color: #9a5fff;
}

.pipe-game-btn.danger {
  border-color: #ff3366;
  color: #ff3366;
}

.pipe-game-btn.danger:hover {
  background: rgba(255, 51, 102, 0.08);
  box-shadow: 0 0 24px rgba(255, 51, 102, 0.3);
  border-color: #ff5588;
  color: #ff5588;
}

.pipe-game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(4px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  border-radius: 16px;
  z-index: 10;
  padding: 40px;
  text-align: center;
}

.pipe-game-overlay.active {
  display: flex;
}

.pipe-game-message {
  font-size: 36px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 4px;
  animation: pipe-fade-in-up 0.5s ease-out;
}

.pipe-game-message.victory {
  color: #00d4ff;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.8), 0 0 60px rgba(0, 212, 255, 0.4);
}

.pipe-game-message.defeat {
  color: #ff3366;
  text-shadow: 0 0 30px rgba(255, 51, 102, 0.8), 0 0 60px rgba(255, 51, 102, 0.4);
}

.pipe-game-submessage {
  font-size: 14px;
  color: #8a8aaa;
  letter-spacing: 1px;
  animation: pipe-fade-in-up 0.5s ease-out 0.1s both;
}

.pipe-game-stats {
  display: flex;
  gap: 32px;
  margin: 8px 0;
  animation: pipe-fade-in-up 0.5s ease-out 0.2s both;
}

.pipe-game-stat {
  text-align: center;
}

.pipe-game-stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.pipe-game-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #6a6a8a;
  margin-top: 4px;
}

.pipe-game-hint {
  font-size: 12px;
  color: #5a5a7a;
  text-align: center;
  max-width: 300px;
  line-height: 1.5;
  margin-top: -8px;
}

@keyframes pipe-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes pipe-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .pipe-game-wrapper {
    padding: 16px;
    gap: 12px;
  }
  
  .pipe-game-timer {
    font-size: 22px;
  }
  
  .pipe-game-message {
    font-size: 28px;
  }
  
  .pipe-game-btn {
    padding: 8px 20px;
    font-size: 12px;
  }
  
  .pipe-game-stats {
    gap: 20px;
  }
}
