/* カスタムスタイル */
/* 映画詳細ページのスタイル */
.prose {
    max-width: 100%;
}

.prose p {
    margin-bottom: 1em;
    line-height: 1.6;
}

/* スケジュールホバーエフェクト */
button[class*="bg-indigo-600"]:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}
/* スライダーのスタイル */
.swiper-container {
    width: 100%;
    max-width: 2048px; /* 最大幅を2048pxに制限 */
    margin: 0 auto;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    height: 0;
    padding-bottom: 41.9%; /* 858/2048 * 100% */
}

.swiper-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #f3f4f6; /* 画像読み込み中の背景色 */
}

/* バナー画像の基本スタイル */
.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.3s ease;
    display: block;
}

/* 画像読み込み中のスタイル */
.banner-image[src=""] {
    opacity: 0;
}

/* 画像読み込み完了時のスタイル */
.banner-image.loaded {
    opacity: 1;
}

/* スライダーナビゲーションボタン */
.swiper-button-next,
.swiper-button-prev {
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    top: calc(50% - 22px); /* 上下中央に配置 */
}

/* ページネーションの位置調整 */
.swiper-pagination {
    bottom: 20px !important; /* 下からの余白を調整 */
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 4px !important;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #fff;
    width: 30px;
    border-radius: 5px;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    transform: scale(1.2);
}

/* スライダーページネーション */
.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    margin: 0 5px !important;
}

.swiper-pagination-bullet-active {
    background: #4f46e5;
    width: 30px;
    border-radius: 5px;
}

/* バナー画像のローディングアニメーション */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

/* バナー画像のローディング中 */
.banner-image:not([src]) {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f3f4f6 4%, #e5e7eb 25%, #f3f4f6 36%);
    background-size: 1000px 100%;
}

/* コンテンツ表示アニメーション */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* レスポンシブ調整 */
@media (max-width: 1024px) {
    .swiper-slide {
        padding-top: 41.9%; /* 2048:858のアスペクト比を維持 */
    }
    
    .swiper-pagination {
        bottom: 15px !important;
    }
}

@media (max-width: 768px) {
    .swiper-slide {
        padding-top: 41.9%; /* 2048:858のアスペクト比を維持 */
    }
    
    .swiper-pagination {
        bottom: 10px !important;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    .swiper-pagination {
        bottom: 15px !important;
    }
}

/* スクロールバーのスタイル */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a5b4fc;
}

/* ホバーエフェクト */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* ローディングアニメーション */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* モバイルメニューのアニメーション */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-10px);
}

.mobile-menu-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 200ms, transform 200ms;
}

.mobile-menu-exit {
    opacity: 1;
}

.mobile-menu-exit-active {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 200ms, transform 200ms;
}
