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

body {
  font-family: "Arial", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 20px;
  max-width: 450px;
  width: 100%;
}

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

.game-header h1 {
  color: #333;
  margin-bottom: 15px;
  font-size: 2em;
}

.game-info {
  display: flex;
  justify-content: space-between;
  background: #f8f9fa;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: bold;
  color: #555;
}

.game-area {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

#gameCanvas {
  border: 3px solid #ddd;
  border-radius: 10px;
  background: #f0f8ff;
  cursor: crosshair;
}

.game-line {
  position: absolute;
  top: 80px;
  left: 3px;
  right: 3px;
  height: 2px;
  background: #ff4757;
  border-radius: 1px;
  opacity: 0.7;
}

.game-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.game-controls button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

#pauseBtn {
  background: #ffa502;
  color: white;
}

#pauseBtn:hover {
  background: #ff7675;
}

#resetBtn {
  background: #70a1ff;
  color: white;
}

#resetBtn:hover {
  background: #5352ed;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
  color: #333;
  margin-bottom: 15px;
}

.modal-content p {
  font-size: 18px;
  margin-bottom: 20px;
  color: #666;
}

#restartBtn {
  padding: 12px 24px;
  background: #2ed573;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

#restartBtn:hover {
  background: #26d0ce;
}

@media (max-width: 480px) {
  .game-container {
    margin: 10px;
    padding: 15px;
  }

  #gameCanvas {
    width: 100%;
    max-width: 350px;
    height: auto;
  }

  .game-info {
    font-size: 14px;
    padding: 8px 15px;
  }

  .game-controls button {
    padding: 10px 20px;
    font-size: 14px;
  }
}
