/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for theming */
:root {
    --bg-light: #F0E5D5;
    --bg-dark: #1a1a1a;
    --text-light: #2c2c2c;
    --text-dark: #e0e0e0;
    --link-light: #CF8BA9;
    --link-dark: #90ad68;
    --link-underline: currentColor;
}

/* Support theme class on html element for pre-render application */
html.dark-mode,
html.dark-mode body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

/* Disable transitions during initial load to prevent flash */
html.no-transition,
html.no-transition *,
html.no-transition *::before,
html.no-transition *::after {
    transition: none !important;
    animation: none !important;
}

@keyframes flash {
    50% {
        opacity: 0;
    }
}

/* Font Face Declaration */
@font-face {
    font-family: 'Delius';
    src: url('assets/Delius-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Base Styles */
body {
    font-family: 'Delius', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-light);
    background-color: var(--bg-light);
    max-width: 650px;
    margin: 0;
    padding: 60px 30px 60px 70px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode */
body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

/* Header */
.hero {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 20px;
}

.hero-left {
    flex: 0 0 auto;
}

.avatar {
    width: 140px;
    height: auto;
    object-fit: cover;
    margin-bottom: 20px;
    display: block;
}

@media (hover: hover) and (pointer: fine) {
    .avatar:hover {
        animation: flash .2s step-start infinite;
        cursor: crosshair !important;
    }
}

.avatar.tap-flash {
    animation: flash .2s step-start 3;
}

.avatar.react-songs {
    animation: avatarReactSongs 0.22s ease-out 1;
    transform-origin: 58% 64%;
}

@keyframes avatarReactSongs {
    0% { transform: rotate(0deg) translateX(0); }
    45% { transform: rotate(-4deg) translateX(-1px); }
    100% { transform: rotate(0deg) translateX(0); }
}

.avatar.nod {
    animation: avatarNod 0.4s ease-in-out 1;
    transform-origin: 58% 64%;
}

@keyframes avatarNod {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(2px) rotate(2deg); }
    50% { transform: translateY(-1px) rotate(-1deg); }
    75% { transform: translateY(1px) rotate(1deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

h1 {
    font-size: 28px;
    font-weight: normal;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 18px;
    font-weight: normal;
    margin-top: 40px;
    margin-bottom: 16px;
}

/* Main Content */
main {
    margin-bottom: 60px;
}

section {
    margin-bottom: 40px;
}

p {
    margin-bottom: 1.2em;
}

p:last-child {
    margin-bottom: 0;
}

/* Lists */
ul {
    list-style-type: none;
    padding-left: 0;
}

li {
    margin-bottom: 0.6em;
}

li:before {
    content: "- ";
}

/* Links */
a {
    color: var(--link-light);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s ease, color 0.3s ease;
}

a.magnet-link {
    display: inline-block;
    transition: transform 120ms ease-out, opacity 0.2s ease, color 0.3s ease;
    will-change: transform;
}

a:hover {
    opacity: 0.7;
}

html.dark-mode a,
body.dark-mode a {
    color: var(--link-dark);
}


/* LLM Visualization */
.llm-viz-container {
    margin: -6px 0 0;
    width: 236px;
    height: 236px;
    flex: 0 0 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.llm-viz-link {
    display: block;
    width: 100%;
    height: 100%;
}

.llm-viz {
    width: 120%;
    height: 120%;
    margin-left: -10%;
    margin-top: -10%;
    border: none;
    background: transparent;
}

.viz-credit {
    font-size: 12px;
    margin-top: 8px;
    text-align: center;
    opacity: 0.7;
}

.viz-credit a {
    color: inherit;
}

/* Hide visualization on smaller screens */
@media (max-width: 900px) {
    .hero {
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
    }

    .llm-viz-container {
        width: 160px;
        height: 160px;
    }
}

/* Footer */
footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid currentColor;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        font-size: 16px;
        padding: 40px 20px;
    }

    .avatar {
        width: 120px;
        height: auto;
    }

    h1 {
        font-size: 24px;
    }

    header {
        margin-bottom: 40px;
    }

    section {
        margin-bottom: 30px;
    }

    footer {
        margin-top: 60px;
    }
}

@media (max-width: 400px) {
    body {
        font-size: 15px;
        padding: 30px 16px;
    }

    .avatar {
        width: 100px;
        height: auto;
    }
}

/* ── Inline Music Controls ── */
.songs-item {
    position: relative;
}

.songs-trigger {
    cursor: pointer;
}

.music-controls {
    margin-top: 8px;
    margin-bottom: -12px;
    pointer-events: none;
    overflow: visible;
}

.music-controls.active {
    pointer-events: all;
}

.controls-inner {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 12px 0;
}

.control-btn {
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.4);
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 0 transparent);
    opacity: 0;
    transform: translateX(-80px);
}

html.dark-mode .control-btn,
body.dark-mode .control-btn {
    color: rgba(255, 255, 255, 0.5);
}

.mc-icon {
    width: 20px;
    height: 20px;
}

/* Sequential elastic slide-in */
.music-controls.active .control-btn {
    animation: elasticSlideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards,
               mcMotionBlur 0.4s ease-out forwards;
}

.music-controls.active .control-btn:nth-child(1) {
    animation-delay: 0s, 0s;
}

.music-controls.active .control-btn:nth-child(2) {
    animation-delay: 0.08s, 0.08s;
}

.music-controls.active .control-btn:nth-child(3) {
    animation-delay: 0.16s, 0.16s;
}

@keyframes elasticSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-80px);
    }
    60% {
        opacity: 1;
        transform: translateX(12px);
    }
    80% {
        transform: translateX(-4px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes mcMotionBlur {
    0% { filter: blur(0px) drop-shadow(0 0 0 transparent); }
    30% { filter: blur(2px) drop-shadow(0 0 0 transparent); }
    100% { filter: blur(0px) drop-shadow(0 0 0 transparent); }
}

/* Reverse slide out */
.music-controls.closing .control-btn:nth-child(1) {
    animation: elasticSlideOut 0.35s cubic-bezier(0.55, 0.085, 0.68, 0.53) 0.16s forwards;
}

.music-controls.closing .control-btn:nth-child(2) {
    animation: elasticSlideOut 0.35s cubic-bezier(0.55, 0.085, 0.68, 0.53) 0.08s forwards;
}

.music-controls.closing .control-btn:nth-child(3) {
    animation: elasticSlideOut 0.35s cubic-bezier(0.55, 0.085, 0.68, 0.53) 0s forwards;
}

@keyframes elasticSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-60px);
    }
}

