/*
 * omoiji.com占いプラグイン - CSSファイル
 * @version 1.5.9
 * @description タロットカードや運勢表示のスタイルを定義
 */

/* Google Fontsから新しいフォントをインポート */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Shippori+Mincho:wght@400;500;700&display=swap');

/* 全体のフォント設定 */
body {
  font-family: 'Noto Sans JP', sans-serif;
}

/* タロットカードのスタイル */
.tarot-cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
  padding: 10px;
}

.tarot-card-wrapper {
  perspective: 1000px;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  animation: subtleFloat 6s ease-in-out infinite;
}

.tarot-card {
  width: 100%;
  aspect-ratio: 4 / 6;
  min-height: 240px;
  max-height: 240px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  /* より控えめなグラデーション効果 */
  background-size: 200% 200%;
  animation: subtleGradientShift 6s ease infinite;
}

.tarot-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, rgba(255,255,255,0.4), rgba(255,255,255,0.2));
  border-radius: 30px;
  z-index: -1;
  transition: opacity 0.4s, transform 0.4s;
  animation: subtleRotateGradient 8s linear infinite;
}

.tarot-card:hover::before {
  opacity: 0.8;
  transform: scale(1.05);
}

.tarot-card.flipped {
  transform: rotateY(180deg);
}

.tarot-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.tarot-card.flipped .tarot-card-inner {
  transform: rotateY(180deg);
}

.tarot-card-front, .tarot-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  border-radius: 17px;
}

.tarot-card-front {
  background: linear-gradient(135deg, #fdf2f8, #fce7f3);
  color: #334155;
  border: 2px solid #f9a8d4;
}

.tarot-card-back {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  color: #334155;
  transform: rotateY(180deg);
  border: 2px solid #bae6fd;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  text-align: center;
  min-height: 240px;
  max-height: 240px;
}

.card-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  display: block;
  transition: transform 0.3s ease;
  /* より控えめなきらめき効果 */
  animation: subtleSparkle 3s ease infinite;
}

.tarot-card:hover .card-icon {
  transform: scale(1.15) rotate(3deg);
}

.card-name {
  font-size: 1.4rem;
  margin: 10px 0;
  font-weight: 700;
  color: inherit;
  font-family: 'Shippori Mincho', serif;
}

.card-name-back {
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 700;
  color: inherit;
  text-align: center;
  width: 100%;
  font-family: 'Shippori Mincho', serif;
}

.card-meaning-container {
  width: 100%;
  text-align: left;
  overflow-y: auto;
  max-height: 140px;
  padding: 10px;
  box-sizing: border-box;
}

.card-meaning-section {
  margin-bottom: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.card-meaning-section h4 {
  margin-top: 0;
  margin-bottom: 6px;
  color: #475569;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Shippori Mincho', serif;
}

.card-meaning-section p {
  margin: 4px 0;
  line-height: 1.5;
  font-size: 0.85rem;
  color: #334155;
}

.tarot-result-title {
  text-align: center;
  color: #475569;
  margin-bottom: 20px;
  font-size: 1.8rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
  font-family: 'Shippori Mincho', serif;
}

/* 今日の運勢セクションのスタイル */
.today-fortune {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 24px;
  padding: 30px;
  margin: 25px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  animation: subtleFloat 6s ease-in-out infinite;
  border: 2px solid #e2e8f0;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* レスポンシブデザインの改善 */
  padding: 25px;
  min-height: 220px;
  /* より控えめなグラデーション効果 */
  background-size: 200% 200%;
  animation: subtleGradientShift 6s ease infinite;
  /* より控えめな浮遊効果 */
  animation: subtleFloat 6s ease-in-out infinite;
}

.today-fortune::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  border-radius: 40px;
  z-index: -1;
  transition: opacity 0.4s, transform 0.4s;
  animation: subtleRotateGradient 8s linear infinite;
}

.today-fortune:hover::before {
  opacity: 0.8;
  transform: scale(1.05);
}

