/* ============================================
   占いの森 - Uranai no Mori
   メインスタイルシート — 白7:緑3 森テーマ
   ============================================ */

/* --- CSS変数 --- */
:root {
  --primary: #ffffff;
  --primary-light: #f7faf7;
  --green: #2d7a4f;
  --green-light: #4a9e6e;
  --green-dark: #1b5e3a;
  --green-pale: #e8f5ee;
  --accent: #2d7a4f;
  --accent-gold: #b8860b;
  --accent-pink: #d4776b;
  --text: #2c3e2c;
  --text-muted: #6b8068;
  --bg-card: #ffffff;
  --bg-glass: rgba(45, 122, 79, 0.04);
  --border: rgba(45, 122, 79, 0.15);
  --gradient-hero: linear-gradient(160deg, #f0f7f2 0%, #e0efe4 40%, #d4e8da 70%, #e8f5ee 100%);
  --gradient-card: linear-gradient(145deg, #ffffff, #f7faf7);
  --shadow: 0 4px 24px rgba(45, 122, 79, 0.08);
  --shadow-hover: 0 8px 32px rgba(45, 122, 79, 0.15);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-display: 'Noto Serif JP', 'Hiragino Mincho ProN', serif;
}

/* --- リセット・ベース --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--primary);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--green-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- 背景装飾（星→葉のパーティクル） --- */
.starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.starfield .star {
  position: absolute;
  background: var(--green-light);
  border-radius: 50%;
  animation: twinkle var(--duration, 3s) ease-in-out infinite;
  opacity: 0;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: var(--max-opacity, 0.25); transform: scale(1); }
}

/* --- ヘッダー --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--green-dark);
  letter-spacing: 0.05em;
}

.site-logo .logo-icon {
  font-size: 1.8rem;
}

.site-logo .logo-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: block;
  letter-spacing: 0.15em;
}

/* ナビゲーション */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
}

.main-nav a {
  display: block;
  padding: 8px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--green);
  background: var(--green-pale);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: var(--green);
  border-radius: 1px;
  transition: transform var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* ハンバーガーメニュー */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* --- ヒーローセクション --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--gradient-hero);
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(45, 122, 79, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-glow 6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--green);
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(45, 122, 79, 0.08);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--green-dark);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* CTAボタン */
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: var(--font-main);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: white;
  box-shadow: 0 4px 20px rgba(45, 122, 79, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(45, 122, 79, 0.4);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--green);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--green-pale);
  transform: translateY(-2px);
  color: var(--green);
  border-color: var(--green-light);
}

/* --- セクション共通 --- */
.section {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 12px;
  color: var(--green-dark);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.section-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  margin: 16px auto 0;
}

/* --- 占いメニューカード --- */
.fortune-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.fortune-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.fortune-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-light), var(--green));
  opacity: 0;
  transition: opacity var(--transition);
}

.fortune-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(45, 122, 79, 0.3);
}

.fortune-card:hover::before {
  opacity: 1;
}

.fortune-card .card-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.fortune-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--green-dark);
}

.fortune-card .card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.fortune-card .card-tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--green-pale);
  color: var(--green);
  border-radius: 50px;
  font-size: 0.8rem;
  border: 1px solid rgba(45, 122, 79, 0.15);
}

/* --- 今日の運勢ハイライト --- */
.today-fortune {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.today-fortune::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(45, 122, 79, 0.03) 0%, transparent 70%);
}

.today-fortune .date-display {
  font-size: 0.9rem;
  color: var(--green);
  margin-bottom: 8px;
}

.today-fortune h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 24px;
  color: var(--green-dark);
}

.zodiac-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.zodiac-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border-radius: var(--radius-sm);
  background: var(--green-pale);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
}

.zodiac-item:hover {
  border-color: var(--green-light);
  background: white;
  transform: translateY(-2px);
  color: var(--text);
  box-shadow: var(--shadow);
}

.zodiac-item .zodiac-icon {
  font-size: 1.6rem;
}

.zodiac-item .zodiac-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- スピリチュアルコラム --- */
.column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.column-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.column-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.column-card .column-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--green-pale), #d4e8da);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.column-card .column-body {
  padding: 24px;
}

.column-card .column-category {
  display: inline-block;
  padding: 3px 12px;
  background: var(--green-pale);
  color: var(--green);
  border-radius: 50px;
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.column-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  line-height: 1.5;
  color: var(--text);
}

.column-card .column-excerpt {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* --- 広告スペース --- */
.ad-space {
  background: var(--primary-light);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  margin: 40px auto;
  max-width: 728px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* --- フッター --- */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--green-dark);
  border-top: 1px solid var(--border);
  padding: 60px 24px 30px;
  margin-top: 80px;
  color: rgba(255, 255, 255, 0.85);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.95);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

