/*
Theme Name: Custom Adult Content Theme
Theme URI: https://example.com/
Description: DMM/FANZA成人向けコンテンツ用のレスポンシブテーマ。モダンで洗練されたデザインで、ユーザーエクスペリエンスを最優先に設計。
Version: 1.0
Author: Manus AI
Author URI: https://help.manus.im
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: custom-theme
Domain Path: /languages
Tags: responsive, dark-mode, affiliate, adult-content
*/

/* =============================================================================
   リセット・基本スタイル
   ============================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    font-size: 16px;
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
}

/* =============================================================================
   タイポグラフィ
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #222;
}

@media (prefers-color-scheme: dark) {
    h1, h2, h3, h4, h5, h6 {
        color: #f0f0f0;
    }
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0052a3;
    text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
    a {
        color: #66b3ff;
    }
    a:hover {
        color: #99ccff;
    }
}

/* =============================================================================
   レイアウト・コンテナ
   ============================================================================= */

.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .site-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* =============================================================================
   ヘッダー
   ============================================================================= */

.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header a {
    color: white;
}

.site-header a:hover {
    color: #f0f0f0;
}

.site-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.site-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* =============================================================================
   ナビゲーション
   ============================================================================= */

.site-nav {
    margin-top: 20px;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.site-nav a {
    color: white;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.site-nav a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .site-nav ul {
        gap: 15px;
        font-size: 0.9rem;
    }
}

/* =============================================================================
   投稿カード（アーカイブ・トップページ）
   ============================================================================= */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

@media (prefers-color-scheme: dark) {
    .post-card {
        background: #2a2a2a;
    }
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.post-card-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #e0e0e0;
    position: relative;
}

@media (prefers-color-scheme: dark) {
    .post-card-image {
        background: #3a3a3a;
    }
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    color: #222;
}

@media (prefers-color-scheme: dark) {
    .post-card-title {
        color: #f0f0f0;
    }
}

.post-card-title a {
    color: inherit;
}

.post-card-title a:hover {
    color: #0066cc;
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (prefers-color-scheme: dark) {
    .post-card-excerpt {
        color: #aaa;
    }
}

.post-card-meta {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 15px;
}

@media (prefers-color-scheme: dark) {
    .post-card-meta {
        color: #888;
    }
}

.post-card-button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 5px;
    font-weight: 600;
    transition: opacity 0.3s ease;
    text-align: center;
    align-self: flex-start;
}

.post-card-button:hover {
    opacity: 0.9;
    text-decoration: none;
}

/* =============================================================================
   シングルページ（個別投稿）
   ============================================================================= */

.post-single {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    .post-single {
        background: #2a2a2a;
    }
}

@media (max-width: 768px) {
    .post-single {
        padding: 20px;
    }
}

.post-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #222;
}

@media (prefers-color-scheme: dark) {
    .post-title {
        color: #f0f0f0;
    }
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
    color: #666;
}

@media (prefers-color-scheme: dark) {
    .post-meta {
        border-bottom-color: #444;
        color: #aaa;
    }
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-content {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #333;
}

@media (prefers-color-scheme: dark) {
    .post-content {
        color: #ddd;
    }
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 10px;
}

.article-image {
    text-align: center;
    margin: 30px 0;
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* =============================================================================
   アフィリエイトボタン
   ============================================================================= */

.affiliate-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.affiliate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
    text-decoration: none;
    color: white;
}

@media (max-width: 480px) {
    .affiliate-button {
        display: block;
        width: 100%;
    }
}

/* =============================================================================
   パンくずナビゲーション
   ============================================================================= */

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #666;
}

@media (prefers-color-scheme: dark) {
    .breadcrumb {
        color: #aaa;
    }
}

.breadcrumb a {
    color: #0066cc;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* =============================================================================
   関連記事
   ============================================================================= */

.related-posts {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

@media (prefers-color-scheme: dark) {
    .related-posts {
        border-top-color: #444;
    }
}

.related-posts h3 {
    margin-bottom: 30px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   ページネーション
   ============================================================================= */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #0066cc;
    transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .pagination a,
    .pagination .page-numbers {
        border-color: #444;
        color: #66b3ff;
    }
}

.pagination a:hover {
    background: #0066cc;
    color: white;
    text-decoration: none;
}

.pagination .current {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* =============================================================================
   サイドバー
   ============================================================================= */

.sidebar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

@media (prefers-color-scheme: dark) {
    .sidebar {
        background: #2a2a2a;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: static;
        top: auto;
    }
}

.widget {
    margin-bottom: 30px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

@media (prefers-color-scheme: dark) {
    .widget ul li {
        border-bottom-color: #444;
    }
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul a {
    color: #0066cc;
    transition: color 0.3s ease;
}

.widget ul a:hover {
    color: #0052a3;
}

/* =============================================================================
   フッター
   ============================================================================= */

.site-footer {
    background: #222;
    color: #ccc;
    padding: 50px 0 20px;
    margin-top: 60px;
    border-top: 3px solid #667eea;
}

@media (prefers-color-scheme: dark) {
    .site-footer {
        background: #0a0a0a;
    }
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

.footer-widget {
    color: #ccc;
}

.footer-widget h3 {
    color: white;
    margin-bottom: 15px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #66b3ff;
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: #99ccff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
}

/* =============================================================================
   検索フォーム
   ============================================================================= */

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: white;
    color: #333;
}

@media (prefers-color-scheme: dark) {
    .search-form input[type="search"] {
        background: #3a3a3a;
        border-color: #444;
        color: #e0e0e0;
    }
}

.search-form button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: #5568d3;
}

/* =============================================================================
   レスポンシブ対応
   ============================================================================= */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    body {
        font-size: 15px;
    }
    
    .site-header {
        padding: 20px 0;
    }
    
    .site-branding {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    body {
        font-size: 14px;
    }
    
    .site-container {
        padding: 0 15px;
    }
}

/* =============================================================================
   アクセシビリティ
   ============================================================================= */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* =============================================================================
   ローディング・アニメーション
   ============================================================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.5s ease-out;
}

/* =============================================================================
   プリント対応
   ============================================================================= */

@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .pagination,
    .affiliate-button {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        color: black;
    }
}