.today-fortune:hover {
  transform: translateY(-6px) scale(1.02) rotate(0.5deg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-color: #94a3b8;
}

.today-fortune h2 {
  color: #7c3aed;
  font-size: 2rem;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  padding: 10px 20px;
  border-radius: 50px;
  /* レスポンシブデザインの改善 */
  font-size: 1.8rem;
  margin-bottom: 15px;
  font-family: 'Shippori Mincho', serif;
}

.today-fortune .fortune-score {
  font-size: 3rem;
  margin: 20px 0;
  color: #7c3aed;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  letter-spacing: 3px;
  animation: subtleHeartBeat 3s infinite alternate;
  /* レスポンシブデザインの改善 */
  font-size: 2.5rem;
  margin: 15px 0;
}

.today-fortune .result-text {
  color: #334155;
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 15px 0;
  text-shadow: 0 0 1px rgba(0,0,0,0.02);
  /* レスポンシブデザインの改善 */
  font-size: 1.1rem;
  margin: 12px 0;
  font-family: 'Shippori Mincho', serif;
}

.today-fortune .personalized-message {
  margin-top: 15px;
  padding: 15px;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  border-radius: 15px;
  font-weight: 500;
  color: #334155;
  text-align: center;
  animation: subtlePulse 3s infinite;
  border: 1px solid #bfdbfe;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  /* レスポンシブデザインの改善 */
  padding: 12px;
  font-size: 1.05rem;
  font-family: 'Shippori Mincho', serif;
}

.today-fortune .fortune-details {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #f0fdfa, #e6fffa);
  border-radius: 15px;
  font-size: 1rem;
  line-height: 1.6;
  color: #334155;
  border: 1px solid #b2f5ea;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  text-align: left;
  /* レスポンシブデザインの改善 */
  padding: 15px;
  font-size: 0.95rem;
  font-family: 'Shippori Mincho', serif;
}

.today-fortune .detailed-fortune h4 {
  color: #0d9488;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2rem;
  /* レスポンシブデザインの改善 */
  font-size: 1.1rem;
  font-family: 'Shippori Mincho', serif;
}

.today-fortune .detailed-fortune p {
  margin: 8px 0;
  line-height: 1.6;
  color: #334155;
  /* レスポンシブデザインの改善 */
  font-size: 0.95rem;
  margin: 6px 0;
  font-family: 'Shippori Mincho', serif;
}

/* ラッキーカラーインジケーターのスタイル */
.lucky-color-indicator {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  background-color: var(--lucky-color, #94a3b8);
}

.lucky-color-text {
  font-weight: 500;
  color: var(--dark-text);
}

/* ラッキーカラーのCSS変数を定義 */
:root {
  --lucky-color: #94a3b8;
}

/* アニメーション */
@keyframes subtleFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes subtleGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes subtleSparkle {
  0% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.1) rotate(180deg); opacity: 0.9; }
  100% { transform: scale(1) rotate(360deg); opacity: 1; }
}

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

@keyframes subtlePulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.02); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .tarot-cards-container {
    gap: 15px;
    padding: 5px;
  }

  .tarot-card {
    min-height: 190px;
    max-height: 190px;
  }

  .card-icon {
    font-size: 3rem;
    margin-bottom: 10px;
  }

  .card-name {
    font-size: 1.2rem;
  }

  .card-name-back {
    font-size: 1.1rem;
  }

  .card-meaning-section p {
    font-size: 0.75rem;
  }

  .card-meaning-container {
    max-height: 110px;
  }

  .today-fortune {
    padding: 20px;
    margin: 20px 10px;
    min-height: 200px;
  }

  .today-fortune h2 {
    font-size: 1.6rem;
  }

  .today-fortune .fortune-score {
    font-size: 2.2rem;
  }

  .today-fortune .result-text {
    font-size: 1rem;
  }

  .today-fortune .personalized-message {
    padding: 10px;
    font-size: 0.95rem;
  }

  .today-fortune .fortune-details {
    padding: 15px;
    font-size: 0.9rem;
  }

  .today-fortune .detailed-fortune h4 {
    font-size: 1rem;
  }

  .today-fortune .detailed-fortune p {
    font-size: 0.85rem;
    margin: 5px 0;
  }
}

/* モーダル表示のスタイル */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.fortune-history-list {
  margin-top: 10px;
}

.fortune-history-item {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}

.fortune-history-item:last-child {
  border-bottom: none;
}

.fortune-date {
  font-weight: bold;
  color: #555;
}

.fortune-type {
  color: #777;
  margin: 5px 0;
}

.fortune-result {
  margin-top: 5px;
}