/* smash_live_card.css - 配信カード（個別の配信行）用スタイル */

/* 個別の配信行 */
.rsg {
    display: flex;
    width: 100%;
    height: auto;
    padding: 12px 0;
    margin: 0;
    background-color: transparent;
    border-bottom: 1px solid #e5e5e5;
    transition: background-color 0.2s;
    position: relative;
    /* 子要素の基準 */
}

.rsg:last-child {
    border-bottom: none;
}

.rsg:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* サムネイル容器 */
.result-youtube {
    border-radius: 8px;
    width: 45%;
    aspect-ratio: 16 / 9;
    overflow: visible;
    margin-right: 12px;
    background-color: #000;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.result-youtube:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.result-youtube img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.result-youtube:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* プラットフォームタグ（アイコン化） */
.platform-tag {
    position: absolute;
    top: -10px;
    left: -10px;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.platform-tag.youtube {
    background: #ff0000;
}

.platform-tag.twitch {
    background: #9146ff;
}

/* 再生アイコン */
.result-youtube::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.result-youtube:hover::after {
    opacity: 1;
}

/* 情報表示エリア */
.stream-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    position: relative;
    /* 展開時の基準点 */
}

/* プレイヤー名・キャラ・国 */
.live-player-tag {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    order: 1;
}

.player-name {
    font-size: 18px;
    font-weight: bold;
    color: #0f0f0f;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    word-break: break-all;
    text-decoration: none;
    transition: color 0.2s ease;
}

.player-name:hover {
    color: #065fd4;
    text-decoration: underline;
}

.chara-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.chara-tooltip {
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* キャラ名用ツールチップ（JSで動的に表示） */
.chara-name-tooltip {
    position: fixed;
    z-index: 10001;
    padding: 6px 12px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px) scale(0.95);
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.chara-name-tooltip.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.chara-name-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(15, 15, 15, 0.9);
}

.flag-emoji img.emoji {
    width: 20px !important;
    height: 20px !important;
    vertical-align: middle !important;
    opacity: 1 !important;
}

/* ツールチップ（吹き出し） */
.description5 {
    width: max-content !important;
    min-width: auto !important;
    white-space: nowrap !important;
    padding: 4px 10px !important;
    bottom: 30px !important;
}

/* メタ情報 (視聴者数 & 配信時間) */
.stream-meta {
    order: 4;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #606060;
}

.viewers {
    color: #cc0000;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

.duration {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 配信タイトルラッパー */
.vtitle-wrapper {
    order: 3;
    min-height: calc(1.4em * 2 + 8px);
    /* 2行分 + マージンの高さを確保 */
    position: relative;
    margin: 4px 0;
}

/* 配信タイトル */
.live-vtitle {
    margin: 0 !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    color: #606060;
    cursor: default;
    transition: color 0.2s;
}

.live-vtitle:hover {
    color: #0f0f0f;
}

/* 配信タイトル展開スタイル */
.live-vtitle.is-expanded {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    background: #ffffff;
    /* 下にある文字（視聴者数など）を隠すために白背景にする */
    width: 100%;
    padding-bottom: 5px;
    /* 下側に少し余裕を持たせる */
    cursor: pointer;
    color: #0f0f0f;
    height: auto !important;
    display: block !important;
}

@media (max-width: 480px) {
    .live-vtitle.is-expanded {
        width: 100%;
    }
}