/* Glow aura hover */
.control-btn:hover {
    color: rgba(0, 0, 0, 0.9);
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.3));
}

html.dark-mode .control-btn:hover,
body.dark-mode .control-btn:hover {
    color: rgba(255, 255, 255, 1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.control-btn:active {
    transform: translateX(0) scale(0.95);
}

/* Now playing text with typewriter effect */
.now-playing {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.5);
    margin-left: 12px;
    font-style: italic;
    opacity: 0;
    white-space: nowrap;
    overflow: hidden;
}

html.dark-mode .now-playing,
body.dark-mode .now-playing {
    color: rgba(255, 255, 255, 0.6);
}

.music-controls.active .now-playing {
    opacity: 1;
}

.now-playing.typing::after {
    content: '|';
    animation: mcBlink 0.7s step-end infinite;
    margin-left: 2px;
}

@keyframes mcBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ── Banner Slot (shared by greeting + carousel) ── */
.banner-slot {
    min-height: 1.7em;
    margin: 20px 0;
    overflow: hidden;
}

.banner-slot.pulsing {
    animation: bannerPulse 0.42s ease-out 1;
}

.banner-slot.carousel-live {
    animation: none;
}

@keyframes bannerPulse {
    0% { transform: translateY(0); opacity: 0.86; filter: brightness(0.98); }
    45% { transform: translateY(-0.5px); opacity: 0.96; filter: brightness(1.06); }
    100% { transform: translateY(0); opacity: 0.9; filter: brightness(1); }
}

.banner-slot.carousel-live .carousel-viewport {
    animation: bannerBreathe 2.4s ease-in-out infinite;
}

@keyframes bannerBreathe {
    0%, 100% { opacity: 0.78; transform: translateY(0); }
    50% { opacity: 0.94; transform: translateY(-0.5px); }
}

/* ── Time-of-Day Greeting ── */
.greeting-text {
    font-size: 18px;
    color: var(--text-light);
    font-style: italic;
    opacity: 0.6;
    transition: opacity 0.8s ease;
}

html.dark-mode .greeting-text,
body.dark-mode .greeting-text {
    color: var(--text-dark);
}

.greeting-text.typing::after {
    content: '|';
    animation: mcBlink 0.7s step-end infinite;
    margin-left: 2px;
}

.greeting-text.fade-out {
    opacity: 0;
}

.greeting-text.hidden {
    display: none;
}

/* ── Song Carousel ── */
.carousel-viewport {
    display: none;
    width: 280px;
    overflow: hidden;
    font-size: 13px;
    font-style: italic;
    color: rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    vertical-align: middle;
}

html.dark-mode .carousel-viewport,
body.dark-mode .carousel-viewport {
    color: rgba(255, 255, 255, 0.6);
}

.carousel-viewport.active {
    display: inline-block;
}

.carousel-track {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

.carousel-track.scrolling {
    animation: carouselScroll var(--carousel-duration, 8s) linear infinite;
}

@keyframes carouselScroll {
    0% {
        transform: translateX(var(--carousel-start, 280px));
    }
    100% {
        transform: translateX(var(--carousel-end, -100%));
    }
}

@media (max-width: 600px) {
    .carousel-viewport {
        width: 180px;
    }
}

/* ── Avatar Playback Buttons ── */
.avi-next-btn,
.avi-prev-btn,
.avi-pause-btn {
    display: none;
    position: relative;
    margin-left: 8px;
    padding: 4px 6px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    vertical-align: middle;
}

.avi-next-btn svg,
.avi-prev-btn svg,
.avi-pause-btn svg {
    width: 16px;
    height: 16px;
    color: rgba(0, 0, 0, 0.5);
}

html.dark-mode .avi-next-btn svg,
body.dark-mode .avi-next-btn svg,
html.dark-mode .avi-prev-btn svg,
body.dark-mode .avi-prev-btn svg,
html.dark-mode .avi-pause-btn svg,
body.dark-mode .avi-pause-btn svg {
    color: rgba(255, 255, 255, 0.6);
}

.avi-next-btn.visible,
.avi-prev-btn.visible,
.avi-pause-btn.visible {
    opacity: 1;
}

.avi-next-btn.show,
.avi-prev-btn.show,
.avi-pause-btn.show {
    display: inline-block;
}

.avi-next-btn:hover svg,
.avi-prev-btn:hover svg,
.avi-pause-btn:hover svg {
    color: rgba(0, 0, 0, 0.8);
}

html.dark-mode .avi-next-btn:hover svg,
body.dark-mode .avi-next-btn:hover svg,
html.dark-mode .avi-prev-btn:hover svg,
body.dark-mode .avi-prev-btn:hover svg,
html.dark-mode .avi-pause-btn:hover svg,
body.dark-mode .avi-pause-btn:hover svg {
    color: rgba(255, 255, 255, 0.9);
}

/* ── Link Preview Whispers ── */
.link-preview {
    position: fixed;
    z-index: 1000;
    background-color: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    padding: 10px 14px;
    max-width: 220px;
    pointer-events: none;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    font-style: normal;
}

.link-preview.visible {
    opacity: 1;
    transform: translateX(0);
}

html.dark-mode .link-preview,
body.dark-mode .link-preview {
    background-color: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.link-preview-cat {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.4;
    margin-bottom: 4px;
}

.link-preview-title {
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 3px;
}

.link-preview-desc {
    font-size: 12px;
    opacity: 0.6;
    line-height: 1.4;
}

/* ── Keyboard Hints ── */
.hints-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.14);
    z-index: 1100;
    padding: 20px;
}

.hints-overlay.active {
    display: flex;
}

.hints-card {
    background: var(--bg-light);
    color: var(--text-light);
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 8px;
    padding: 14px 16px;
    min-width: 220px;
    max-width: 320px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
    font-size: 14px;
    line-height: 1.55;
}

html.dark-mode .hints-card,
body.dark-mode .hints-card {
    background: #242424;
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.44);
}

