/* song_detail.css — 改善版 */
.detail-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 28px;
    padding: 28px 0;
    align-items: start;
}

.sticky-player {
    position: sticky;
    top: calc(var(--header-h) + 12px);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.cover-art {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 14px;
    box-shadow: 0 8px 30px rgba(2,6,23,0.6) inset;
}

.song-meta h1 { font-size: 1.3rem; margin-bottom: 6px; color: var(--text-main); font-weight:800 }
.artist { color: var(--muted-text); font-weight: 600; margin-bottom: 18px; }

.lyrics-card {
    background: transparent;
    border-radius: 10px;
    padding: 12px 12px 18px 8px;
    min-height: 380px;
    max-height: 70vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    border-left: 2px solid rgba(255,255,255,0.02);
}

/* Ensure lyrics container is left-aligned for readability */
.lyrics-card, #lyricContainer { text-align: left; }

/* Force full-width left-aligned layout to override accidental centering */
.lyrics-area, .lyrics-card, #lyricContainer { display:block !important; width:100% !important; margin:0 !important; padding-left:0 !important; text-align:left !important; }
.lyrics-card { box-sizing: border-box; }

.lrc-line {
    display:block;
    width:100%;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 6px 0;
    opacity: 0.95;
    transition: background 0.18s ease, color 0.18s ease;
    padding: 6px 10px; /* reduced left padding to remove extra gap */
    border-radius: 8px;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Ensure lyrics wrap cleanly and avoid breaking CJK characters mid-word */
/* removed pre-wrap to avoid forced line breaks; .lrc-line uses white-space:normal above */

.lrc-line:hover { background: rgba(255,255,255,0.02); color: var(--text-main); }

.lrc-line.active {
    opacity: 1;
    color: var(--accent-strong);
    background: linear-gradient(90deg, rgba(6,182,212,0.06), rgba(37,99,235,0.03));
    transform: none; /* avoid shifting layout */
    box-shadow: 0 6px 18px rgba(2,6,23,0.32);
}

/* プレイヤーコントロール */
.slider { width: 100%; margin: 12px 0; cursor: pointer; background: transparent }
.time-labels { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted-text); }
.control-btns { display: flex; justify-content: center; margin-top: 16px; gap:12px }
.c-btn.main { 
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    min-width: 120px; height: 44px; padding: 8px 20px; box-sizing: border-box;
    border-radius: 999px; border: none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    background: linear-gradient(90deg, var(--primary), #7c3aed); color:#fff; font-size: 1rem; cursor: pointer; font-weight:700;
}

/* Mobile specific tweaks */
@media (max-width: 900px) {
    .detail-grid { grid-template-columns: 1fr; gap: 18px; padding: 16px 0; }
    .sticky-player { position: relative; top:0; padding:12px; }
    .cover-art{ max-width:220px; margin:0 auto 12px }
    .lyrics-card { padding:12px; max-height: 55vh; }
    .lrc-line { font-size: 0.98rem; padding: 6px 10px; }
    .control-btns { flex-direction: column; gap:10px; }
    .c-btn.main { width: 100%; min-width: auto; }
    #lyricContainer { padding: 6px; }
}

@media (max-width: 900px) {
    .detail-grid { grid-template-columns: 1fr; }
    .sticky-player { position: relative; top: 0; }
    .cover-art{ max-width:220px; margin:0 auto 14px }
}