.top-contents-column {
    display: flex;
}

.contents {
    display: flex;
    flex-direction: column;
}

.main-group-sec {
    display: flex;
    flex-direction: row;
}

.main-section {
    width: 100%;
    padding: 8px;
}

.anime-title {
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    color: #1E90FF;
    /* ★変更: ブルーハワイ系のサブアクセントカラー */
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 2px 5px rgba(30, 144, 255, 0.3);
    /* ★変更: 影も青系に */
}

/* kana-filter 全体のコンテナ */
.kana-filter {
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 各行のグループ */
.kana-filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    justify-content: center;
}

.group-label {
    font-weight: bold;
    margin-right: 15px;
    min-width: 70px;
    color: #bbbbbb;
    font-size: 1.1rem;
}

/* 個々の五十音ボタン */
.kana-btn {
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 5px;
    cursor: pointer;
    font-size: 1.05rem;
    color: #e0e0e0;
    transition: all 0.3s ease;
    min-width: 50px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    touch-action: manipulation;
}

.kana-btn:hover {
    background-color: #1E90FF;
    /* ★変更: ブルーハワイ系のサブアクセントカラー */
    border-color: #1E90FF;
    /* ★変更 */
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 144, 255, 0.4);
    /* ★変更 */
}

.kana-btn.active {
    background-color: #00BCD4;
    /* ★変更: ブルーハワイ系のメインアクセントカラー */
    color: #fff;
    border-color: #00BCD4;
    /* ★変更 */
    box-shadow: 0 4px 10px rgba(0, 188, 212, 0.5);
    /* ★変更 */
    font-weight: bold;
    transform: translateY(-1px);
}

.kana-filter-actions {
    display: none;
}

.search-results-count {
    text-align: right;
    font-size: 1rem;
    color: #aaaaaa;
    margin-bottom: 20px;
    padding-right: 5px;
}

.initial-message {
    text-align: center;
    font-size: 1.1rem;
    color: #bbbbbb;
    margin: 50px 20px;
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 検索ボックスの見た目を改善 */
.search-box {
    margin-bottom: 30px;
    text-align: center;
}

.search-box input[type="text"] {
    width: 90%;
    max-width: 600px;
    padding: 14px 25px;
    border: 1px solid #555;
    border-radius: 30px;
    font-size: 1.1rem;
    background-color: #2a2a2a;
    color: #e0e0e0;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-box input[type="text"]::placeholder {
    color: #888;
}

.search-box input[type="text"]:focus {
    border-color: #00BCD4;
    /* ★変更: ブルーハワイ系のメインアクセントカラー */
    box-shadow: 0 0 12px rgba(0, 188, 212, 0.6);
    /* ★変更 */
    outline: none;
    background-color: #333;
}

/* アニメグリッド */
search-area {
    display: block;
}

.search-img {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #333;
    border-bottom: 1px solid #444;
    aspect-ratio: 16 / 9;
}



search-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* アニメカード全体をリンクにするためのスタイル */
.anime-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* アニメカード */
.anime-card {
    background: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.anime-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* カードコンテンツのスタイル */
.card-content {
    padding: 1rem 0.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.info-meta-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    z-index: 1;
}

.anime-search-title {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: #e0e0e0;
    height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5em;
}

/* ジャンルと放送日のスタイル */
.anime-genre,
.anime-date {
    font-size: 0.85rem;
    color: #cccccc;
    margin: 0.2rem 0;
    line-height: 1.3;
}

/* レスポンシブデザインの調整 */
@media (max-width: 768px) {
    .main-section {
        padding: 15px;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .kana-filter {
        padding: 15px;
        margin-bottom: 20px;
    }

    .group-label {
        min-width: auto;
        margin-right: 10px;
        margin-bottom: 5px;
        font-size: 1rem;
    }

    .kana-filter-row {
        justify-content: center;
        padding-bottom: 0;
        border-bottom: none;
    }

    .kana-btn {
        font-size: 0.9rem;
        padding: 8px 12px;
        margin: 4px;
        min-width: 45px;
    }

    .search-box {
        margin-bottom: 20px;
    }

    .search-box input[type="text"] {
        font-size: 1rem;
        padding: 12px 20px;
    }

    .search-results-count {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .info-meta-label {
        font-size: 0.75rem;
        padding: 6px 9px;
        top: 0;
        left: 0;
    }

    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .anime-card h3 {
        font-size: 0.9rem;
        height: 2.7em;
        margin: 0.6rem 0.4rem;
    }

    .anime-genre,
    .anime-date {
        font-size: 0.8rem;
    }

    .card-content {
        padding: 0.8rem 0.4rem;
    }
}

@media (max-width: 480px) {
    search-area.anime-search-area {
        display: inline-flex;
        flex-direction: column;
        width: -webkit-fill-available;
    }

    .main-section {
        padding: 10px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .kana-filter {
        padding: 10px;
        margin-bottom: 15px;
    }

    .group-label {
        display: block;
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .kana-filter-row {
        flex-direction: row;
        justify-content: center;
    }

    .kana-btn {
        font-size: 0.8rem;
        padding: 7px 10px;
        margin: 3px;
        min-width: 40px;
    }

    .search-box {
        margin-bottom: 15px;
    }

    .anime-search-cardbox {
        display: flex;
        flex-direction: row;
        height: 100px;
        gap: var(--anime-box-compact-gap);
    }

    .info-meta-label {
        font-size: 0.7rem;
        padding: 5px 8px;
    }

    .search-box input[type="text"] {
        font-size: 0.95rem;
        padding: 10px 18px;
    }

    .search-results-count {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .anime-genre,
    .anime-date {
        font-size: 0.75rem;
        margin: 0.1rem 0;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card-content {
        padding: 0;
        max-width: 210px;
        min-width: 210px;
    }
}

@media (max-width: 412px) and (max-height: 914px) {
    .anime-search-cardbox {
        flex-direction: row;
        height: auto;
    }

    .anime-image {
        height: 150px;
    }

    .info-meta-label {
        font-size: 0.6rem;
        padding: 2px 5px;
    }

    .card-content {
        padding: 0;
        max-width: 210px;
        min-width: 210px;
    }
}

@media (max-width: 390px) {
    .anime-search-cardbox {
        flex-direction: row;
        height: auto;
    }

    .anime-image {
        height: 150px;
    }

    .info-meta-label {
        font-size: 0.6rem;
        padding: 2px 5px;
    }

    .card-content {
        padding: 0;
        max-width: 190px;
        min-width: 190px;
    }
}

@media (max-width: 360px) {
    .anime-search-cardbox {
        flex-direction: row;
        height: auto;
        font-size: 0.8rem;
    }

    .anime-search-title {
        font-size: 0.8rem;
        height: auto;
    }

    .info-meta-label {
        font-size: 0.6rem;
        padding: 3px 5px;
    }

    .anime-image {
        height: 150px;
    }

    .card-content {
        padding: 0;
        max-width: 200px;
        min-width: 200px;
    }
}