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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  padding: 20px;
}

.game {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  min-width: 600px;
  max-width: 700px;
}

h1 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 2.5rem;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* 所持金表示 */
.balance {
  text-align: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255, 215, 0, 0.2);
  border-radius: 10px;
}

.balance span {
  font-weight: bold;
  color: #ffd700;
  font-size: 1.5rem;
}

/* レーストラック */
.track {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.lane {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 15px;
  border-radius: 10px;
  transition: background 0.3s;
}

.lane.selected {
  background: rgba(255, 215, 0, 0.15);
}

/* 犬選択ラベル */
.dog-select-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.dog-select-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #ffd700;
}

.dog-emoji {
  font-size: 1.5rem;
}

.dog-info {
  width: 100px;
  font-weight: bold;
  font-size: 0.9rem;
}

.lights {
  display: flex;
  gap: 5px;
  flex: 1;
}

.lights span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #333;
  border: 2px solid #555;
  transition: all 0.2s ease-out;
}

.lights span.on {
  background: #ffd700;
  box-shadow: 0 0 10px #ffd700;
}

.goal {
  font-size: 0.8rem;
  font-weight: bold;
  color: #ffd700;
  transition: all 0.3s;
}

/* 勝者のGOAL - 虹色ネオンアニメーション */
@keyframes rainbow-neon {
  0% { color: #ff0000; text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000, 0 0 30px #ff0000; }
  16% { color: #ff8800; text-shadow: 0 0 10px #ff8800, 0 0 20px #ff8800, 0 0 30px #ff8800; }
  33% { color: #ffff00; text-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00, 0 0 30px #ffff00; }
  50% { color: #00ff00; text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00; }
  66% { color: #00ffff; text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 30px #00ffff; }
  83% { color: #8800ff; text-shadow: 0 0 10px #8800ff, 0 0 20px #8800ff, 0 0 30px #8800ff; }
  100% { color: #ff0000; text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000, 0 0 30px #ff0000; }
}

.goal.winner {
  animation: rainbow-neon 1s linear infinite;
}

/* ベッティングエリア */
.betting {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  justify-content: center;
  align-items: center;
}

.betting label {
  cursor: pointer;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background 0.3s;
}

.betting label:hover {
  background: rgba(255, 255, 255, 0.2);
}

.betting input[type="radio"] {
  margin-right: 5px;
  accent-color: #00cec9;
}

/* 結果表示 */
.result {
  text-align: center;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: bold;
  min-height: 50px;
}

.result.win {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

.result.lose {
  background: rgba(225, 112, 85, 0.8);
}

.result.feed {
  background: rgba(255, 107, 107, 0.2);
  border: 2px dashed #ff6b6b;
}

.feed-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.feed-ui .feed-count {
  font-size: 1.2rem;
  color: #fdcb6e;
}

/* ボタン */
.buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
}

.start-btn {
  padding: 15px 50px;
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  color: #fff;
  font-size: 1.3rem;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.start-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(0, 206, 201, 0.5);
}

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

/* ポートフォリオセクション */
.portfolio-section {
  text-align: center;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.portfolio-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.portfolio-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(108, 92, 231, 0.5);
}

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

.portfolio-hint {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #aaa;
}

.feed-btn {
  padding: 15px 40px;
  background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.1s;
}

.feed-btn:hover {
  transform: scale(1.05);
}

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

.feed-count {
  color: #fdcb6e;
  font-weight: bold;
}
