:root {
    --bg: #090b10;
    --bg-glow: #151a28;
    --surface: #12151f;
    --surface-2: #1a2030;
    --text: #f4f6fb;
    --muted: #98a2b8;
    --primary: #8b5cf6;
    --primary-dark: #6d28d9;
    --accent: #2dd4bf;
    --accent-soft: rgba(45, 212, 191, 0.14);
    --pron: #fbbf24;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 18px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(139, 92, 246, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(45, 212, 191, 0.12), transparent 28%),
        linear-gradient(180deg, var(--bg-glow) 0%, var(--bg) 100%);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    width: min(760px, calc(100% - 24px));
    margin: 0 auto;
    padding-bottom: 48px;
}

.app-header {
    padding: 28px 0 18px;
}

.brand {
    display: flex;
    gap: 16px;
    align-items: center;
}

.brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.35);
}

.brand h1,
.detail-hero h1 {
    margin: 0;
    font-size: 1.85rem;
    letter-spacing: -0.03em;
}

.brand p,
.artist,
.hint,
.study-toolbar p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.section-title {
    margin: 0 0 14px;
    font-size: 0.95rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.song-grid {
    display: grid;
    gap: 14px;
}

.song-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 16px;
    padding: 16px;
    background: rgba(18, 21, 31, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.song-card:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.35);
}

.cover,
.cover img,
.cover-fallback {
    width: 88px;
    height: 88px;
    border-radius: 16px;
}

.cover.large,
.cover.large img,
.cover.large .cover-fallback {
    width: 120px;
    height: 120px;
}

.cover img {
    object-fit: cover;
    display: block;
}

.cover-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(45, 212, 191, 0.22));
    font-size: 2rem;
}

.song-card-body h2 {
    margin: 0 0 6px;
    font-size: 1.08rem;
}

.song-card-body p {
    margin: 0;
    color: var(--muted);
}

.song-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.badge {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.18);
    color: #ddd6fe;
    font-size: 0.82rem;
    font-weight: 700;
}

.empty-state {
    text-align: center;
    padding: 56px 24px;
    background: rgba(18, 21, 31, 0.92);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
}

.empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    background: var(--accent-soft);
    color: var(--accent);
}

.empty-state h2 {
    margin: 0 0 10px;
    font-size: 1.4rem;
}

.empty-state p {
    margin: 0 auto 22px;
    max-width: 320px;
    color: var(--muted);
    line-height: 1.6;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(109, 40, 217, 0.35);
}

.detail-header {
    padding: 18px 0 8px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    color: var(--accent);
    font-weight: 700;
}

.detail-hero {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 18px;
    background: rgba(18, 21, 31, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tabs {
    display: flex;
    gap: 8px;
    margin: 18px 0 0;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tab {
    flex: 1;
    min-width: 104px;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(18, 21, 31, 0.88);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
}

.tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(109, 40, 217, 0.28);
}

.tab-panels {
    padding-top: 16px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.player-card,
.lyrics-list,
.study-toolbar {
    background: rgba(18, 21, 31, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.player-card,
.lyrics-list {
    padding: 18px;
}

audio,
video {
    width: 100%;
    border-radius: 14px;
    background: #000;
}

.study-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    padding: 14px 16px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
}

.lyric-block {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.lyric-block:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.lyric-label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.lyric-en {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.75;
    font-weight: 700;
}

.lyric-pron {
    margin: 10px 0 0;
    color: var(--pron);
    font-style: italic;
    line-height: 1.65;
}

.lyric-pt {
    margin: 10px 0 0;
    color: var(--accent);
    line-height: 1.65;
}

.lyric-pron.hidden,
.lyric-pt.hidden {
    display: none;
}

.word {
    display: inline;
    padding: 2px 5px;
    border-radius: 6px;
    cursor: pointer;
}

.word:hover,
.word.active {
    background: rgba(139, 92, 246, 0.24);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: rgba(18, 21, 31, 0.96);
    border: 1px solid var(--border);
    padding: 12px 18px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    z-index: 20;
}

.toast.hidden {
    display: none;
}

@media (max-width: 560px) {
    .detail-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand h1,
    .detail-hero h1 {
        font-size: 1.55rem;
    }
}
