@charset "utf-8";

/* =========================================
   動画統計 (video_stats.ejs) 固有レイアウト
========================================= */

.video-thumbnail-container {
    text-align: center;
    margin: 20px 0 30px;
}

.video-thumbnail-container img {
    max-width: 100%;
    max-height: 280px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#main-chart {
    width: 100%;
    height: 540px;
    margin: 10px 0 40px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.yt-jump-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 15px;
    background: #cc0000;
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
}

/* サマリー数値グリッド (動画統計用) */
.video-stats-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .video-stats-summary {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================
   動画統計用ランキングアイテム (丸型アバター)
========================================= */
.user-ranking-item {
    display: flex !important;
    align-items: center !important;
    padding: 8px 10px !important;
    margin-bottom: 6px !important;
    gap: 10px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 8px !important;
}

.user-ranking-info {
    display: flex !important;
    align-items: center !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
    gap: 8px !important;
}

.user-ranking-thumb {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.user-ranking-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.user-ranking-title {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 0.9rem !important;
    color: #eee !important;
    line-height: 1.4 !important;
    padding-bottom: 2px !important;
}

.user-ranking-viewers-box {
    flex-shrink: 0 !important;
    text-align: right !important;
}

.user-ranking-viewers-val {
    font-size: 1.4rem !important;
    font-weight: bold !important;
    color: #fff;
}

/* メンギフ用のアンダーライン */
.theme-subs .ranking-col-title {
    border-bottom: 2px solid #e91e63 !important;
}

.theme-subs .user-ranking-viewers-val {
    color: #e91e63 !important;
}

/* =========================================
   スマホ用 3タブ切り替え制御
========================================= */
.video-tab-container {
    display: none !important;
    /* PCでは非表示 */
}

/* =========================================
   PC表示用：3列グリッド固定レイアウト
   （データ無しで非表示になっても空白枠を維持する）
========================================= */
@media (min-width: 1025px) {
    #top-rankings-row {
        display: grid !important;
        /* 常に均等な3列の枠組みを作る */
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .video-tab-container {
        display: flex !important;
        justify-content: center;
        background: rgba(0, 0, 0, 0.3);
        padding: 6px;
        border-radius: 12px;
        margin: 10px auto 25px auto;
        width: 100%;
        box-sizing: border-box;
        flex-wrap: wrap;
        gap: 8px;
    }

    .video-tab-btn {
        flex: 1 1 40% !important;
        min-width: 110px !important;
        background: transparent;
        color: #888;
        border: none;
        padding: 12px 10px;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: bold;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .video-tab-btn.active {
        background-color: #383838 !important;
        color: #fff !important;
    }

    /* ランキングの表示・非表示切り替え (!importantで確実に制御) */
    #top-rankings-row {
        flex-direction: column !important;
    }

    #top-rankings-row>div {
        display: none !important;
        width: 100% !important;
    }

    #top-rankings-row.show-comments #ranking-comments {
        display: block !important;
    }

    #top-rankings-row.show-gifts #ranking-gifts {
        display: block !important;
    }

    #top-rankings-row.show-superchats #ranking-superchats {
        display: block !important;
    }
}

.user-badge {
    font-size: 0.7rem;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 5px;
    display: inline-block;
    vertical-align: middle;
}

.user-badge.member {
    background: rgba(0, 188, 212, 0.2);
    color: #00bcd4;
    border: 1px solid #00bcd4;
}