/**
 * AI Article Generator - フロントエンド記事スタイル
 *
 * AAG生成記事専用CSS。.aag-content ラッパー内のみに適用。
 * テーマCSSが不十分な場合でも見やすいデザインを提供する。
 */

.aag-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.85;
    font-size: 16px;
    color: #333;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 見出し */
.aag-content h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin: 2em 0 0.8em;
    padding: 0.4em 0 0.4em 0.8em;
    border-left: 4px solid #2563eb;
    line-height: 1.4;
}

.aag-content h3 {
    font-size: 1.25em;
    font-weight: 700;
    margin: 1.5em 0 0.6em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.4;
}

.aag-content h4 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 1.2em 0 0.5em;
}

/* 段落 */
.aag-content p {
    margin: 0 0 1.2em;
}

/* リスト */
.aag-content ul,
.aag-content ol {
    margin: 0 0 1.2em;
    padding-left: 1.8em;
}

.aag-content li {
    margin-bottom: 0.4em;
}

.aag-content ul li {
    list-style-type: disc;
}

.aag-content ol li {
    list-style-type: decimal;
}

.aag-content li > ul,
.aag-content li > ol {
    margin-top: 0.3em;
    margin-bottom: 0;
}

/* テーブル */
.aag-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 0.95em;
}

.aag-content th,
.aag-content td {
    border: 1px solid #d1d5db;
    padding: 0.6em 0.8em;
    text-align: left;
}

.aag-content th {
    background-color: #f3f4f6;
    font-weight: 600;
}

.aag-content tr:nth-child(even) {
    background-color: #f9fafb;
}

/* 引用 */
.aag-content blockquote {
    margin: 1.2em 0;
    padding: 0.8em 1.2em;
    border-left: 3px solid #9ca3af;
    background-color: #f9fafb;
    color: #4b5563;
}

.aag-content blockquote p:last-child {
    margin-bottom: 0;
}

/* 強調 */
.aag-content strong {
    font-weight: 700;
}

/* リンク */
.aag-content a {
    color: #2563eb;
    text-decoration: underline;
}

.aag-content a:hover {
    color: #1d4ed8;
}

/* コード */
.aag-content code {
    background-color: #f3f4f6;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

.aag-content pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1em 1.2em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.2em 0;
}

.aag-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* 画像 */
.aag-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 関連記事セクション */
.aag-content .aag-related-posts {
    margin-top: 2.5em;
    padding-top: 1.5em;
    border-top: 2px solid #e5e7eb;
}

.aag-content .aag-related-posts h3 {
    border-bottom: none;
    padding-bottom: 0;
}

.aag-content .aag-related-posts ul {
    list-style: none;
    padding-left: 0;
}

.aag-content .aag-related-posts li {
    padding: 0.4em 0;
}

.aag-content .aag-related-posts li::before {
    content: "\25b6";
    color: #2563eb;
    margin-right: 0.5em;
    font-size: 0.7em;
    vertical-align: middle;
}

/* レスポンシブ */
@media (max-width: 600px) {
    .aag-content {
        font-size: 15px;
        line-height: 1.75;
    }

    .aag-content h2 {
        font-size: 1.3em;
    }

    .aag-content h3 {
        font-size: 1.15em;
    }

    .aag-content table {
        font-size: 0.85em;
    }

    .aag-content th,
    .aag-content td {
        padding: 0.4em 0.5em;
    }
}
