/* =============================================
   2chまとめサイト スタイル
   ============================================= */

/* リセット・基本 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', Meiryo, メイリオ, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
}

a {
    color: #0066cc;
    text-decoration: none;
}
a:hover {
    color: #cc3300;
    text-decoration: underline;
}

/* =============================================
   ヘッダー
   ============================================= */
.matome-header {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    color: #fff;
    padding: 0;
    border-bottom: 3px solid #800000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.matome-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.matome-site-title {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    letter-spacing: 1px;
}

.matome-site-title:hover {
    color: #ffe;
    text-decoration: none;
}

.matome-header-nav a {
    color: #ffe;
    font-size: 13px;
    margin-left: 12px;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 3px;
}

.matome-header-nav a:hover {
    background: rgba(255,255,255,0.2);
    text-decoration: none;
}

/* =============================================
   メインレイアウト（2カラム）
   ============================================= */
.matome-wrapper {
    max-width: 1100px;
    margin: 16px auto;
    padding: 0 16px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.matome-main {
    flex: 1;
    min-width: 0;
}

.matome-sidebar {
    width: 240px;
    flex-shrink: 0;
}

/* =============================================
   カテゴリータブ（一覧ページ上部）
   ============================================= */
.matome-category-tabs {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.matome-category-tab {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    color: #555;
    background: #f8f8f8;
}

.matome-category-tab:hover {
    background: #e8e8e8;
    text-decoration: none;
    color: #333;
}

.matome-category-tab.active {
    background: #cc0000;
    border-color: #990000;
    color: #fff;
}

.matome-category-tab.active:hover {
    color: #fff;
}

/* =============================================
   記事カード（一覧）
   ============================================= */
.matome-post-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 12px;
    display: flex;
    gap: 0;
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.matome-post-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.matome-post-thumb {
    width: 160px;
    flex-shrink: 0;
    background: #e8e8e8;
    overflow: hidden;
}

.matome-post-thumb img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.matome-post-thumb-placeholder {
    width: 100%;
    height: 110px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 28px;
}

.matome-post-body {
    padding: 12px 14px;
    flex: 1;
    min-width: 0;
}

.matome-post-meta {
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.matome-post-category-badge {
    background: #cc0000;
    color: #fff;
    padding: 1px 7px;
    border-radius: 2px;
    font-size: 11px;
}

.matome-post-title {
    font-size: 15px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 6px;
}

.matome-post-title a {
    color: #1a1a1a;
}

.matome-post-title a:hover {
    color: #cc0000;
    text-decoration: none;
}

.matome-post-excerpt {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* =============================================
   ページネーション
   ============================================= */
.matome-pagination {
    margin-top: 16px;
}

.matome-pagination .pagination {
    justify-content: center;
}

.matome-pagination .page-link {
    color: #cc0000;
    border-color: #ddd;
    font-size: 13px;
    padding: 5px 12px;
}

.matome-pagination .page-item.active .page-link {
    background-color: #cc0000;
    border-color: #cc0000;
}

/* =============================================
   記事詳細
   ============================================= */
.matome-article {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.matome-article-category {
    display: inline-block;
    background: #cc0000;
    color: #fff;
    padding: 2px 10px;
    border-radius: 2px;
    font-size: 12px;
    margin-bottom: 10px;
}

.matome-article-title {
    font-size: 22px;
    font-weight: bold;
    line-height: 1.4;
    color: #1a1a1a;
    margin-bottom: 10px;
    border-bottom: 2px solid #cc0000;
    padding-bottom: 10px;
}

.matome-article-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
}

.matome-article-eyecatch {
    margin-bottom: 20px;
}

.matome-article-eyecatch img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 2chスレ風本文 */
.matome-article-body {
    font-size: 14px;
    line-height: 1.8;
    color: #222;
}

.matome-article-body p {
    margin-bottom: 12px;
}

/* 2chレス引用スタイル */
.matome-res {
    background: #f9f9f9;
    border-left: 3px solid #cc9900;
    padding: 10px 14px;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
}

.matome-res-header {
    color: #888;
    font-size: 12px;
    margin-bottom: 4px;
}

.matome-res-num {
    color: #cc0000;
    font-weight: bold;
    margin-right: 6px;
}

.matome-res-name {
    color: #006600;
    font-weight: bold;
}

.matome-res-body {
    color: #333;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 引用（>>) */
.matome-quote {
    color: #006600;
}

.matome-article-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.matome-btn-back {
    display: inline-block;
    padding: 7px 16px;
    background: #888;
    color: #fff;
    border-radius: 3px;
    font-size: 13px;
}

.matome-btn-back:hover {
    background: #666;
    color: #fff;
    text-decoration: none;
}

/* =============================================
   サイドバー
   ============================================= */
.matome-sidebar-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 16px;
    overflow: hidden;
}

.matome-sidebar-title {
    background: #cc0000;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    padding: 8px 12px;
    margin: 0;
}

.matome-sidebar-body {
    padding: 10px 0;
}

/* カテゴリーリスト */
.matome-sidebar-categories {
    list-style: none;
    margin: 0;
    padding: 0;
}

.matome-sidebar-categories li {
    border-bottom: 1px solid #f0f0f0;
}

.matome-sidebar-categories li:last-child {
    border-bottom: none;
}

.matome-sidebar-categories a {
    display: block;
    padding: 7px 14px;
    font-size: 13px;
    color: #444;
}

.matome-sidebar-categories a:hover {
    background: #f5f0f0;
    color: #cc0000;
    text-decoration: none;
    padding-left: 18px;
}

/* 最新記事リスト */
.matome-sidebar-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.matome-sidebar-posts li {
    border-bottom: 1px solid #f0f0f0;
}

.matome-sidebar-posts li:last-child {
    border-bottom: none;
}

.matome-sidebar-posts a {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: #333;
    line-height: 1.4;
    align-items: flex-start;
}

.matome-sidebar-posts a:hover {
    background: #f5f0f0;
    color: #cc0000;
    text-decoration: none;
}

.matome-sidebar-posts-thumb {
    width: 48px;
    height: 36px;
    flex-shrink: 0;
    background: #e8e8e8;
    border-radius: 2px;
    overflow: hidden;
}

.matome-sidebar-posts-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.matome-sidebar-posts-thumb-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 18px;
}

.matome-sidebar-posts-text {
    flex: 1;
    min-width: 0;
}

/* =============================================
   フッター
   ============================================= */
.matome-footer {
    background: #333;
    color: #aaa;
    text-align: center;
    padding: 16px;
    font-size: 12px;
    margin-top: 24px;
}

.matome-footer a {
    color: #bbb;
}

/* =============================================
   レスポンシブ
   ============================================= */
@media (max-width: 768px) {
    .matome-wrapper {
        flex-direction: column;
        padding: 0 10px;
    }

    .matome-sidebar {
        width: 100%;
    }

    .matome-post-thumb {
        width: 100px;
    }

    .matome-post-thumb img,
    .matome-post-thumb-placeholder {
        height: 80px;
    }

    .matome-article {
        padding: 14px 16px;
    }

    .matome-article-title {
        font-size: 18px;
    }

    .matome-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
