/*
Theme Name: Hitomi Raw AI Theme
Theme URI: https://hitomi-raw-ai.com
Description: ミニマル・モダン黒基調デザイン - 爆速表示最適化
Version: 1.0.0
Author: Hitomi Raw AI
Author URI: https://hitomi-raw-ai.com
License: GPL2
Text Domain: hitomi-raw-ai
*/

/* ===================================
   リセット & ベーススタイル
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #ffffff;
    text-decoration: none;
}

a:hover {
    color: #ff0000;
}

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

/* ===================================
   レイアウト
   =================================== */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   ヘッダー
   =================================== */
.site-header {
    background: #000000;
    border-bottom: 1px solid #1a1a1a;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
}

.site-title a {
    color: #ffffff;
}

.site-title a:hover {
    color: #ff0000;
}

.site-description {
    font-size: 12px;
    color: #808080;
    margin-top: 5px;
    letter-spacing: 1px;
}

/* ===================================
   メインコンテンツ
   =================================== */
.site-main {
    padding: 60px 0;
    min-height: 70vh;
}

/* ===================================
   投稿一覧（グリッドレイアウト）
   =================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.post-card {
    background: #0f0f0f;
    border: 1px solid #1a1a1a;
    overflow: hidden;
}

.post-card:hover {
    border-color: #ff0000;
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: #000000;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    padding: 0;
    display: block;
}

.post-content-wrapper {
    padding: 20px;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #ffffff;
}

.post-title a {
    color: #ffffff;
}

.post-title a:hover {
    color: #ff0000;
}

.post-meta {
    font-size: 11px;
    color: #808080;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.post-excerpt {
    font-size: 13px;
    color: #c0c0c0;
    line-height: 1.5;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    font-size: 12px;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 8px 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.read-more:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: #ffffff;
}

/* ===================================
   個別投稿ページ
   =================================== */
.single-post {
    max-width: 800px;
    margin: 0 auto;
}

.entry-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #1a1a1a;
}

.entry-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #ffffff;
}

.entry-meta {
    font-size: 12px;
    color: #808080;
    letter-spacing: 1px;
}

.entry-content {
    font-size: 15px;
    line-height: 1.8;
    color: #e0e0e0;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content img {
    margin: 0 !important;
    padding: 0 !important;
    display: block;
}

/* すべてのimg要素のmarginを0に強制設定 */
img {
    margin: 0 !important;
    padding: 0 !important;
}

.entry-content h2,
.entry-content h3 {
    color: #ffffff;
    margin: 40px 0 20px;
    font-weight: 600;
}

.entry-content h2 {
    font-size: 24px;
}

.entry-content h3 {
    font-size: 20px;
}

.entry-content a {
    color: #ffffff;
    border-bottom: 1px solid #ffffff;
}

.entry-content a:hover {
    color: #ff0000;
    border-color: #ff0000;
}

.entry-content img {
    margin: 30px 0;
}

/* アフィリエイトボタン */
.affiliate-button {
    display: inline-block;
    background: #ff0000;
    color: #ffffff !important;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    margin: 20px 0;
}

.affiliate-button:hover {
    background: #cc0000;
}

/* ===================================
   フッター
   =================================== */
.site-footer {
    background: #000000;
    border-top: 1px solid #1a1a1a;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    font-size: 12px;
    color: #808080;
    letter-spacing: 1px;
}

/* ===================================
   ページネーション
   =================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 60px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    background: #0f0f0f;
    border: 1px solid #1a1a1a;
    color: #ffffff;
    font-size: 14px;
}

.pagination a:hover {
    background: #ff0000;
    border-color: #ff0000;
}

.pagination .current {
    background: #ff0000;
    border-color: #ff0000;
}

/* ===================================
   レスポンシブ（モバイル最適化）
   =================================== */
@media (max-width: 768px) {
    .site-container {
        padding: 0 15px;
    }
    
    .site-header {
        padding: 15px 0;
    }
    
    .site-title {
        font-size: 20px;
    }
    
    .site-main {
        padding: 30px 0;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .post-card {
        border-width: 1px;
    }
    
    .post-content-wrapper {
        padding: 10px;
    }
    
    .post-title {
        font-size: 14px;
    }
    
    .post-meta {
        font-size: 10px;
    }
    
    .post-excerpt {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .read-more {
        font-size: 11px;
        padding: 6px 15px;
    }
    
    .entry-title {
        font-size: 24px;
    }
    
    .entry-content {
        font-size: 14px;
    }
    
    .affiliate-button {
        width: 100%;
        text-align: center;
        padding: 12px 30px;
        font-size: 14px;
    }
    
    /* ジャンルチップ（スマホ） */
    .genre-chips {
        gap: 6px;
        margin: 15px 0;
    }
    
    .genre-chip {
        padding: 4px 12px;
        font-size: 11px;
    }
    
    /* 関連作品（スマホ） */
    .related-posts {
        margin-top: 40px;
        padding-top: 30px;
    }
    
    .related-posts-title {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    /* アーカイブヘッダー（スマホ） */
    .archive-header {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .archive-title {
        font-size: 20px;
    }
    
    .archive-description {
        font-size: 14px;
    }
    
    .archive-meta {
        font-size: 12px;
    }
}

/* ===================================
   ジャンルチップ
   =================================== */
.genre-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.genre-chip {
    display: inline-block;
    padding: 6px 16px;
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
}

.genre-chip:hover {
    background-color: #ff0000;
    color: #ffffff;
    border-color: #ff0000;
}

/* ===================================
   アーカイブヘッダー
   =================================== */
.archive-header {
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 1px solid #1a1a1a;
}

.archive-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.archive-description {
    font-size: 16px;
    color: #808080;
    line-height: 1.6;
    margin-bottom: 16px;
}

.archive-meta {
    font-size: 14px;
    color: #606060;
    letter-spacing: 0.5px;
}

/* ===================================
   関連作品
   =================================== */
.related-posts {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid #1a1a1a;
}

.related-posts-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===================================
   パフォーマンス最適化
   =================================== */
/* 画像の遅延読み込み */
img[loading="lazy"] {
    opacity: 0;
    animation: fadeIn 0.3s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* フォントの最適化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
    }
}

/* ===================================
   ユーティリティクラス
   =================================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}
