/* Fluent 2 Design System - Sakura Standalone Player (Sakura Pink Edition) */
:root {
    --fontFamilyBase: 'Segoe UI Variable Text', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    --fontFamilyDisplay: 'Segoe UI Variable Display', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --colorBrandBackground: #d83b6e;
    --colorBrandBackgroundHover: #e84d80;
    --colorBrandBackgroundPressed: #b82b58;
    --colorBrandStroke1: #ff7597;
    --colorCompoundBrandStroke: #ff7597;
    --colorCompoundBrandBackground: #d83b6e;
    --colorNeutralForeground1: #ffffff;
    --colorNeutralForeground2: rgba(255, 255, 255, 0.85);
    --colorNeutralForeground3: rgba(255, 255, 255, 0.65);
    --colorNeutralBackground1: rgba(30, 24, 28, 0.78);
    --colorNeutralBackground1Hover: rgba(255, 255, 255, 0.12);
    --colorNeutralBackground1Pressed: rgba(255, 255, 255, 0.08);
    --colorNeutralStroke1: rgba(255, 255, 255, 0.09);
    --colorNeutralStroke2: rgba(255, 255, 255, 0.16);
    --colorNeutralStroke1Hover: rgba(255, 117, 151, 0.35);
    --borderRadiusSmall: 2px;
    --borderRadiusMedium: 4px;
    --borderRadiusLarge: 6px;
    --borderRadiusXLarge: 8px;
    --borderRadius2XLarge: 12px;
    --borderRadiusCircular: 9999px;
    --durationUltraFast: 50ms;
    --durationFast: 150ms;
    --durationNormal: 200ms;
    --durationSlow: 300ms;
    --curveEasyEase: cubic-bezier(0.33, 0, 0.67, 1);
    --curveDecelerate: cubic-bezier(0.1, 0.9, 0.2, 1);
    --shadow2: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow4: 0 2px 4px rgba(0, 0, 0, 0.25);
    --shadow8: 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow16: 0 8px 16px rgba(0, 0, 0, 0.35);
    --shadow28: 0 12px 28px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0c080b;
    color: var(--colorNeutralForeground1);
    font-family: var(--fontFamilyBase);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#sakura-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    z-index: 0;
    filter: blur(1.5px) brightness(0.85) saturate(0.95);
    pointer-events: none;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(12, 8, 11, 0.25) 0%, rgba(12, 8, 11, 0.72) 100%);
    pointer-events: none;
    z-index: 1;
}

.app-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

/* Fluent 2 Header / CommandBar */
.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 18px 28px;
    pointer-events: auto;
    gap: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions .sl-dock {
    position: static;
    top: auto;
    right: auto;
    left: auto;
    transform: none;
    z-index: auto;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--borderRadiusMedium);
    border: 1px solid var(--colorNeutralStroke1);
    background: var(--colorNeutralBackground1);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    color: var(--colorNeutralForeground1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--durationFast) var(--curveEasyEase);
}

.icon-btn:hover {
    background: var(--colorNeutralBackground1Hover);
    border-color: var(--colorNeutralStroke1Hover);
    color: #ff8fb2;
}

.icon-btn:active {
    background: var(--colorNeutralBackground1Pressed);
    transform: scale(0.97);
}

.icon-btn svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

/* ==========================================================
   LYRIC BACKGROUND REMOVAL (Clean, floating text on canvas)
   ========================================================== */
.sl-main-card,
.sl-center-quote .sl-main-card,
.sl-chapter-item .sl-main-card,
.sl-vert-item .sl-main-card,
.sl-duo-box .sl-main-card,
.sl-wende-card,
.sl-outro-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
}

/* Fluent 2 Player Dock (Windows 11 Acrylic / Mica) */
.player-dock-wrap {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: min(94vw, 540px);
    z-index: 100;
    pointer-events: auto;
    transition: transform var(--durationSlow) var(--curveDecelerate),
                opacity var(--durationSlow) var(--curveDecelerate);
}

.player-dock-wrap.hidden {
    transform: translate(-50%, calc(100% + 40px));
    opacity: 0;
    pointer-events: none;
}

.player-card {
    background: color-mix(in srgb, var(--colorNeutralBackground1) 88%, transparent);
    border: 1px solid var(--colorNeutralStroke1);
    border-top: 1px solid var(--colorNeutralStroke2);
    border-radius: var(--borderRadiusXLarge);
    padding: 14px 18px;
    box-shadow: var(--shadow28);
    backdrop-filter: blur(28px) saturate(135%);
    -webkit-backdrop-filter: blur(28px) saturate(135%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cover-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: var(--borderRadiusMedium);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--colorNeutralStroke1);
    box-shadow: var(--shadow4);
}

.cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--colorNeutralForeground1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
}

.song-artist {
    font-size: 0.76rem;
    color: var(--colorNeutralForeground3);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--borderRadiusMedium);
    border: 1px solid var(--colorBrandStroke1);
    background: var(--colorBrandBackground);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow4);
    transition: all var(--durationFast) var(--curveEasyEase);
}

.play-toggle-btn:hover {
    background: var(--colorBrandBackgroundHover);
    box-shadow: var(--shadow8);
    transform: scale(1.04);
}

.play-toggle-btn:active {
    background: var(--colorBrandBackgroundPressed);
    transform: scale(0.97);
}

.play-toggle-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.play-toggle-btn .ic-pause { display: none; }
.playing .play-toggle-btn .ic-play { display: none; }
.playing .play-toggle-btn .ic-pause { display: block; }

.scrub-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-label {
    font-size: 0.74rem;
    font-variant-numeric: tabular-nums;
    color: var(--colorNeutralForeground3);
    min-width: 32px;
}

.time-label.cur { text-align: right; }
.time-label.dur { text-align: left; }

.scrub-range {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: var(--borderRadiusCircular);
    background: rgba(255, 255, 255, 0.16);
    outline: none;
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease;
}

.scrub-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--colorCompoundBrandStroke);
    box-shadow: var(--shadow4);
    cursor: pointer;
    transition: transform var(--durationFast) var(--curveEasyEase);
}

.scrub-range::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

.scrub-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--colorCompoundBrandStroke);
    box-shadow: var(--shadow4);
    cursor: pointer;
}

.volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.volume-slider {
    width: 64px;
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    border-radius: var(--borderRadiusCircular);
    background: rgba(255, 255, 255, 0.16);
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--colorCompoundBrandStroke);
    cursor: pointer;
}

.immersive-restore-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99;
    padding: 8px 14px;
    border-radius: var(--borderRadiusMedium);
    background: var(--colorNeutralBackground1);
    border: 1px solid var(--colorNeutralStroke1);
    border-top: 1px solid var(--colorNeutralStroke2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--colorNeutralForeground1);
    font-size: 0.82rem;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow16);
    transition: all var(--durationFast) var(--curveEasyEase);
    pointer-events: auto;
}

.immersive-restore-btn.visible {
    display: flex;
}

.immersive-restore-btn:hover {
    background: var(--colorNeutralBackground1Hover);
    border-color: var(--colorNeutralStroke1Hover);
    color: #ff8fb2;
}

@media (max-width: 600px) {
    .top-bar {
        padding: 12px 16px;
        gap: 8px;
    }
    .header-actions {
        gap: 6px;
    }
    .player-dock-wrap {
        bottom: 16px;
        width: calc(100vw - 24px);
    }
    .player-card {
        padding: 12px 14px;
    }
    .cover-wrap {
        width: 42px;
        height: 42px;
    }
    .volume-wrap {
        display: none;
    }
}

@media (max-width: 400px) {
    .brand-badge {
        display: none;
    }
}
