/* ===== Lyric Score Widget ===== */

.ls-widget {
    background: #000800;
    border: 1px solid #003300;
    border-radius: 12px;
    padding: 20px 16px;
    max-width: 420px;
    margin: 24px auto;
    font-family: 'Courier New', monospace;
    color: #00FF44;
    position: relative;
    overflow: hidden;
}

/* スキャンライン背景 */
.ls-widget::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,255,68,0.03) 2px,
        rgba(0,255,68,0.03) 4px
    );
    pointer-events: none;
    z-index: 0;
}

.ls-widget > * { position: relative; z-index: 1; }

/* ヘッダー */
.ls-header {
    text-align: center;
    margin-bottom: 12px;
}

.ls-song-title {
    font-size: 1rem;
    font-weight: bold;
    color: #00FF44;
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px #00FF44;
}

.ls-artist {
    font-size: 0.78rem;
    color: #007722;
    margin-top: 2px;
}

/* レーダーエリア */
.ls-radar-wrap {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 16px;
    aspect-ratio: 1 / 1;
}

.ls-radar-canvas,
.ls-scan-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.ls-scan-canvas {
    pointer-events: none;
}


/* スコア一覧 */
.ls-scores-list {
    margin-top: 4px;
}

.ls-score-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.ls-score-label {
    width: 90px;
    font-size: 0.72rem;
    color: #00CC33;
    flex-shrink: 0;
    line-height: 1.3;
    word-break: keep-all;
}

.ls-score-bar-wrap {
    flex: 1;
    background: #001a00;
    border-radius: 3px;
    height: 6px;
    overflow: hidden;
}

.ls-score-bar {
    height: 100%;
    background: linear-gradient(to right, #004400, #00FF44);
    border-radius: 3px;
    transition: width 0.6s ease;
    box-shadow: 0 0 6px #00FF44;
}

.ls-score-num {
    width: 36px;
    font-size: 0.75rem;
    text-align: right;
    color: #00FF44;
    flex-shrink: 0;
    white-space: nowrap;
}

.ls-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #003300;
    margin-top: 10px;
    padding-top: 8px;
    font-size: 0.8rem;
    color: #007722;
}

.ls-total-num {
    font-size: 1.2rem;
    font-weight: bold;
    color: #00FF44;
    text-shadow: 0 0 10px #00FF44;
    white-space: nowrap;
}

.ls-total-num small {
    font-size: 0.7rem;
    color: #007722;
}

/* シェアボタン */
.ls-share-wrap {
    text-align: center;
    margin-top: 16px;
}

.ls-share-btn {
    background: #001a00;
    color: #00FF44;
    border: 1px solid #00AA33;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, box-shadow 0.2s;
}

.ls-share-btn:hover {
    background: #003300;
    box-shadow: 0 0 10px rgba(0,255,68,0.3);
}

/* モーダル */
.ls-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 600px) {
    .ls-modal {
        align-items: center;
    }
}

.ls-modal-inner {
    background: #050f05;
    border: 1px solid #003300;
    border-radius: 16px 16px 0 0;
    padding: 24px 20px 32px;
    max-width: 400px;
    width: 100%;
    position: relative;
    text-align: center;
}

@media (min-width: 600px) {
    .ls-modal-inner {
        border-radius: 16px;
    }
}

.ls-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #00FF44;
    font-size: 1.2rem;
    cursor: pointer;
}

.ls-modal-guide {
    background: rgba(0,255,68,0.08);
    border: 1px solid #004400;
    border-radius: 6px;
    color: #00FF44;
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

.ls-modal-img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #003300;
}
