/* =============================================
   動画ページ (LuminaLive Video)
   1動画に紐づく複数演出の一覧
   ============================================= */

.video-view {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px 64px;
}
.video-loading {
    padding: 80px 0;
    text-align: center;
    color: var(--text-dim);
}

/* ===== Hero ===== */
.video-hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: center;  /* stretch だと aspect-ratio と競合してサムネ幅が拡大しすぎる */
    padding: 20px 0 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.video-hero-thumb {
    width: 280px;       /* 明示的に固定（グリッド列と一致、aspect-ratio との競合を避ける） */
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface3), var(--surface2));
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    position: relative;
}
.video-hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-hero-thumb-fallback {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 600;
}

.video-hero-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}
.video-hero-eyebrow {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.video-hero-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    word-wrap: break-word;
}
.video-hero-artist {
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.1s;
    align-self: flex-start;
}
.video-hero-artist:hover { color: var(--accent); }
.video-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-dim);
}
.video-hero-stat-sep { color: var(--text-muted); }
.video-hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.video-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.12s;
}
.video-cta-primary {
    background: var(--accent);
    color: var(--accent-fg);
}
.video-cta-primary:hover {
    background: #ff9d52;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,137,59,0.3);
}
.video-cta-secondary {
    background: var(--surface3);
    color: var(--text);
    border-color: var(--border);
}
.video-cta-secondary:hover {
    background: var(--surface2);
    border-color: var(--accent);
}

@media (max-width: 720px) {
    .video-hero {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .video-hero-thumb { max-width: 360px; }
    .video-hero-title { font-size: 22px; }
}

/* ===== 演出リストヘッダ ===== */
.video-charts-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.video-charts-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.video-charts-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-dim);
}
.video-charts-sort label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 10px;
    color: var(--text-muted);
}
.video-charts-sort select {
    padding: 5px 10px;
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.1s;
}
.video-charts-sort select:hover,
.video-charts-sort select:focus { border-color: var(--accent); }

/* ===== 演出リスト ===== */
.video-charts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.video-chart {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 16px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.12s;
    align-items: center;
}
.video-chart:hover {
    background: var(--surface3);
    border-color: var(--accent);
    transform: translateX(2px);
}
.video-chart-thumb {
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface3), var(--surface2));
    position: relative;
}
.video-chart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-chart-thumb-fallback {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-dim);
}
/* ===== ランクバッジ (通常) ===== */
.video-chart-rank {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: rgba(0,0,0,0.78);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    line-height: 1;
}
/* 競争ソート以外で使う「人気No.1」風 */
.video-chart-rank.is-top {
    background: linear-gradient(135deg, var(--accent), #ff5fa3);
    color: var(--accent-fg);
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 2px 8px rgba(255,137,59,0.45);
}

/* ===== 金銀銅メダル (いいね順 / 再生順の 1〜3 位) ===== */
.video-chart-rank.is-medal {
    padding: 4px 9px 4px 7px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255,255,255,0.5);
}
.video-chart-rank.is-medal .rank-num { line-height: 1; }
.video-chart-rank.is-medal svg {
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.4));
}

/* 金 (#1) - ゴールド + 強発光 */
.video-chart-rank.is-gold {
    background: linear-gradient(135deg, #fff3a8 0%, #ffd84d 35%, #ffa726 70%, #c87a13 100%);
    color: #5b3a02;
    border-color: rgba(255,231,150,0.85);
    box-shadow:
        0 2px 10px rgba(255,179,0,0.55),
        0 0 24px rgba(255,200,80,0.35),
        inset 0 1px 0 rgba(255,255,255,0.6);
    animation: rank-gold-shine 2.6s ease-in-out infinite;
}
@keyframes rank-gold-shine {
    0%, 100% { box-shadow: 0 2px 10px rgba(255,179,0,0.55), 0 0 24px rgba(255,200,80,0.35), inset 0 1px 0 rgba(255,255,255,0.6); }
    50%      { box-shadow: 0 2px 14px rgba(255,179,0,0.85), 0 0 32px rgba(255,200,80,0.55), inset 0 1px 0 rgba(255,255,255,0.8); }
}

/* 銀 (#2) - シルバー */
.video-chart-rank.is-silver {
    background: linear-gradient(135deg, #ffffff 0%, #e6eaf0 35%, #b9c1cb 70%, #818992 100%);
    color: #1d2733;
    border-color: rgba(255,255,255,0.85);
    box-shadow:
        0 2px 8px rgba(180,190,210,0.55),
        0 0 16px rgba(220,225,235,0.3),
        inset 0 1px 0 rgba(255,255,255,0.7);
}

/* 銅 (#3) - ブロンズ */
.video-chart-rank.is-bronze {
    background: linear-gradient(135deg, #ffd0a0 0%, #e8985a 35%, #b86a2c 70%, #7a4214 100%);
    color: #3a1c04;
    border-color: rgba(255,200,150,0.7);
    box-shadow:
        0 2px 8px rgba(184,106,44,0.5),
        0 0 14px rgba(220,140,60,0.25),
        inset 0 1px 0 rgba(255,220,180,0.55);
}

.video-chart-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.video-chart-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.video-chart-creator-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-dim);
    flex-wrap: wrap;
}
.video-chart-creator {
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}
.video-chart-creator:hover { color: var(--accent); text-decoration: underline; }
.video-chart-stat-sep { color: var(--text-muted); }
.video-chart-date {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}
.video-chart-desc {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.video-chart-desc:empty { display: none; }

/* ===== 演出プレビュー帯 (案A/B/C) ===== */
.video-chart-band-mount {
    margin-top: 8px;
    min-height: 8px;
}
.video-chart-band-mount:empty { display: none; }
.video-chart-band {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--surface3);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.video-chart-band-empty { background: var(--surface3); }

.video-chart-band-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 使用色ドット */
.video-chart-color-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    row-gap: 4px;
}
.video-chart-color-dots-label {
    font-size: 9px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 2px;
}
.video-chart-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3),
                inset 0 1px 0 rgba(255,255,255,0.2),
                0 1px 2px rgba(0,0,0,0.4);
    cursor: help;
}
/* 案B: パターン区間オーバーレイ */
.video-chart-pat-overlay {
    width: 100%;
    height: 4px;
    display: flex;
    border-radius: 2px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
}
.video-chart-pat-cell {
    flex: 1 1 0;
    min-width: 0;
}
.video-chart-pat-legend {
    display: flex;
    gap: 10px;
    margin-top: 2px;
    font-size: 9px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.video-chart-pat-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.video-chart-pat-legend-item i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: inline-block;
}
/* 案C: 明るさ波形 */
.video-chart-brightness {
    width: 100%;
    height: 14px;
    display: block;
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.video-chart-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.video-chart-likes {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--surface3);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
}
.video-chart-likes-icon { font-size: 12px; }

@media (max-width: 720px) {
    .video-chart {
        grid-template-columns: 100px 1fr;
        gap: 10px;
    }
    .video-chart-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
    }
}

/* ===== 空状態 ===== */
.video-empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-dim);
}
.video-empty-icon {
    font-size: 48px;
    opacity: 0.5;
    margin-bottom: 12px;
}
.video-empty-text {
    font-size: 14px;
    margin: 0 0 16px;
}
