/* シンプル・フラットなデザイン（スマホ最適化） */

:root {
  --yumekawa-pink: #FFC4E1;
  --yumekawa-purple: #E2C1FF;
  --yumekawa-blue: #C1E8FF;
}

/* フォントサイズユーティリティクラス */
.text-sm {
  font-size: 18px;
}

.text-md {
  font-size: 24px;
}

.text-lg {
  font-size: 32px;
  font-weight: bold;
}

body {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  background: linear-gradient(135deg, var(--yumekawa-pink), var(--yumekawa-purple), var(--yumekawa-blue));
  background-attachment: fixed;
  color: #7D5A96;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  margin: 0;
  padding: 12px 12px;
  box-sizing: border-box;
}

/* グラスモーフィズム */
.chat {
  width: 100%;
  max-width: 400px;
  padding: 16px 16px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 40px;
  box-shadow: 0 10px 40px rgba(183, 153, 255, 0.15);
  box-sizing: border-box;
}

.message {
  padding: 0;
  margin: 8px 0;
}

.bot {
  align-self: flex-start;
  margin: 0 0 16px 0;
}

.user {
  background: #d1f0ff;
  align-self: flex-end;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.answer-button {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.6);
  color: #7D5A96;
  font-size: 16px;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.1s;
}

.answer-button:active {
  transform: scale(0.95);
}

.small {
  color: #666;
}

.progress-card {
  padding: 0;
  margin: 0 0 16px 0;
  text-align: center;
}

.question-text {
  font-weight: bold;
  padding: 24px 24px;
}

/* シンプルなフェードアニメーション（opacityのみ） */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.fade-in {
  animation: fadeIn 0.2s ease-out forwards;
}

.fade-out {
  animation: fadeOut 0.2s ease-in forwards;
}

.result-title {
  text-align: center;
  margin-bottom: 16px;
}

.type-header {
  text-align: center;
  margin-bottom: 16px;
}

.type-name {
  text-align: center;
  color: #6B4A7D;
  margin-bottom: 4px;
}

.type-code {
  font-weight: bold;
  color: rgba(125, 90, 150, 0.6);
}

.type-detail {
  margin-top: 0px;
  color: rgba(125, 90, 150, 0.6);
}

.type-image {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 20px auto;
  animation: typeImageShake 5s ease-in-out infinite;
}

@keyframes typeImageShake {
  0%, 100% { transform: rotate(-5deg) scale(1); }
  50% { transform: rotate(5deg) scale(1.05); }
}

.result-section {
  margin-bottom: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: bold;
  margin: 32px 0 16px 0;
  text-align: center;
  color: #6B4A7D;
}

.section-text {
  line-height: 1.6;
}

/* 相性セクション */
.compatibility-section {
  margin-top: 32px;
}

.compatibility-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.compatibility-card {
  padding: 16px 0 0 0;
  text-align: center;
}

.compatibility-image-wrapper {
  display: inline-block;
  position: relative;
  margin-bottom: 24px;
}

.compatibility-image-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 152px;
  height: 152px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  z-index: 0;
}

.compatibility-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.compatibility-name {
  font-weight: bold;
  margin-bottom: 8px;
}

.compatibility-type-code {
  font-weight: bold;
  color: rgba(125, 90, 150, 0.6);
}

.compatibility-description {
  line-height: 1.5;
  text-align: left;
}

/* トップページ用スタイル */
.title-image {
  display: block;
  width: 70%;
  max-width: 100%;
  margin: 32px auto 32px auto;
}

.catchcopy {
  margin: 16px 0 0 0 ;
  line-height: 1.6;
  text-align: center;
  font-weight: bold;
  color: #6B4A7D;
}

.message.bot {
  text-align: center;
}

.cta-button {
  display: block;
  width: 100%;
  padding: 21px 16px;
  margin: 32px 0 64px 0;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #FF6B9D, #C44AFF);
  color: #fff;
  font-size: 24px;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(196, 74, 255, 0.4);
  box-sizing: border-box;
}

.cta-button:active {
  transform: scale(0.98);
}

.cta-button-wrapper {
  position: relative;
}

.tap-finger {
  position: absolute;
  left: 50%;
  top: 82px;
  transform: translateX(-50%);
  font-size: 70px;
  animation: tapAnimation 1.2s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes tapAnimation {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

/* ローディング画面 */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 160px 0;
}

.loading-text {
  text-align: center;
  margin-bottom: 24px;
  font-weight: bold;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(125, 90, 150, 0.2);
  border-top: 4px solid #7D5A96;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* キャラ一覧セクション */
.character-list-section {
  margin-top: 32px;
}

.character-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.character-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.character-card {
  text-align: center;
  padding: 16px 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.character-card:active {
  transform: scale(0.95);
}

.tap-icon {
  position: absolute;
  top: 8px;
  right: 16px;
  color: #7D5A96;
  font-size: 12px;
  font-weight: bold;
}

.character-image {
  width: 100%;
  max-width: 120px;
  height: auto;
  object-fit: contain;
  margin-bottom: 0;
}

.character-name {
  font-size: 16px;
  font-weight: bold;
  color: #6B4A7D;
  margin: 0 0 0 0;
}

.character-code {
  font-size: 14px;
  font-weight: bold;
  color: rgba(125, 90, 150, 0.6);
  margin: 0;
}

/* シェアセクション */
.share-section {
  margin: 32px 0;
  text-align: center;
}

.share-button {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #FF6B9D, #C44AFF);
  color: #fff;
  font-size: 16px;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 15px rgba(196, 74, 255, 0.3);
}

.share-button:active {
  transform: scale(0.95);
}

.share-button.copied {
  background: linear-gradient(135deg, #4CAF50, #45a049);
}

.share-button-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: middle;
}

/* SNS誘導セクション */
.sns-section {
  margin-top: 32px;
  text-align: center;
}

.sns-promotion-text {
  font-size: 16px;
  font-weight: bold;
  color: #6B4A7D;
  margin: 0 0 8px 0;
}

.sns-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.sns-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transition: transform 0.2s;
}

.sns-icon-link:active {
  transform: scale(0.95);
}

.sns-icon {
  width: 40px;
  height: 40px;
  filter: brightness(0) saturate(100%) invert(31%) sepia(15%) saturate(1500%) hue-rotate(240deg) brightness(90%) contrast(90%);
}

.sns-icon-x {
  width: 34px;
  height: 34px;
}

/* フッター */
.site-footer {
  width: 100%;
  max-width: 400px;
  margin-top: 24px;
  text-align: center;
}

.footer-links {
  margin-bottom: 8px;
}

.footer-link {
  font-size: 12px;
  color: rgba(125, 90, 150, 0.6);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-separator {
  font-size: 12px;
  color: rgba(125, 90, 150, 0.6);
}

.footer-text {
  font-size: 12px;
  color: rgba(125, 90, 150, 0.6);
  margin: 0;
}
