:root {
  --primary-color: #2c3e50;
  --accent-color: #3498db;
  --bg-color: #f5f5f5;
  --text-color: #333;
  --card-bg: #fff;
  --button-primary: #8e44ad;
  --button-secondary: #7f8c8d;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

header {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 0;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  width: 100%;
}

.container {
  padding: 10px;
  flex: 1;
}

.game-container {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1, h2, h3 {
  color: var(--primary-color);
}

h1 {
  margin: 0;
}

h2 {
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-color);
  font-size: 1.4rem;
}

.mode-selector {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

.mode-btn {
  padding: 8px 16px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.mode-btn.active {
  background-color: var(--button-primary);
  font-weight: bold;
}

.mode-btn:hover {
  background-color: var(--button-primary);
}

.board {
  display: grid;
  grid-template-columns: repeat(15, 30px);
  grid-template-rows: repeat(15, 30px);
  gap: 0;
  margin-bottom: 20px;
  background-color: #E6C588;
  position: relative;
  border: 2px solid #8B4513;
}

.cell {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
}

.cell::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  background-color: #8B4513;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.cell::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 100%;
  background-color: #8B4513;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.stone {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  z-index: 2;
  position: relative;
}

.stone.black {
  background-color: #000;
  box-shadow: inset 5px 5px 10px rgba(255, 255, 255, 0.3);
}

.stone.white {
  background-color: #fff;
  box-shadow: inset -3px -3px 5px rgba(0, 0, 0, 0.2);
}

.game-info {
  margin-top: 20px;
  text-align: left;
}

.section {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 15px;
  margin-bottom: 15px;
}

h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

ul {
  padding-left: 20px;
  margin: 10px 0;
}

li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 15px 0;
  margin-top: 20px;
  width: 100%;
  font-size: 0.8rem;
}

button.restart-btn {
  padding: 10px 20px;
  background-color: var(--button-primary);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button.restart-btn:hover {
  background-color: #7d3c98;
}

.win-stone {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}