.hints-title {
    margin-bottom: 6px;
    font-style: italic;
    opacity: 0.9;
}

.hints-card p {
    margin-bottom: 4px;
}

.hints-close {
    margin-top: 8px;
    opacity: 0.65;
}

.hints-card kbd {
    font-family: inherit;
    font-size: 0.9em;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 1px 5px;
}

html.dark-mode .hints-card kbd,
body.dark-mode .hints-card kbd {
    border-color: rgba(255, 255, 255, 0.24);
}

/* ── Progress Bar ── */
.progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 10px 0;
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.35s ease, max-height 0s ease 0.35s;
}

.progress-row.visible {
    opacity: 1;
    pointer-events: auto;
    max-height: 40px;
    transition: opacity 0.4s ease 0.6s, max-height 0s ease 0.6s;
}

.progress-time {
    font-size: 11px;
    font-style: italic;
    color: var(--link-light);
    min-width: 28px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

html.dark-mode .progress-time,
body.dark-mode .progress-time {
    color: var(--link-dark);
}

.progress-track {
    flex: 0 0 auto;
    width: 120px;
    height: 2px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    /* expanded hit area — invisible padding above/below */
    padding: 8px 0;
    margin: -8px 0;
}

html.dark-mode .progress-track,
body.dark-mode .progress-track {
    background: rgba(255, 255, 255, 0.15);
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--link-light);
    border-radius: 2px;
    transition: color 0.3s ease;
    pointer-events: none;
}

