/* リセットとベース設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #030213;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
}

/* メインコンテナ */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ヘッダー */
.header {
  text-align: center;
  margin-bottom: 48px;
  padding: 32px 0;
}

.game-title {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-subtitle {
  font-size: 1.125rem;
  color: #717182;
  font-weight: 400;
}

/* メインコンテンツ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* ウェルカムセクション */
.welcome-section {
  text-align: center;
  max-width: 600px;
}

#welcome-message {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 16px;
  color: #030213;
}

.description {
  font-size: 1rem;
  color: #717182;
  font-weight: 400;
}

/* ボタンセクション */
.button-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 320px;
}

.menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #f3f3f5;
  color: #030213;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 56px;
}

.menu-button:hover {
  background: #ffffff;
  border-color: #030213;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(3, 2, 19, 0.1);
}

.button-icon {
  font-size: 1.25rem;
}

/* プロフィールボタンの認証状態 */
.profile-btn.authenticated {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

.profile-btn.authenticated:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

/* バトルボタン */
.battle-btn {
  background: #030213;
  color: #ffffff;
  border-color: #030213;
}

.battle-btn:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
}

/* ゲームルール */
.game-rules {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
}

.game-rules h3 {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 16px;
  color: #030213;
  text-align: center;
}

.rules-list {
  list-style: none;
  counter-reset: step-counter;
}

.rules-list li {
  counter-increment: step-counter;
  position: relative;
  padding: 8px 0 8px 40px;
  color: #717182;
  font-weight: 400;
}

.rules-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 8px;
  width: 24px;
  height: 24px;
  background: #3b82f6;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
}

/* フッター */
.footer {
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid #e2e8f0;
  margin-top: 48px;
}

.footer p {
  color: #717182;
  font-size: 0.875rem;
  font-weight: 400;
}

/* ローディング */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  z-index: 1000;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  .game-title {
    font-size: 2rem;
  }

  .main-content {
    gap: 32px;
  }

  .button-section {
    max-width: 280px;
  }

  .menu-button {
    padding: 14px 20px;
    min-height: 52px;
  }
}

@media (max-width: 480px) {
  .game-title {
    font-size: 1.75rem;
  }

  .game-subtitle {
    font-size: 1rem;
  }

  #welcome-message {
    font-size: 1.25rem;
  }

  .button-section {
    max-width: 100%;
  }
}
