/* TikTok風動画プレーヤー */

/* 全画面コンテナ */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* 動画アイテム */
.video-item {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* 動画要素 */
.video-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* iframe（DMMプレイヤー埋め込み） */
.video-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* 動画プレースホルダー（動画がない場合） */
.video-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.video-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.7;
}

.no-video-badge {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* 動画情報オーバーレイ */
.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    pointer-events: none;
}

.video-overlay * {
    pointer-events: auto;
}

/* 動画タイトル */
.video-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 動画メタ情報 */
.video-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #e0e0e0;
    margin-bottom: 10px;
}

/* タグ */
.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.video-tags .tag {
    background: #FFA502;
    color: #fff;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.video-tags .tag:hover {
    background: #FF7F00;
}

/* アクションボタン（右側） */
.video-actions {
    position: absolute;
    right: 15px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.action-btn.active {
    background: rgba(255, 107, 107, 0.8);
}

/* いいね数 */
.like-count {
    font-size: 10px;
    margin-top: 2px;
    font-weight: bold;
}

.action-label {
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
}

/* 再生/一時停止ボタン（中央） */
.play-pause-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.play-pause-btn.show {
    display: flex;
}

.play-pause-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ローディング */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* プログレスバー */
.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
}

.video-progress-bar {
    height: 100%;
    width: 0%;
    background: #ff6b6b;
    transition: width 0.1s linear;
}

/* 閉じるボタン */
.close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* スクロールインジケーター */
.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-size: 12px;
    animation: bounce 2s infinite;
    z-index: 100;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.scroll-indicator::after {
    content: '↓';
    font-size: 24px;
    margin-top: 5px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .video-overlay {
        padding: 15px;
    }

    .video-title {
        font-size: 14px;
    }

    .video-meta {
        font-size: 12px;
    }

    .video-actions {
        bottom: 100px;
        right: 10px;
        gap: 15px;
    }

    .action-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
        min-width: 44px;
        min-height: 44px;
    }

    .play-pause-btn {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .close-btn,
    .mute-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* レスポンシブ: 小型スマートフォン */
@media (max-width: 480px) {
    .video-overlay {
        padding: 12px;
    }

    .video-title {
        font-size: 13px;
    }

    .video-meta {
        font-size: 11px;
        gap: 10px;
    }

    .video-tags .tag {
        padding: 2px 8px;
        font-size: 11px;
    }

    .video-actions {
        bottom: 80px;
        right: 8px;
        gap: 12px;
    }

    .action-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .action-label {
        font-size: 11px;
    }

    .like-count {
        font-size: 9px;
    }

    .play-pause-btn {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .close-btn,
    .mute-btn {
        width: 44px;
        height: 44px;
        top: 15px;
    }

    .close-btn {
        right: 15px;
    }

    .mute-btn {
        left: 15px;
    }

    .genre-nav-container {
        bottom: 12px;
        padding: 8px 15px;
        gap: 5px;
    }

    .genre-nav-btn {
        padding: 6px 12px;
        font-size: 11px;
        min-height: 32px;
    }

    .buy-button {
        padding: 10px 18px;
        font-size: 13px;
        min-height: 44px;
    }

    .details-btn {
        padding: 8px 16px;
        font-size: 13px;
        min-height: 44px;
    }
}

/* レスポンシブ: 超小型スマートフォン */
@media (max-width: 375px) {
    .video-title {
        font-size: 12px;
    }

    .video-meta {
        font-size: 10px;
        flex-wrap: wrap;
    }

    .video-tags .tag {
        padding: 2px 6px;
        font-size: 10px;
    }

    .action-btn {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .play-pause-btn {
        width: 52px;
        height: 52px;
        font-size: 26px;
    }

    .genre-nav-btn {
        padding: 5px 10px;
        font-size: 10px;
        min-height: 30px;
    }
}

/* レスポンシブ: ランドスケープモード（横向き） */
@media (max-height: 600px) and (orientation: landscape) {
    .video-overlay {
        padding: 10px 15px;
    }

    .video-title {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .video-meta {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .video-tags {
        margin-top: 5px;
    }

    .video-tags .tag {
        padding: 2px 8px;
        font-size: 10px;
    }

    .video-actions {
        bottom: 50px;
        right: 10px;
        gap: 10px;
    }

    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .action-label {
        font-size: 10px;
    }

    .play-pause-btn {
        width: 50px;
        height: 50px;
        font-size: 25px;
    }

    .close-btn,
    .mute-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
        top: 10px;
    }

    .close-btn {
        right: 10px;
    }

    .mute-btn {
        left: 10px;
    }

    .genre-nav-container {
        bottom: 8px;
        padding: 6px 12px;
    }

    .genre-nav-btn {
        padding: 4px 10px;
        font-size: 11px;
        min-height: 28px;
    }

    .scroll-indicator {
        display: none;
    }

    .buy-button,
    .details-btn {
        padding: 6px 14px;
        font-size: 12px;
        min-height: 36px;
    }
}

/* スクロールバー非表示 */
.video-container::-webkit-scrollbar {
    display: none;
}

.video-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ミュートボタン */
.mute-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.mute-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* ジャンルナビゲーション */
.genre-nav-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 30px;
    z-index: 1000;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    overflow-x: auto;
    max-width: 90vw;
    scrollbar-width: none;
}

.genre-nav-container::-webkit-scrollbar {
    display: none;
}

.genre-nav-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.genre-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.genre-nav-btn.active {
    background: #FFFFFF;
    color: #000000;
    border-color: #FFFFFF;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .genre-nav-container {
        bottom: 10px;
        padding: 10px 15px;
        gap: 6px;
    }

    .genre-nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* 購入ボタン */
.buy-button {
    display: inline-block;
    background: #ff6b35;
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: bold;
    margin: 10px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.buy-button:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.buy-button:active {
    transform: translateY(0);
}

/* モバイル対応 */
@media (max-width: 768px) {
    .buy-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 詳細リンクボタン */
.details-btn {
    background: rgba(102, 126, 234, 0.8);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.details-btn:hover {
    background: rgba(118, 75, 162, 0.9);
}
