.anime-text {
    color: var(--anime-card-text-default-color);
}
.back-color {
    background-color: var(--anime-cardsection-backdefault-color);
}
.anime-meta-text {
    color: var(--anime-card-metainfo-default-color);
}

.top-contents-column {
    display: flex;
    min-height: 1000px;
}

.main-group-sec {
    flex-direction: row;
    display: flex;
}

.main-video-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: var(--anime-margin-x2);
}

/* ========== トレーラーグリッド ========== */
.trailers-grid-container {
    margin: 2rem auto;
    padding: 0 1rem;
}

.trailers {
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

.trailer-item {
    position: relative;
    cursor: pointer;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trailer-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.trailer-item img.thumbnail {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.trailer-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.trailer-item:hover .overlay {
    opacity: 1;
}

.play-button {
    font-size: 48px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.trailer-item .title {
    padding: 0.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #222;
    text-align: center;
    background: #fafafa;
    border-top: 1px solid #eee;
}

/* ========== ページネーション ========== */
.pagination {
    text-align: center;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination a,
.pagination span.current-page {
    display: inline-block;
    min-width: 36px;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

/* 通常のリンク */
.pagination a {
    background: #f1f3f5;
    color: #007bff;
    border: 1px solid #dee2e6;
}

.pagination a:hover {
    background: #007bff;
    color: #fff;
    transform: translateY(-2px);
}

/* 現在のページ */
.pagination span.current-page {
    background: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    cursor: default;
    pointer-events: none;
}

/* ========== 戻るボタン ========== */
.button-container {
    text-align: center;
    margin: 3rem 0 2rem;
}

.button-container a {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.2s ease;
}

.button-container a:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* スマホ対応 */
@media screen and (max-width: 600px) {
    .trailers {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1rem;
    }

    .trailer-item {
        display: flex;
        flex-direction: row;
    }

    .trailer-item .title {
        width: -webkit-fill-available;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .trailer-item img.thumbnail {
        width: 50%;
        height: fit-content;
        aspect-ratio: 16 / 9;
    }

    .pagination a,
    .pagination span.current-page {
        min-width: 32px;
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
    }
}