/* ==========================================
   りえもんブログ - style.css
   おしゃれでポップでモダンなグラスモーフィズムデザイン
   ========================================== */

/* Google Fonts からポップでモダンなフォントを読み込み */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;700;800&family=Outfit:wght@400;600;800&display=swap');

/* --- CSS変数（テーマカラー定義） --- */
:root {
  /* フォント定義 */
  --font-family: 'Outfit', 'M PLUS Rounded 1c', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* デフォルトテーマ（黒りえもん / トップページ） */
  --theme-bg: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
  --theme-glow-1: rgba(142, 197, 252, 0.7);
  --theme-glow-2: rgba(224, 195, 252, 0.7);
  --accent-color: #6b46c1;
  --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --text-color: #2d3748;
  --text-muted: #718096;
}

/* 黄りえもんテーマの変数 */
.theme-yellow {
  --theme-bg: linear-gradient(135deg, #ffe082 0%, #ffb300 100%);
  --theme-glow-1: rgba(255, 224, 130, 0.75);
  --theme-glow-2: rgba(255, 179, 0, 0.6);
  --accent-color: #d84315;
  --accent-gradient: linear-gradient(135deg, #ff8f00 0%, #ff6f00 100%);
  --text-color: #3e2723;
  --text-muted: #5d4037;
}

/* 緑りえもんテーマの変数 */
.theme-green {
  --theme-bg: linear-gradient(135deg, #b2f2bb 0%, #37b24d 100%);
  --theme-glow-1: rgba(178, 242, 187, 0.75);
  --theme-glow-2: rgba(55, 178, 77, 0.6);
  --accent-color: #1b4332;
  --accent-gradient: linear-gradient(135deg, #40c057 0%, #2f9e44 100%);
  --text-color: #1c1c1c;
  --text-muted: #2b2b2b;
}

/* --- 全体レイアウト --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--theme-bg);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 20px;
  overflow-x: hidden;
  position: relative;
  transition: background 0.5s ease;
}

/* --- 動く背景の光（フローティング・オーブ） --- */
.glow-orb {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  z-index: -1;
  filter: blur(100px);
  opacity: 0.65;
  animation: floatOrb 25s infinite alternate ease-in-out;
  pointer-events: none;
}

.orb-1 {
  background: var(--theme-glow-1);
  top: -150px;
  left: -150px;
}

.orb-2 {
  background: var(--theme-glow-2);
  bottom: -150px;
  right: -150px;
  animation-delay: -12s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(120px, 80px) scale(1.15) rotate(180deg);
  }
  100% {
    transform: translate(-80px, 150px) scale(0.9) rotate(360deg);
  }
}

/* --- コンテナとカード --- */
.container {
  width: 100%;
  max-width: 800px;
  z-index: 1;
}

/* グラスモーフィズムカード */
.card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 32px;
  padding: 40px 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.55);
}

/* --- ヘッダー・プロフィール --- */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 40px;
}

.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-avatar:hover {
  transform: scale(1.1) rotate(5deg);
}

.site-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.site-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.6;
}

/* --- ブログ記事カードリスト --- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
}

/* 各記事のショートリンクカード */
.post-link-card {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 24px;
  padding: 20px;
  gap: 20px;
  transition: all 0.3s ease;
}

.post-link-card:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateX(5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.post-link-img {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.post-link-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-link-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-color);
}

.post-link-date {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- 記事詳細ページ用デザイン --- */
.post-header {
  margin-bottom: 30px;
}

.post-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.3;
}

.post-date {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* メイン写真（大きく表示する用） */
.post-main-img-container {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  border: 4px solid #fff;
}

.post-main-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.post-main-img-container:hover .post-main-img {
  transform: scale(1.03);
}

/* 記事本文 */
.post-content {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-color);
  white-space: pre-wrap; /* 改行をそのまま反映 */
}

/* --- フッター・戻るボタン --- */
.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 50px;
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 30px;
  border: none;
  cursor: pointer;
}

.back-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
  filter: brightness(1.1);
}

/* --- レスポンシブ調整 --- */
@media (max-width: 600px) {
  body {
    padding: 20px 10px;
  }
  .card {
    padding: 30px 20px;
    border-radius: 24px;
  }
  .site-title {
    font-size: 2rem;
  }
  .post-title {
    font-size: 1.8rem;
  }
  .post-link-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .post-link-img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
  }
}
