/* 共通スタイル - 歯科衛生士診断サイト */

/* フォント読み込み */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700;800&display=swap');

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

body {
  font-family: 'M PLUS Rounded 1c', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
  background: linear-gradient(180deg, #A7D1E9 0%, #B8D2E5 50%, #FCD5DE 100%);
  min-height: 100vh;
  color: #333;
  overflow-x: hidden;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 5px 20px;
}

/* ヘッダー */
header {
  text-align: center;
  padding: 5px 0;
}

h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #2C5F8D;
  margin-bottom: 0px;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3D7EAA;
  margin-bottom: 20px;
}

/* TOPページ専用 */
.top-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.top-image-container {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.top-image-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* ボタン共通 */
.btn-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 400px;
  margin: 30px auto;
}

button, .btn {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 18px 40px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  display: block;
  text-align: center;
}

.primary-btn {
  background: linear-gradient(135deg, #FF6B9D 0%, #FFA07A 100%);
  color: white;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.secondary-btn {
  background: linear-gradient(135deg, #80BFFF 0%, #B3D9FF 100%);
  color: white;
}

.secondary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(128, 191, 255, 0.4);
}

.top-btn {
  background: linear-gradient(135deg, #A7D1E9 0%, #87CEEB 100%);
  color: white;
  font-size: 1.2rem;
  padding: 15px 60px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(167, 209, 233, 0.3);
}

.top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(167, 209, 233, 0.5);
}

.back-btn {
  background: #E0E0E0;
  color: #666;
  font-size: 1rem;
  padding: 12px 30px;
  margin-top: 20px;
}

.back-btn:hover {
  background: #D0D0D0;
  transform: translateY(-2px);
}

/* カード */
.card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  margin: 20px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* 選択カード（属性選択ページ） */
.select-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 5px 0;
}

.select-card {
  background: white;
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border: 3px solid transparent;
}

.select-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  border-color: #FF6B9D;
}

.select-card .icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
}

.select-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2C5F8D;
  margin-bottom: 10px;
}

.select-card p {
  font-size: 1rem;
  color: #666;
}

/* 質問ページ */
.progress-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 30px;
}

.progress-text {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #2C5F8D;
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF6B9D 0%, #FFA07A 100%);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.question-container {
  background: white;
  border-radius: 20px;
  padding: 40px;
  margin: 30px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.question-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2C5F8D;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.6;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.choice-btn {
  background: linear-gradient(135deg, #F0F8FF 0%, #E6F3FF 100%);
  color: #2C5F8D;
  padding: 20px 30px;
  border-radius: 15px;
  font-size: 1.1rem;
  text-align: left;
  border: 3px solid transparent;
  transition: all 0.3s ease;
}

.choice-btn:active {
  background: linear-gradient(135deg, #B3D9FF 0%, #80BFFF 100%);
  color: white;
  border-color: #3D7EAA;
  transform: scale(0.98);
}

/* 結果ページ */
.result-container {
  background: white;
  border-radius: 20px;
  padding: 40px;
  margin: 30px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.character-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 20px;
  margin: 20px auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.type-name {
  font-size: 2rem;
  font-weight: 800;
  color: #2C5F8D;
  margin: 20px 0;
}

.mbti-type {
  font-size: 1.2rem;
  font-weight: 700;
  color: #666;
  margin-bottom: 10px;
}

.catchphrase {
  font-size: 1.3rem;
  font-weight: 700;
  color: #FF6B9D;
  margin: 20px 0;
  padding: 15px 30px;
  background: linear-gradient(135deg, #FFF0F5 0%, #FFE6F0 100%);
  border-radius: 50px;
  display: inline-block;
}

.description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
  margin: 30px 0;
  text-align: left;
  padding: 20px;
  background: #F9F9F9;
  border-radius: 15px;
}

/* レーダーチャート */
.radar-container {
  margin: 40px 0;
  padding: 40px 20px;
  background: #F9F9F9;
  border-radius: 15px;
  overflow: visible;
}

.radar-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2C5F8D;
  text-align: center;
  margin-bottom: 20px;
}

#radarChart {
  max-width: 100%;
  width: 400px;
  height: 400px;
  margin: 0 auto;
  display: block;
}

@media (max-width: 768px) {
  #radarChart {
    width: 100%;
    height: auto;
  }
}

/* リスト */
.info-section {
  text-align: left;
  margin: 30px 0;
  padding: 25px;
  background: linear-gradient(135deg, #F0F8FF 0%, #E6F3FF 100%);
  border-radius: 15px;
}

.info-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2C5F8D;
  margin-bottom: 15px;
}

.info-section ul {
  list-style: none;
  padding-left: 0;
}

.info-section li {
  padding: 10px 15px;
  margin: 8px 0;
  background: white;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #444;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  line-height: 1.4;
}

.info-section li::before {
  content: '✓ ';
  color: #FF6B9D;
  font-weight: bold;
  margin-right: 8px;
}

/* シェアボタン */
.share-container {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 30px 0;
  flex-wrap: wrap;
}

/* 画像プレビュー */
.image-preview-container {
  margin: 40px 0;
  padding: 30px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* LINE誘導ボタン（特に目立つデザイン） */
.line-cta-btn {
  background: linear-gradient(135deg, #00C300 0%, #00A000 100%);
  color: white;
  font-size: 1.3rem;
  font-weight: 800;
  padding: 20px 50px;
  border-radius: 50px;
  margin: 30px auto;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 195, 0, 0.3);
  animation: pulse 2s infinite;
}

.line-cta-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 195, 0, 0.4);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* 結果一覧グリッド */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.result-item {
  background: white;
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  display: block;
}

.result-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.result-item img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 15px;
}

.result-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2C5F8D;
  margin-bottom: 5px;
}

.result-item p {
  font-size: 0.9rem;
  color: #666;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .container {
    padding: 15px;
  }

  button, .btn {
    font-size: 1rem;
    padding: 15px 30px;
  }

  .select-card {
    padding: 30px 20px;
  }

  .select-card .icon {
    font-size: 3rem;
  }

  .question-text {
    font-size: 1.2rem;
  }

  .type-name {
    font-size: 1.6rem;
  }

  .results-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.4rem;
  }

  .btn-container {
    max-width: 100%;
  }

  .choice-btn {
    font-size: 1rem;
    padding: 15px 20px;
  }

  .line-cta-btn {
    font-size: 1.1rem;
    padding: 18px 40px;
  }
}

/* ローディングアニメーション */
.loading {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FF6B9D;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* フェードインアニメーション */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
