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

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #000;
  color: #fff;
  overflow: hidden;
  touch-action: none;
}

#app {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-container {
  flex: 1;
  display: flex;
  flex-direction: row;
  position: relative;
}

.right-panel {
  display: flex;
  flex-direction: column;
  width: 400px;
  background: #1a1a1a;
}

.scoreboard {
  background: #1a1a1a;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: 12px;
  flex: 1;
  align-content: start;
}

.score-cell {
  text-align: center;
  padding: 6px 2px;
  background: #2a2a2a;
  border-radius: 4px;
}

.score-cell.header {
  font-weight: 700;
  background: #333;
}

.marks {
  font-size: 18px;
  margin: 4px 0;
  color: #4CAF50;
}

.dartboard-area {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#dartboard {
  max-width: 100%;
  max-height: 100%;
}

.game-container[data-player="player"] #dartboard {
  cursor: crosshair;
}

.game-container[data-player="cpu"] #dartboard {
  cursor: wait;
}

.info-panel {
  background: #1a1a1a;
  padding: 12px;
  border-bottom: 2px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.current-player {
  font-size: 16px;
  font-weight: 700;
}

.round-info {
  font-size: 14px;
  opacity: 0.8;
}

.btn {
  padding: 8px 16px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s;
}

.btn:active {
  transform: scale(0.95);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #1a1a1a;
  padding: 24px;
  border-radius: 8px;
  max-width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin-bottom: 16px;
  font-size: 20px;
}

.modal-content p {
  margin-bottom: 12px;
  line-height: 1.6;
  font-size: 14px;
}

.modal-content ul {
  margin: 12px 0 12px 20px;
}

.modal-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.winner-modal {
  text-align: center;
}

.winner-modal h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #4CAF50;
}

.hit-feedback {
  position: absolute;
  pointer-events: none;
  font-size: 24px;
  font-weight: 700;
  color: #4CAF50;
  animation: hitPop 0.6s forwards;
}

@keyframes hitPop {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(1.5);
  }
}

.color-picker-container {
  display: flex;
  gap: 4px;
  align-items: center;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid #fff;
  cursor: pointer;
  transition: transform 0.1s;
}

.color-swatch:active {
  transform: scale(0.9);
}

.color-swatch.selected {
  border-color: #4CAF50;
  box-shadow: 0 0 8px #4CAF50;
}

