.fortune-page {
  --fortune-primary-bg: #0a0a0f;
  --fortune-secondary-bg: #1a1520;
  --fortune-accent-purple: #6b4c9a;
  --fortune-accent-gold: #d4af37;
  --fortune-text-primary: #e8e4d9;
  --fortune-text-secondary: #a89f8e;
  --fortune-border-color: #3d2f4a;

  background-color: var(--fortune-primary-bg);
  color: var(--fortune-text-primary);
  font-family: 'Cormorant Garamond', serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.fortune-page *,
.fortune-page *::before,
.fortune-page *::after {
  box-sizing: border-box;
}

.fortune-page::before {
  animation: fortune-mystical-pulse 8s ease-in-out infinite alternate;
  background:
    radial-gradient(ellipse at 20% 30%, rgb(107 76 154 / 15%) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgb(212 175 55 / 10%) 0%, transparent 50%);
  content: '';
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: fixed;
  width: 100%;
  z-index: 0;
}

.fortune-stars {
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: fixed;
  width: 100%;
  z-index: 1;
}

.fortune-star {
  animation: fortune-twinkle 3s ease-in-out infinite;
  background: var(--fortune-text-primary);
  border-radius: 50%;
  height: 2px;
  opacity: 0.5;
  position: absolute;
  width: 2px;
}

.fortune-container {
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.fortune-header {
  border-bottom: 1px solid var(--fortune-border-color);
  padding: 80px 20px 60px;
  position: relative;
  text-align: center;
}

.fortune-header-ornament {
  animation: fortune-shimmer 3s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, var(--fortune-accent-gold), transparent);
  height: 2px;
  margin: 0 auto 30px;
  width: 80px;
}

.fortune-title {
  background: linear-gradient(135deg, var(--fortune-accent-gold), var(--fortune-text-primary), var(--fortune-accent-gold));
  background-clip: text;
  background-size: 200% auto;
  color: transparent;
  font-family: 'Cinzel', serif;
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0 0 15px;
  text-transform: uppercase;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fortune-gradient-shift 4s ease infinite;
}

.fortune-subtitle {
  color: var(--fortune-text-secondary);
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  margin: 0 0 25px;
  text-transform: uppercase;
}

.fortune-tagline {
  color: var(--fortune-text-secondary);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.8;
  margin: 0 auto;
  max-width: 600px;
}

.fortune-main {
  padding: 80px 0;
}

.fortune-intro {
  margin: 0 auto 100px;
  max-width: 800px;
  padding: 0 20px;
  text-align: center;
}

.fortune-intro p {
  color: var(--fortune-text-secondary);
  font-size: 1.25rem;
  line-height: 2;
  margin: 0 0 20px;
}

.fortune-plugin-area {
  margin: 0 auto;
  max-width: 1000px;
  padding: 60px 20px 100px;
}

.fortune-plugin-container {
  background: var(--fortune-secondary-bg);
  border: 2px solid var(--fortune-border-color);
  box-shadow: 0 10px 50px rgb(0 0 0 / 50%);
  min-height: 500px;
  padding: 60px 40px;
  position: relative;
  transition: all 0.4s ease;
}

.fortune-plugin-container::before {
  animation: fortune-border-glow 4s ease infinite;
  background: linear-gradient(135deg, var(--fortune-accent-gold), var(--fortune-accent-purple), var(--fortune-accent-gold));
  background-size: 200% 200%;
  content: '';
  inset: -2px;
  filter: blur(10px);
  opacity: 0.3;
  position: absolute;
  z-index: -1;
}

.fortune-plugin-container::after {
  border: 1px solid var(--fortune-border-color);
  content: '';
  inset: 10px;
  opacity: 0.3;
  pointer-events: none;
  position: absolute;
}

/* プラグイン内部の見た目は破壊しないため、余白と幅のみ調整 */
.fortune-plugin-slot {
  position: relative;
  z-index: 2;
}

.fortune-plugin-slot > *:first-child {
  margin-top: 0;
}

.fortune-plugin-slot > *:last-child {
  margin-bottom: 0;
}

.fortune-quote {
  margin: 0 auto;
  max-width: 900px;
  padding: 80px 20px;
  text-align: center;
}

.fortune-quote-mark {
  color: var(--fortune-accent-purple);
  font-family: 'Cinzel', serif;
  font-size: 6rem;
  line-height: 0.5;
  margin-bottom: 20px;
  opacity: 0.3;
}

.fortune-blockquote {
  color: var(--fortune-text-primary);
  font-size: 1.8rem;
  font-style: italic;
  line-height: 1.8;
  margin: 0 0 30px;
}

.fortune-quote-author {
  color: var(--fortune-accent-gold);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.2em;
  margin: 0;
  text-transform: uppercase;
}

.fortune-home-link {
  display: flex;
  justify-content: center;
  padding: 0 20px 40px;
}

.fortune-home-button {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 9999px;
  box-shadow: 0 10px 25px rgb(0 0 0 / 35%);
  color: #fff;
  display: inline-flex;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 0.95rem 2rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.fortune-home-button:hover {
  box-shadow: 0 14px 28px rgb(0 0 0 / 45%);
  filter: brightness(1.05);
  transform: translateY(-2px);
}

.fortune-footer {
  border-top: 1px solid var(--fortune-border-color);
  margin-top: 80px;
  padding: 60px 20px;
  text-align: center;
}

.fortune-footer-ornament {
  border: 2px solid var(--fortune-accent-gold);
  height: 60px;
  margin: 0 auto 30px;
  opacity: 0.6;
  position: relative;
  transform: rotate(45deg);
  width: 60px;
}

.fortune-footer-ornament::before {
  border: 2px solid var(--fortune-accent-purple);
  content: '';
  height: 30px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
}

.fortune-footer p {
  color: var(--fortune-text-secondary);
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  margin: 0;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .fortune-subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
  }

  .fortune-tagline {
    font-size: 1.1rem;
  }

  .fortune-plugin-container {
    min-height: 400px;
    padding: 40px 20px;
  }

  .fortune-blockquote {
    font-size: 1.4rem;
  }

  .fortune-quote-mark {
    font-size: 4rem;
  }
}

@keyframes fortune-mystical-pulse {
  0% {
    opacity: 0.3;
  }

  100% {
    opacity: 0.6;
  }
}

@keyframes fortune-twinkle {
  0%,
  100% {
    opacity: 0.2;
  }

  50% {
    opacity: 0.8;
  }
}

@keyframes fortune-shimmer {
  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

@keyframes fortune-gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes fortune-border-glow {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}
