/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #f5f5f5;
}

/* ヘッダー */
header {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
}

header h1 a:hover {
    opacity: 0.8;
}

header .subtitle {
    margin-top: 0.5rem;
    font-size: 1rem;
    opacity: 0.9;
}

/* メインコンテンツ */
main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

article {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* 章セクション */
.chapter {
    background-color: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chapter h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.4rem;
}

/* エピソードリスト - カード型 */
.episode-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.8rem;
}

.episode-list li {
    margin-bottom: 0;
}

.episode-card {
    display: block;
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.episode-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.episode-card img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    display: block;
    background-color: #f8f9fa;
}

.episode-card-content {
    padding: 0.6rem;
}

.episode-card h3 {
    font-size: 0.8rem;
    line-height: 1.3;
    color: #2c3e50;
    margin: 0;
}

/* サムネイルがない場合のプレースホルダー */
.episode-card.no-thumbnail img {
    background-color: #e0e0e0;
}

/* 記事コンテンツ */
article h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content {
    background-color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.9;
}

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

.content h3 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
    color: #2c3e50;
}

.content ul, .content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

/* ナビゲーション */
.episode-nav {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.btn-home, .btn-next {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.btn-home:hover, .btn-next:hover {
    background-color: #2980b9;
}

/* フッター */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

/* レスポンシブ */
@media (max-width: 768px) {
    header h1 a {
        font-size: 1.5rem;
    }

    .chapter {
        padding: 1.5rem;
    }

    .episode-list {
        grid-template-columns: 1fr;
    }

    article h2 {
        font-size: 1.4rem;
        padding: 1rem;
    }

    .content {
        padding: 1.5rem;
    }

    .episode-nav {
        flex-direction: column;
    }

    .btn-home, .btn-next {
        width: 100%;
        text-align: center;
    }
}