html.dark-mode .progress-fill,
body.dark-mode .progress-fill {
    background: var(--link-dark);
}

.progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--link-light);
    transform: translate(-50%, -50%);
    transition: color 0.3s ease, transform 0.15s ease;
    pointer-events: none;
}

html.dark-mode .progress-thumb,
body.dark-mode .progress-thumb {
    background: var(--link-dark);
}

.progress-track:hover .progress-thumb {
    transform: translate(-50%, -50%) scale(1.5);
}

/* ── MP3 Downloader Panel ── */
/* Shared base for all right-side slide-in panels */
.side-panel {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%) translateX(calc(100% + 1px));
    z-index: 900;
    background: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-right: none;
    border-radius: 8px 0 0 8px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.07);
    transition: transform 0.42s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

html.dark-mode .side-panel,
body.dark-mode .side-panel {
    background: #242424;
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.45);
}

.side-panel.active {
    transform: translateY(-50%) translateX(0);
}

.mp3-panel {
    padding: 22px 24px 24px;
    width: 260px;
}

.mp3-panel-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mp3-panel-title {
    font-size: 12px;
    font-style: italic;
    opacity: 0.4;
    margin: 0;
    letter-spacing: 0.03em;
}

.mp3-url-input {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.14);
    color: var(--text-light);
    font-family: 'Delius', -apple-system, sans-serif;
    font-size: 13px;
    padding: 4px 0 6px;
    outline: none;
    transition: border-color 0.2s ease;
}

.mp3-url-input:focus {
    border-color: var(--link-light);
}

.mp3-url-input::placeholder {
    opacity: 0.35;
    font-style: italic;
}

html.dark-mode .mp3-url-input,
body.dark-mode .mp3-url-input {
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.14);
}

html.dark-mode .mp3-url-input:focus,
body.dark-mode .mp3-url-input:focus {
    border-color: var(--link-dark);
}

