/* ========================================
   動画モーダル - スタイル
   ======================================== */

/* 動画サムネイル */
.video-thumbnail-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.video-thumbnail-item:hover::before {
    opacity: 1;
}

/* 動画プレビュー（サムネイル表示用） */
.video-thumbnail-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.video-thumbnail-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.05) 100%);
}

.video-thumbnail-placeholder i.fa-video {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 10px;
}

.video-thumbnail-placeholder p {
    font-size: 14px;
    color: #666;
    text-align: center;
    padding: 0 10px;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.video-play-button i {
    font-size: 28px;
    color: #3498db;
    margin-left: 3px; /* 再生アイコンを中央に見せるための微調整 */
}

.video-thumbnail-item:hover .video-play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.video-thumbnail-item:active .video-play-button {
    transform: translate(-50%, -50%) scale(0.95);
}

/* モーダルオーバーレイ */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* モーダルコンテナ */
.video-modal-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 閉じるボタン */
.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 10px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    z-index: 10001;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.video-modal-close i {
    pointer-events: none;
}

/* 動画コンテンツ */
.video-modal-content {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.video-modal-content video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .video-modal-overlay {
        padding: 10px;
    }
    
    .video-modal-close {
        top: -45px;
        right: -5px;
        font-size: 28px;
        width: 45px;
        height: 45px;
    }
    
    .video-modal-content {
        border-radius: 4px;
    }
    
    .video-modal-content video {
        max-height: 70vh;
    }
    
    .video-play-button {
        width: 60px;
        height: 60px;
    }
    
    .video-play-button i {
        font-size: 24px;
    }
    
    .video-thumbnail-placeholder i.fa-video {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .video-modal-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.7);
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .video-modal-close:hover {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .video-modal-content video {
        max-height: 60vh;
    }
    
    .video-play-button {
        width: 50px;
        height: 50px;
    }
    
    .video-play-button i {
        font-size: 20px;
    }
}

/* ローディング表示（オプション） */
.video-modal-content.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

