body {
    font-family: Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

header {
    background-color: #fff;
    color: #333;
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header h1 span {
    /* No individual animation for general design */
    display: inline;
}

.highlight {
    color: #007bff;
    /* A modern blue for highlight */
    font-size: 1.2em;
    /* Slightly larger than surrounding text */
    font-weight: bold;
}

nav ul {
    margin: 1rem 0 0 0;
    padding: 0;
    list-style: none;
    text-align: center;
}

nav li {
    display: inline-block;
    margin: 0 1rem;
}

nav a {
    color: #007bff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
}

main {
    padding: 2rem;
    max-width: 960px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

footer {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    text-align: center;
    margin-top: 20px;
}

/* Responsive Styles */
@media (max-width: 960px) {
    main {
        padding: 2rem 1rem;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    /* Horizontal Scrollable Menu for Mobile */
    nav ul {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding-bottom: 5px;
        /* Space for scrollbar */
        margin: 0.5rem 0 0 0;
        gap: 10px;
        width: 100%;
        padding-left: 10px;
        /* Add some left padding */
        padding-right: 10px;
        /* Add some right padding */
        box-sizing: border-box;
        /* Ensure padding is included in width */
    }

    nav li {
        display: block;
        /* Restore flex item behavior */
        margin: 0;
        /* Remove default margin */
        flex-shrink: 0;
        /* Prevent items from shrinking */
    }

    nav a {
        font-size: 0.9rem;
        display: block;
        padding: 0.5rem 0.8rem;
        background-color: #f8f9fa;
        /* Slight background to distinguish buttons */
        border-radius: 20px;
    }

    main {
        padding: 1rem;
    }

    /* Prevent page sway */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

    /* Pagination Optimization */
    .pagination {
        display: flex;
        flex-wrap: wrap;
        /* Allow buttons to wrap */
        justify-content: center;
        gap: 5px;
    }

    .page-link {
        padding: 5px 10px;
        font-size: 0.85rem;
        margin: 2px;
    }

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

    .dialogue-box {
        max-width: 95%;
    }
}

/* 比較表のスタイル */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comparison-table th,
.comparison-table td {
    border: 1px solid #ddd;
    padding: 0.8rem;
    text-align: left;
}

.comparison-table th {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
}

.comparison-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.comparison-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Genre Filter Styles */
.genre-filter {
    text-align: center;
    margin-bottom: 2rem;
}

.genre-filter label {
    margin-right: 1rem;
    font-weight: bold;
}

#genre-select {
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

/* Post Meta Styles */
.post-meta {
    margin-bottom: 1.5rem;
}

.post-meta .post-date {
    color: #6c757d;
    margin: 0;
}

.genre-tag {
    font-weight: bold;
    color: #007bff;
}

/* Dialogue Styles */
.dialogue-container {
    margin: 20px 0;
}

.dialogue-box {
    position: relative;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    max-width: 80%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}

.dialogue-box::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.dialogue-left {
    background-color: #e0f7fa;
    /* Light blue for left speaker */
    margin-right: auto;
    text-align: left;
}

.dialogue-left::before {
    border-width: 10px 15px 10px 0;
    border-color: transparent #e0f7fa transparent transparent;
    left: -14px;
    top: 15px;
}

.dialogue-right {
    background-color: #fce4ec;
    /* Light pink for right speaker */
    margin-left: auto;
    text-align: left;
}

.dialogue-right::before {
    border-width: 10px 0 10px 15px;
    border-color: transparent transparent transparent #fce4ec;
    right: -14px;
    top: 15px;
}

.dialogue-speaker {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

/* Specific character colors/styles if needed */
.dialogue-nyu {
    /* Specific style for にゅー */
}

.dialogue-mei {
    /* Specific style for めい */
}

.dialogue-ron {
    /* Specific style for ろん */
}

.dialogue-kansai {
    /* Specific style for 謎のヒーロー */
}