/* ================================
   ベーステーマ
================================ */
body.theme-dark {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #121212;
    color: #e0e0e0;
}

/* ================================
   トップページ：ヒーロー
================================ */
.home-hero {
    background: radial-gradient(circle at top left, #4fc3f7 0, #1a1a1a 45%, #000 100%);
    color: #e0f7ff;
    padding: 80px 20px 60px;
    text-align: center;
    border-bottom: 1px solid #222;
}

.hero-inner {
    max-width: 900px;
    margin: 0 auto;
}

.home-hero h1 {
    margin: 0 0 15px;
    font-size: 40px;
    letter-spacing: 0.05em;
}

.home-hero p {
    font-size: 16px;
    opacity: 0.9;
}

.page-date {
    font-size: 12px;
    color: #b0bec5;
    margin-top: 8px;
}

/* ================================
   トップページ：ロゴ表示
================================ */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.site-logo {
    width: 120px !important;
    height: auto !important;
    display: inline-block;
    filter: drop-shadow(0 0 6px #4fc3f7);
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

/* ================================
   トップページ：サイト紹介（intro）
================================ */
.site-intro {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 24px 28px;
    background: #181818;
    border: 1px solid #263238;
    border-radius: 10px;
    color: #cfd8dc;
    line-height: 1.8;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

.site-intro h2 {
    margin-top: 0;
    margin-bottom: 14px;
    color: #4fc3f7;
    font-size: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-intro p {
    margin: 0 0 14px;
    font-size: 15px;
}

/* ================================
   トップページ：カードメニュー
================================ */
.home-main {
    padding: 40px 20px 60px;
}

.menu-section {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: 20px;
    margin: 0 0 20px;
    color: #b0bec5;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.menu-card {
    position: relative;
    display: block;
    background: #181818;
    padding: 22px 20px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #e0e0e0;
    box-shadow: 0 0 0 1px #222;
    transition: 0.2s ease;
    overflow: hidden;
}

.menu-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.25), transparent 60%);
    opacity: 0;
    transition: 0.25s;
}

.menu-card:hover::before {
    opacity: 1;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.menu-card h3 {
    margin: 4px 0 6px;
    font-size: 20px;
    color: #e1f5fe;
}

.menu-card p {
    margin: 0;
    font-size: 14px;
    color: #b0bec5;
}

.card-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #4fc3f7;
    color: #4fc3f7;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-tag {
  padding: 6px 10px; /* スマホで押しやすい */
}

.menu-section {
    margin-bottom: 36px; /* セクション間の余白をしっかり確保 */
}


/* ================================
   共通レイアウト（サイドバー付きページ）
================================ */
.wrapper {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #101010;
    color: #e0e0e0;
    height: 100vh;
    position: sticky;
    top: 0;
    border-right: 1px solid #222;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
}

.sidebar .logo {
    text-align: center;
    padding: 18px 16px;
    border-bottom: 1px solid #222;
}

.sidebar .logo img {
    width: 160px;
    border-radius: 6px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 6px #4fc3f7);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.sidebar .logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px #4fc3f7);
}

.sidebar .logo h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0.08em;
    text-transform: none;
    color: #4fc3f7;
}

.sidebar ul {
    list-style: none;
    padding: 10px 0 0;
    margin: 0;
}

.sidebar ul li a {
    display: block;
    padding: 10px 18px;
    color: #b0bec5;
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: 0.2s;
}

.sidebar ul li a.active {
    background: #181818;
    color: #e1f5fe;
    border-left-color: #4fc3f7;
}

.sidebar ul li a:hover {
    background: #1f1f1f;
    color: #ffffff;
}

.sidebar ul li.back-home a {
    margin-top: 8px;
    border-top: 1px solid #222;
    padding-top: 12px;
    color: #90caf9;
}

/* ハンバーガー */
.hamburger {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1000;
    background: #101010;
    color: #e0e0e0;
    border: 1px solid #333;
    font-size: 22px;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Main content */
.content {
    padding: 26px 26px 40px;
    flex-grow: 1;
}

/* ================================
   パンくずリスト
================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #90a4ae;
    margin-bottom: 14px;
}

.crumb-icon {
    font-size: 14px;
}

.breadcrumb a {
    color: #4fc3f7;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.crumb-sep {
    color: #546e7a;
}

.crumb-sep {
  margin: 0 6px;
  color: #444;
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1;
}


/* ================================
   ページヘッダ
================================ */
.hero {
    background: radial-gradient(circle at top left, rgba(79, 195, 247, 0.35), #1a1a1a 55%);
    color: #e1f5fe;
    padding: 24px 22px;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 1px solid #263238;
}

.hero h1 {
    margin: 0 0 8px;
    font-size: 24px;
}

.hero p {
    margin: 0;
    font-size: 14px;
    color: #b0bec5;
}

/* ================================
   コードブロック
================================ */
.code-block {
    position: relative;
    margin: 24px 0;
    background: #0d0d0d;
    border: 1px solid #37474f;
    border-radius: 6px;
    padding-top: 40px;
}

.code-block::before {
    content: "";
    position: absolute;
    top: 36px;
    left: 0;
    right: 0;
    height: 1px;
    background: #37474f;
    opacity: 0.8;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #263238;
    color: #e0f7fa;
    border: 1px solid #4fc3f7;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10;
}

.copy-btn:hover {
    background: #37474f;
}

pre {
    background: #000000;
    color: #e0e0e0;
    padding: 16px 20px;
    border-radius: 0 0 6px 6px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 600px) {
    pre {
        padding: 16px 16px;
    }
}

/* ================================
   リンクカード
================================ */
.link-section {
    margin-bottom: 40px;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    row-gap: 32px;
    padding: 4px 4px;
}

.link-card {
    background: #181818;
    border: 1px solid #263238;
    border-left: 4px solid #4fc3f7;
    border-radius: 8px;
    padding: 16px 18px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.link-card:hover {
    box-shadow: 0 0 12px rgba(79, 195, 247, 0.5);
    transform: translateY(-4px);
}

.link-card a {
    font-size: 16px;
    color: #4fc3f7;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 8px;
}

.link-card a:hover {
    text-decoration: underline;
}

.link-card p {
    font-size: 13px;
    color: #cfd8dc;
    margin: 0;
}

/* ================================
   フッター
================================ */
.site-footer {
    width: 100%;
    text-align: center;
    margin-top: 40px;
    padding: 20px 10px;
    background: #0d0d0d;
    border-top: 1px solid #263238;
    color: #90a4ae;
    font-size: 13px;
    letter-spacing: 0.05em;
}

.site-footer p {
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

/* ================================
   レスポンシブ
================================ */
@media (max-width: 900px) {
    .wrapper {
        flex-direction: column;
    }

    .hamburger {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-260px);
        z-index: 999;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content {
        padding: 70px 16px 32px;
    }

    .link-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 600px) {
    .home-hero h1 {
        font-size: 32px;
    }

    .home-main {
        padding: 30px 14px 40px;
    }

    .menu-card {
        padding: 18px 16px 16px;
    }

    .link-grid {
        grid-template-columns: 1fr;
    }

    .link-card {
        padding: 14px 16px;
    }

    .link-card a {
        font-size: 15px;
    }

    .link-card p {
        font-size: 12px;
    }
}

/* ================================
   上に戻るボタン
================================ */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 999;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    margin: auto;
    padding-top: 9px;
}


/* ================================
   Homeアイコン（青い家）サイズ調整
================================ */
.home-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
}

/* トラブルシューティング（カード形式） */
.trouble-cards {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.trouble-card {
    background: var(--bg-secondary, #2b2b2b);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.trouble-card h3 {
    margin-top: 10px;
    font-size: 1.1rem;
    color: var(--accent, #8fda7f);
}

.trouble-card p {
    margin: 5px 0 10px;
}

/* スマホ対応（1列） */
@media (max-width: 768px) {
    .trouble-cards {
        grid-template-columns: 1fr;
    }
}

/* PC対応（2列） */
@media (min-width: 769px) {
    .trouble-cards {
        grid-template-columns: 1fr 1fr;
    }
}

/* 目次リンク（未クリック） */
.toc a {
    color: #7fbfff;
    text-decoration: none;
}

/* ホバー時 */
.toc a:hover {
    color: #b3d4ff;
}

/* クリック済み（Mint の緑寄りの青） */
.toc a:visited {
    color: #6fc8c0 !important;
    /* ← 好きな青緑に変更OK */
}

/* 図解を画像風に見せるカードデザイン */
.ascii-diagram {
    font-family: "Courier New", Consolas, monospace;
    white-space: pre;
    overflow-x: auto;
    background: #2b2b2b;
    /* Mint ダークテーマに最適 */
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    line-height: 1.45;
    margin: 25px 0;
    color: #e8e8e8;
}

/* 本文リンクを目次と同じ色に統一 */
.content a {
    color: #7fbfff;
    text-decoration: none;
}

.content a:hover {
    color: #b3d4ff;
}

.content a:visited {
    color: #6fc8c0;
}

.thin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
}

.thin-table th,
.thin-table td {
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 12px;
    text-align: left;
}

.thin-table th {
    background: rgba(255, 255, 255, 0.08);
    font-weight: bold;
}

/* --- サイトマップ（カード風） --- */

.sitemap-section {
    margin-top: 40px;
}

.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.sitemap-card {
    display: block;
    background: #2b2b2b;
    border: 1px solid #3a3a3a;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    color: #e0e0e0;
    transition: 0.2s;
}

.sitemap-card:hover {
    border-color: #8fe3c9;
    box-shadow: 0 0 12px rgba(143, 227, 201, 0.4);
}

.sitemap-card h3 {
    margin-top: 0;
    color: #8fe3c9;
    font-size: 18px;
}

.sitemap-card p {
    margin: 8px 0 0;
    font-size: 14px;
    color: #ccc;
}

.site-footer a {
    color: #8fe3c9;
    text-decoration: none;
}

.site-footer a:hover {
    color: #b0f5df;
    text-decoration: underline;
}

/* --- 記事の日付表示（左揃え・読みやすさ重視） --- */
/* --- 記事の日付表示（左揃え・視認性重視） --- */
.post-date {
    font-size: 13px;
    color: #8fe3c9;         /* 明るめのMintグリーンで背景に負けない */
    text-align: left;
    margin-top: 5px;
    margin-bottom: 20px;
    opacity: 1;             /* 透明度を戻してくっきり表示 */
}

.post-date time {
    font-weight: bold;      /* 数字を少し太くして読みやすく */
    color: #e0f7f3;         /* 背景に映える明るいMint系グレー */
}

.post-date time {
    font-weight: normal;
    /* タイトルより目立たないように */
}


/* --- 説明文 --- */
.description {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* ▼ 投稿カード（奮闘記ゆるトーク） */
.post {
    background: #ffffff10;
    /* ダークテーマに合う半透明ホワイト */
    border: 1px solid #ffffff20;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    box-shadow: 0 4px 10px #00000030;
    backdrop-filter: blur(4px);
}

.post .name {
    font-weight: bold;
    color: #a8ffd4;
    /* Mint グリーン寄りの優しい色 */
    display: block;
    margin-bottom: 6px;
}

.post .body {
    margin: 10px 0;
    line-height: 1.7;
}

.post .date {
    font-size: 0.85em;
    color: #cccccc;
    display: block;
    text-align: right;
}

/* 章タイトル（h2）を Mint グリーンの縦ラインで装飾 */
.content section h2 {
  border-left: 8px solid #98e0b5; /* Mint グリーン */
  padding-left: 14px;
  margin-top: 50px;
  margin-bottom: 20px;
  font-size: 1.7em;
  color: #e8fff2; /* ダークテーマで読みやすい薄ミント白 */
}

.page-purpose {
    font-size: 1.05rem;
    margin-bottom: 1.5em;
    color: #ddd;
    line-height: 1.7;
}

/* 外部リンクアイコンを自動付与 */
a[target="_blank"]::after {
    content: "\f35d"; /* Font Awesome: arrow-up-right-from-square */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 6px;
    font-size: 0.85em;
    color: #666;
    vertical-align: middle;
}