/* --- ページ内共通 --- */
.page-hero {
  padding: 120px 24px 60px;
  text-align: center;
  background: var(--gradient-hero);
  position: relative;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 12px;
  color: var(--green-dark);
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* --- タロットカード --- */
.tarot-spread {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 40px 0;
  perspective: 1000px;
}

.tarot-card {
  width: 160px;
  height: 280px;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.tarot-card .card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 2px solid var(--border);
}

.tarot-card .card-back {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px),
    linear-gradient(135deg, var(--green-dark), var(--green));
}

.tarot-card .card-back .back-design {
  font-size: 3rem;
  opacity: 0.6;
  color: white;
}

.tarot-card .card-back .back-text {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 8px;
}

.tarot-card .card-front {
  background: linear-gradient(135deg, white, var(--green-pale));
  transform: rotateY(180deg);
  text-align: center;
}

.tarot-card .card-front .card-symbol {
  font-size: 3.5rem;
  margin-bottom: 8px;
}

.tarot-card .card-front .card-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.tarot-card .card-front .card-meaning {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tarot-card:hover {
  filter: brightness(1.05);
}

/* タロット結果 */
.tarot-result {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 700px;
  margin: 40px auto;
  display: none;
  box-shadow: var(--shadow);
}

.tarot-result.visible {
  display: block;
  animation: fadeInUp 0.6s ease;
}

.tarot-result h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 24px;
  color: var(--green-dark);
}

.tarot-result .result-content {
  line-height: 2;
  color: var(--text);
}

/* --- 星座占い --- */
.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.zodiac-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.zodiac-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(45, 122, 79, 0.3);
}

.zodiac-card .zodiac-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.zodiac-card .zodiac-symbol {
  font-size: 2.5rem;
}

.zodiac-card .zodiac-info h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--green-dark);
}

.zodiac-card .zodiac-info .zodiac-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.zodiac-card .luck-meter {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.zodiac-card .luck-star {
  color: var(--accent-gold);
  font-size: 1rem;
}

.zodiac-card .luck-star.empty {
  opacity: 0.2;
}

.zodiac-card .zodiac-message {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* 星座詳細 */
.zodiac-detail {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  max-width: 800px;
  margin: 40px auto;
  display: none;
  box-shadow: var(--shadow);
}

.zodiac-detail.visible {
  display: block;
  animation: fadeInUp 0.6s ease;
}

.zodiac-detail .detail-header {
  text-align: center;
  margin-bottom: 32px;
}

.zodiac-detail .detail-symbol {
  font-size: 4rem;
  margin-bottom: 12px;
}

.zodiac-detail h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--green-dark);
}

.fortune-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.fortune-category {
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}

.fortune-category .cat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.fortune-category .cat-stars {
  color: var(--accent-gold);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.fortune-category .cat-text {
  font-size: 0.85rem;
  line-height: 1.6;
}

/* --- 数秘術 --- */
.numerology-form {
  max-width: 500px;
  margin: 0 auto 40px;
  text-align: center;
}

.numerology-form label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--green-dark);
}

.numerology-form input[type="date"] {
  width: 100%;
  padding: 16px 20px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1.1rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color var(--transition);
}

.numerology-form input[type="date"]:focus {
  border-color: var(--green);
}

.numerology-form .btn {
  margin-top: 20px;
}

.numerology-result {
  max-width: 600px;
  margin: 0 auto;
  display: none;
}

.numerology-result.visible {
  display: block;
  animation: fadeInUp 0.6s ease;
}

.life-path-number {
  font-size: 5rem;
  font-family: var(--font-display);
  text-align: center;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

/* --- アニメーション --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- レスポンシブ --- */
@media (max-width: 768px) {
  .header-inner {
    height: 60px;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .main-nav a {
    padding: 12px 16px;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 80vh;
    padding: 100px 20px 60px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 60px 16px;
  }

  .today-fortune {
    padding: 32px 20px;
  }

  .zodiac-quick {
    grid-template-columns: repeat(4, 1fr);
  }

  .tarot-card {
    width: 120px;
    height: 210px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .zodiac-quick {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .fortune-grid {
    grid-template-columns: 1fr;
  }

  .column-grid {
    grid-template-columns: 1fr;
  }

  .tarot-card {
    width: 100px;
    height: 175px;
  }

  .tarot-card .card-front .card-symbol {
    font-size: 2.5rem;
  }
}

/* --- ユーティリティ --- */
.text-center { text-align: center; }
.text-gold { color: var(--accent-gold); }
.text-pink { color: var(--accent-pink); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