.mp3-convert-btn {
    align-self: flex-start;
    background: none;
    border: 1px solid var(--link-light);
    color: var(--link-light);
    font-family: 'Delius', -apple-system, sans-serif;
    font-size: 13px;
    font-style: italic;
    padding: 4px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.mp3-convert-btn:hover {
    background: var(--link-light);
    color: var(--bg-light);
}

.mp3-convert-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

html.dark-mode .mp3-convert-btn,
body.dark-mode .mp3-convert-btn {
    border-color: var(--link-dark);
    color: var(--link-dark);
}

html.dark-mode .mp3-convert-btn:hover,
body.dark-mode .mp3-convert-btn:hover {
    background: var(--link-dark);
    color: var(--bg-dark);
}

.mp3-status {
    font-size: 12px;
    font-style: italic;
    opacity: 0.6;
    min-height: 1.4em;
    line-height: 1.4;
    word-break: break-word;
}

.mp3-status.error {
    color: #c0627a;
    opacity: 1;
}

html.dark-mode .mp3-status.error,
body.dark-mode .mp3-status.error {
    color: #e07090;
}

/* On smaller screens: bottom drawer */
@media (max-width: 900px) {
    .side-panel {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-bottom: none;
        transform: translateY(100%);
        transition: transform 0.38s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .side-panel.active {
        transform: translateY(0);
    }

    html.dark-mode .side-panel,
    body.dark-mode .side-panel {
        border-color: rgba(255, 255, 255, 0.09);
    }

    .mp3-panel   { padding: 22px 24px 36px; }
    .songs-panel { padding: 20px 22px 36px; }
}

/* ── Songs Manager Panel ── */
.songs-panel {
    padding: 20px 22px 22px;
    width: 300px;
}

.songs-panel-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Tabs */
.songs-tabs {
    display: flex;
    gap: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 10px;
    margin-bottom: 2px;
}

html.dark-mode .songs-tabs,
body.dark-mode .songs-tabs {
    border-color: rgba(255, 255, 255, 0.09);
}

.songs-tab {
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--text-light);
    font-family: 'Delius', -apple-system, sans-serif;
    font-size: 12px;
    font-style: italic;
    padding: 0 0 6px;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    margin-bottom: -11px;
}

html.dark-mode .songs-tab,
body.dark-mode .songs-tab {
    color: var(--text-dark);
}

.songs-tab:hover {
    opacity: 0.65;
}

.songs-tab.active {
    opacity: 1;
    border-bottom-color: currentColor;
}

/* Track list */
.songs-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;
    /* Subtle scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}

html.dark-mode .songs-list,
body.dark-mode .songs-list {
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.songs-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

html.dark-mode .songs-row,
body.dark-mode .songs-row {
    border-color: rgba(255, 255, 255, 0.04);
}

.songs-row-title {
    flex: 1;
    font-size: 12px;
    font-style: italic;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
    min-width: 0;
    cursor: text;
    padding: 1px 2px;
    border-radius: 2px;
    transition: background 0.15s ease;
}

html.dark-mode .songs-row-title,
body.dark-mode .songs-row-title {
    color: var(--text-dark);
}

.songs-row-title:focus {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    background: rgba(0, 0, 0, 0.05);
}

html.dark-mode .songs-row-title:focus,
body.dark-mode .songs-row-title:focus {
    background: rgba(255, 255, 255, 0.07);
}

.songs-row-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-family: 'Delius', -apple-system, sans-serif;
    font-size: 11px;
    padding: 0 2px;
    cursor: pointer;
    opacity: 0.25;
    transition: opacity 0.15s ease;
    line-height: 1;
    flex-shrink: 0;
}

html.dark-mode .songs-row-btn,
body.dark-mode .songs-row-btn {
    color: var(--text-dark);
}

.songs-row-btn:hover {
    opacity: 0.85;
}

/* Upload zone */
.songs-upload-zone {
    border: 1px dashed rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 10px 12px;
    text-align: center;
    font-size: 11px;
    font-style: italic;
    color: var(--text-light);
    opacity: 0.5;
    transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    cursor: default;
}

html.dark-mode .songs-upload-zone,
body.dark-mode .songs-upload-zone {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-dark);
}

.songs-upload-zone.drag-over {
    opacity: 1;
    border-color: var(--link-light);
    background: rgba(207, 139, 169, 0.06);
}

html.dark-mode .songs-upload-zone.drag-over,
body.dark-mode .songs-upload-zone.drag-over {
    border-color: var(--link-dark);
    background: rgba(144, 173, 104, 0.06);
}

.songs-pick-btn {
    background: none;
    border: none;
    color: inherit;
    font-family: 'Delius', -apple-system, sans-serif;
    font-size: inherit;
    font-style: inherit;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    opacity: 1;
}

/* Reset button */
.songs-reset-btn {
    align-self: flex-start;
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-light);
    font-family: 'Delius', -apple-system, sans-serif;
    font-size: 11px;
    font-style: italic;
    padding: 3px 12px;
    border-radius: 20px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

html.dark-mode .songs-reset-btn,
body.dark-mode .songs-reset-btn {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-dark);
}

.songs-reset-btn:hover {
    opacity: 0.75;
}

.songs-reset-btn.confirming {
    opacity: 1;
    border-color: #c0627a;
    color: #c0627a;
}

html.dark-mode .songs-reset-btn.confirming,
body.dark-mode .songs-reset-btn.confirming {
    border-color: #e07090;
    color: #e07090;
}


/* ── Easter Egg Effects ── */
/* Gentle shiver for brr */
.avatar.shiver {
    animation: shiverAvi 0.3s ease-in-out 3 !important;
}

@keyframes shiverAvi {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px) rotate(-1deg); }
    75% { transform: translateX(3px) rotate(1deg); }
}
