/* ==========================================
   MVシネマ ロビー専用スタイル（統合版 - PC固定サイズ対応）
   ========================================== */

/* 1. フィルムスクロール演出 */
@keyframes scrollFilm {
    0% { background-position: 0 0; }
    100% { background-position: 0 -200px; }
}

.lobby-container {
    position: relative;
    width: 100%;
    /* デフォルト（モバイル・タブレット）は画面比率を維持 [cite: 193] */
    height: 35vh; 
    margin: 0 auto 1rem auto;
    background-image: url('/backgrounds/theater-wall.jpg'), url('/backgrounds/filmstrip.png');
    background-size: cover, auto;
    background-position: center;
    background-blend-mode: overlay;
    background-repeat: no-repeat;
    animation: scrollFilm 20s linear infinite;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

/* ★追加：PC版（1025px以上）でのプレビューエリア固定設定 */
@media (min-width: 1025px) {
    .lobby-container {
        /* ブラウザのズームに影響されない固定ピクセル指定 */
        width: 1600px !important; 
        height: 800px !important; 
        max-width: 95vw; /* 画面はみ出し防止 */
        margin-top: 20px;
    }

    #mvPlayer {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important; /* 動画の比率を維持して全体表示 */
    }

    .overlay-text {
        top: 85% !important; /* 動画が大きくなった分、テキストを下げて視認性を確保 */
    }
}

.lobby-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    border-radius: 12px;
}

#mvPlayer {
    display: block;
    margin: 0 auto;
    width: 100%;
}

/* 2. 中央テキスト・タイトル */
.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    z-index: 2;
}

.overlay-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffcc00;
    text-shadow: 0 0 10px #ffcc00, 0 0 20px #ffcc00;
}

/* 3. メインセクション（赤系グラデーション） */
.mv-carousel-section {
    padding: 1.5rem;
    background-color: #3a0000;
    background-image: linear-gradient(to bottom, #4a0000, #1a0000);
    color: #fff;
    z-index: 2;
    position: relative;
    max-width: 1600px; /* プレビューに合わせて拡張 [cite: 174] */
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255,0,0,0.3);
    border: 2px solid #660000;
    overflow: hidden;
}

.carousel-title {
    font-size: 2.0rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #ff4444;
    text-shadow: 0 0 10px #ff4444, 0 0 20px #ff0000;
}

/* 4. ジャンルタブ [cite: 178-180] */
.genre-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.genre-tab {
    background-color: #330000;
    color: #ff9999;
    border: 1px solid #660000;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.genre-tab:hover, .genre-tab.active {
    background-color: #ff4444;
    color: #fff;
    box-shadow: 0 0 10px #ff0000;
}

/* 5. 検索・ソートUI [cite: 181-184] */
.search-bar input[type="text"] {
    border: 1px solid #aa0000;
    background-color: #1a0000;
    color: #fff;
    padding: 0.5rem;
    width: 250px;
    border-radius: 6px;
}

.search-bar button {
    background-color: #cc0000;
    color: #fff;
    border: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    box-shadow: 0 0 5px #ff0000;
    cursor: pointer;
}

#sortSelector {
    background-color: #1a0000;
    color: #fff;
    border: 1px solid #660000;
    padding: 5px;
    border-radius: 4px;
    margin-top: 1rem;
}

/* 6. Swiper & カードレイアウト [cite: 185-192] */
.swiper {
    width: 100%;
    max-width: 1550px; /* 全体幅拡張に合わせて調整 */
    margin: 0 auto;
    overflow: hidden;
    padding: 10px 0;
}

.mv-card {
    width: 100%;
    height: 240px;
    padding: 0.5rem;
    text-align: center;
    background-color: #1a0000;
    border: 2px solid #660000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
    transition: transform 0.2s ease;
    border-radius: 8px;
    cursor: pointer;
}

.mv-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}

.mv-card img.mv-thumbnail {
    width: 100%;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.mv-card p {
    font-size: 0.85rem;
    margin: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mv-meta span {
    color: #ffcccc;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 2px;
}

/* 7. レスポンシブ (モバイル専用設定を保護) [cite: 193-194] */
@media (max-width: 600px) {
    .lobby-container { 
        height: 35vh; /* スマホ版の高さを死守 */
    }
    .overlay-text h1 { font-size: 1.8rem; }
    .mv-card { height: auto; min-height: 180px; }
    .carousel-title { font-size: 1.4rem; }
}
