﻿/* 全体の基本スタイル */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3a0ca3;
  --accent-color: #f72585;
  --light-bg: #f8f9fa;
  --dark-text: #333;
  --light-text: #f8f9fa;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --hover-shadow: 0 8px 20px rgba(67, 97, 238, 0.15);
  --border-radius: 12px;
  --card-radius: 16px;
  --btn-radius: 8px;
}

body {
  font-family: 'Segoe UI', 'Meiryo UI', sans-serif;
  background-color: #f0f2f5;
  color: var(--dark-text);
  line-height: 1.6;
}

.page-header {
    /*background: var(--c-bg-base);*/
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(107, 124, 147, 0.2);
    position: relative;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.page-header h1 {
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

.back-btn {
    position: absolute;
    left: 20px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

    .back-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        text-decoration: none;
    }

.boya-box {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--btn-radius);
  font-weight: 500;
}

/* ボタンスタイル */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--btn-radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary i {
  margin-right: 8px;
}

.btn-secondary {
  background-color: #e9ecef;
  color: var(--dark-text);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--btn-radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
}

.btn-secondary:hover {
  background-color: #dee2e6;
  transform: translateY(-2px);
}

/* アニメーション効果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* レスポンシブの基本設定 */
@media (max-width: 768px) {
  .page-header {
    padding: 1rem;
  }
  
  .header-content h1 {
    font-size: 1.5rem;
  }
}

/* Step 17: インラインstyleの非破壊な上書き適用 */
.post-card .post-title {
    padding-left: 50px !important;
    padding-right: 50px !important;
}

.post-card .post-actions {
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(2px) !important;
}

/* === Card Refresh: グラススキン（非破壊オーバーライド） === */

/* 背景画像を活かしつつ読みやすくするための表面オーバーレイ */
.post-card {
    position: relative;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.15);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
    isolation: isolate; /* 擬似要素の重なりを安定化 */
    background-clip: padding-box;
    border-radius: var(--card-radius, 16px);
}

/* 既存の ::before を壊さず、::after で微光を追加（pointer-events: none） */
.post-card::before,
.post-card::after {
    border-radius: inherit;
}
.post-card::after {
    content: '';
    position: absolute;
    inset: 1px; /* 枠線と干渉させない */
    pointer-events: none;
    background:
        radial-gradient(1000px 200px at 10% -10%, rgba(255,255,255,0.25), transparent 60%),
        linear-gradient(to bottom, rgba(0,0,0,0.15), rgba(0,0,0,0.45));
    z-index: 0; /* タイトルや本文より背面（ただし背景画像の上） */
}

/* ホバー/フォーカスの浮き上がり感 */
.post-card:hover,
.post-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

/* タイトル帯をグラス化（既存の背景色を非破壊で上書き） */
.post-card .post-title {
    background: rgba(255,255,255,0.14) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none !important;                 /* 二重線の原因を除去 */
    border-top-left-radius: inherit !important;
    border-top-right-radius: inherit !important;
    /* 仕切り用に下側だけ極薄ライン（好みで調整） */
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.18);
    /*margin: 0;*/
    z-index: 1;
}

/* 日付ピルを読みやすく（右上） */
.post-card .post-date {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 2px 8px;
    border-radius: 10px;
    overflow: hidden;
    z-index: 1;
}

/* タグを「〇時間前」ピルと同じスタイルに統一 */
.post-card .post-categories-header {
    /* コンテナの帯背景を撤去してピルのみ表示 */
    background: transparent !important;
    border: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    gap: 6px;               /* ピル間の間隔 */
    z-index: 1;
}

/* ピル本体（カテゴリ/「+N」）= .post-date と同意匠 */
.post-card .category-tag-header,
.post-card .category-more-header {
    background: rgba(0,0,0,0.35) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    border-radius: 10px !important;        /* .post-date と同じ角丸 */
    padding: 2px 8px !important;           /* .post-date と同じパディング */
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* ホバー時の明度だけ上げる（位置は動かさない） */
.post-card .category-tag-header:hover,
.post-card .category-more-header:hover {
    background: rgba(0,0,0,0.5) !important;
    transform: none !important;
}

/* 本文上のカテゴリタグ帯もグラス化（右上と干渉しないようコンパクト） */
.post-categories-header {
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.16);
    padding: 4px 6px;
    border-radius: 8px;
    z-index: 1;
}

.category-tag-header {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    padding: 2px 6px;
    transition: transform .15s ease, background-color .15s ease;
}
.category-tag-header:hover {
    background: rgba(255,255,255,0.22);
    transform: translateY(-1px);
}

/* アクションバーのグラス感を強化（既存の backdrop-filter を維持） */
.post-card .post-actions {
    background-color: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(8px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(120%) !important;
    border-top: 1px solid rgba(255,255,255,0.15);
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
    /*margin: 0;*/ /* 角でのはみ出しによる線見え防止（既存の負マージンを打ち消し） */
    z-index: 1;
}

/* アクションボタンも読みやすく */
.post-card .action-btn {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.post-card .action-btn i {
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}

/* 本文はテキストの可読性を上げる（既存の text-shadow を尊重） */
.post-card .post-text {
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    z-index: 1;
}

/* ライブ人数バッジ（一覧・アクティブグリッド上）を少しグラス調に */
.post-card .live-user-badge {
    background: rgba(247, 37, 133, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* モバイル微調整 */
@media (max-width: 768px) {
    .post-card {
        border-radius: 14px;
        box-shadow: 0 8px 22px rgba(0,0,0,0.28);
    }
    .post-card .post-title {
        border-radius: 10px 10px 0 0;
    }
}