/**
 * Consolidated Feature Styles
 * Advanced UI features for OK Rock Band Website
 *
 * Combines:
 * - UX Enhancements (ux-enhancements.css)
 * - Toast Notifications (toast.css)
 * - Music Player (simple-music-player.css)
 * - Navigation System
 *
 * @version 1.0.0
 * @date November 17, 2025
 */

/* ============================================================
   UX ENHANCEMENTS
   ============================================================ */

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

[data-animate] {
    will-change: opacity, transform;
}

[data-animate].animated {
    opacity: 1 !important;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ========================================
   ENHANCED BUTTON STATES
   ======================================== */

.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: button-loading-spin 0.6s linear infinite;
}

.btn-secondary.is-loading::after,
.btn-outline.is-loading::after,
.btn-ghost.is-loading::after {
    border-color: rgba(220, 38, 38, 0.3);
    border-top-color: var(--accent-red);
}

@keyframes button-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.btn.is-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: white;
    animation: button-success-pulse 0.4s ease-out;
}

@keyframes button-success-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.btn.is-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    color: white;
    animation: button-error-shake 0.4s ease-out;
}

@keyframes button-error-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ========================================
   PROGRESSIVE IMAGE LOADING
   ======================================== */

.img-placeholder {
    filter: blur(10px);
    transform: scale(1.05);
}

.img-loaded {
    filter: blur(0);
    transform: scale(1);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.img-error {
    filter: grayscale(1);
    opacity: 0.5;
}

.progressive-image-wrapper {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(234, 88, 12, 0.05) 100%);
}

.progressive-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

/* ========================================
   SCROLL TO TOP BUTTON
   ======================================== */

[data-scroll-top] {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: var(--z-player-popup, 1000);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;

    &.visible {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    &:hover {
        transform: translateY(-4px) scale(1.1);
        box-shadow:
            0 20px 25px -5px rgba(220, 38, 38, 0.4),
            0 10px 10px -5px rgba(220, 38, 38, 0.3);
    }

    &:active {
        transform: translateY(-2px) scale(1.05);
    }

    /* Fallback arrow (shown until the SVG ring component loads) */
    & .scroll-to-top-btn__fallback {
        font-size: 1.5rem;
        line-height: 1;
    }

    /* Hide fallback once the progress ring SVG is injected */
    &.scroll-to-top-btn--has-ring .scroll-to-top-btn__fallback {
        display: none;
    }
}

/* ----- Scroll progress ring (SVG injected by scroll-progress.component.js) ----- */

[data-scroll-top].scroll-to-top-btn--has-ring {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.scroll-progress-ring {
    display: block;
    /* Rotate so progress starts from 12 o'clock */
    transform: rotate(-90deg);
}

.scroll-progress-ring__track {
    stroke: rgba(255, 255, 255, 0.15);
}

.scroll-progress-ring__progress {
    stroke: var(--accent, #dc2626);
    transition: stroke-dashoffset 0.15s ease-out;
}

.scroll-progress-ring__arrow {
    stroke: white;
    /* Counter-rotate the arrow so it stays upright */
    transform-origin: 22px 22px;
    transform: rotate(90deg);
}

/* Hover glow on the progress ring */
[data-scroll-top].scroll-to-top-btn--has-ring:hover .scroll-progress-ring__progress {
    stroke: var(--accent-red-light, #ef4444);
    filter: drop-shadow(0 0 4px var(--accent-glow, rgba(220, 38, 38, 0.3)));
}

/* Respect prefers-reduced-motion: disable ring animation */
@media (prefers-reduced-motion: reduce) {
    .scroll-progress-ring__progress {
        transition: none;
    }
}

@media (max-width: 768px) {
    /* Mobile fix: position above fixed music player (64px min-height + 1rem gap) */
    [data-scroll-top] {
        bottom: calc(64px + 1rem);
        right: 1rem;
        width: 44px;
        height: 44px;
    }
}

/* ========================================
   SCROLL TRACKING
   ======================================== */

body.scrolled .site-header {
    padding: var(--space-2) 0;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    background: rgba(17, 17, 17, 0.95);
}

/* ========================================
   PARALLAX ELEMENTS
   ======================================== */

[data-parallax] {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    [data-parallax] {
        transform: none !important;
    }
}

/* ========================================
   SMOOTH SCROLL BEHAVIOR
   ======================================== */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* :focus-visible — handled by comprehensive rules in base.css ACCESSIBILITY section */

/* ========================================
   LOADING OVERLAY
   ======================================== */

.global-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-overlay, 800);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;

    &.active {
        opacity: 1;
        pointer-events: auto;
    }
}

.global-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(220, 38, 38, 0.2);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: global-spinner 0.8s linear infinite;
}

@keyframes global-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   TOOLTIPS - Now handled by Popover API
   See: /css/components/popover.css
   and: /js/components/popover-tooltips.component.js
   ======================================== */

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

/* ========================================
   TOAST CONTAINER
   ======================================== */

.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: var(--z-overlay, 800);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 420px;
    pointer-events: none;
}

/* ========================================
   TOAST BASE STYLES
   ======================================== */

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    min-width: 320px;
    max-width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   TOAST TYPES
   ======================================== */

.toast-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
    border-left: 4px solid #10b981;
}

.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
    border-left: 4px solid #ef4444;
}

.toast-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.95));
    border-left: 4px solid #f59e0b;
}

.toast-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
    border-left: 4px solid #3b82f6;
}

/* ========================================
   TOAST COMPONENTS
   ======================================== */

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.toast-content {
    flex: 1;
    color: white;
    min-width: 0;
}

.toast-message {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.toast-description {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    margin-top: 4px;
    opacity: 0.9;
}

.toast-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.toast-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;

    &:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
    }

    &:active {
        transform: translateY(0);
    }
}

.toast-dismiss {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 6px;
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;

    &:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.1);
    }

    &:active {
        transform: scale(0.95);
    }
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    animation: toast-progress linear forwards;
    transform-origin: left;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

/* ========================================
   TOAST ANIMATIONS
   @starting-style handles entrance (Chrome 117+, Safari 17.5+)
   Keyframe fallback kept for exit animation
   ======================================== */

/* Entrance: @starting-style gives smooth slide-in from right */
.toast {
    opacity: 1;
    transform: translateX(0) scale(1);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@starting-style {
    .toast {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

/* Legacy class for JS-based entrance (progressive enhancement) */
.toast-enter {
    opacity: 0;
    transform: translateX(100%) scale(0.9);
}

/* Exit animation still uses keyframes (triggered by JS adding class) */
.toast-exit {
    animation: toast-slide-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 200px;
        margin-bottom: 12px;
    }

    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

.toast:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

.toast:hover .toast-progress {
    animation-play-state: paused;
}

.toast:focus-within {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.toast-dismiss:focus-visible,
.toast-action-btn:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* ========================================
   UPDATE NOTIFICATION
   ======================================== */

.update-notification-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    z-index: var(--z-notification, 10000);
    max-width: 300px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: updateSlideIn 0.3s ease;
}

.update-notification-title {
    margin-bottom: 12px;
}

.update-notification-message {
    font-size: 14px;
    margin-bottom: 12px;
    color: #ccc;
}

.update-notification-actions {
    display: flex;
    gap: 8px;
}

.update-notification-btn-primary {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;

    &:hover {
        background: #ff5252;
    }
}

.update-notification-btn-secondary {
    background: transparent;
    color: #ccc;
    border: 1px solid #666;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;

    &:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: #999;
        color: white;
    }
}

@keyframes updateSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================
   MUSIC PLAYER
   ============================================================ */

/* ========================================
   PLAYER LAYOUT FIXES
   ======================================== */

.main-content,
.container {
    padding-bottom: clamp(3rem, 6vw, 6rem);
    transition: padding-bottom 0.3s ease;
}

body.smp-playlist-open .main-content,
body.smp-playlist-open .container {
    padding-bottom: 50vh !important;
}

.site-footer {
    margin-bottom: clamp(3rem, 6vw, 6rem);
    transition: margin-bottom 0.3s ease;
}

body.smp-playlist-open .site-footer {
    margin-bottom: 50vh;
}

/* ========================================
   MUSIC PLAYER CONTAINER
   ======================================== */

/* Reserve space at the bottom of the page for the fixed music player */
body {
    padding-bottom: 110px;
}

.smp-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-player, 900);

    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);

    display: flex;
    flex-direction: column;
    padding: 0;
    height: auto;
    max-height: 85vh;
    min-height: 85px;
    width: 100%;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;

    user-select: none;
    -webkit-user-select: none;
    transition: all 0.3s ease;

    overflow: visible;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Removed: dated shimmer animation on player top border */
.smp-player::before {
    display: none;
}

body .smp-player,
html body .smp-player,
#smp-player,
.simple-music-player {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    position: fixed !important;
    /* bottom intentionally NOT !important — lets body.has-bottom-nav override it on mobile */
}

body:not(.modal-open) .smp-player {
    z-index: var(--z-player, 900);
}

body.modal-open .smp-player {
    /* Drop below player-popup level when a modal is open */
    z-index: calc(var(--z-player, 900) - 1);
}

/* Mini player mode overrides */
.smp-player.smp-mini {
    min-height: 48px !important;
    height: 48px !important;
    overflow: hidden !important;
}

/* Mini bar (collapsed state row) */
.smp-mini-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    height: 48px;
    flex-shrink: 0;
    overflow: hidden;
}

.smp-mini-art {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.smp-mini-vinyl {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.smp-mini-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.smp-mini-play,
.smp-mini-expand {
    & svg {
        width: 14px;
        height: 14px;
    }
}

/* ========================================
   MAIN CONTROLS
   ======================================== */

.smp-main-controls {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    gap: 1.25rem;
    height: 85px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

/* ========================================
   ALBUM ART
   ======================================== */

.smp-art {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;

    /* Now-playing pulse ring */
    &::before {
        content: '';
        position: absolute;
        inset: -3px;
        border-radius: 10px;
        border: 2px solid rgba(220, 38, 38, 0);
        transition: border-color 0.3s ease;
        z-index: -1;
    }

    &.playing::before {
        animation: smp-art-pulse 2s ease-in-out infinite;
    }

    &:hover {
        border-color: rgba(255, 255, 255, 0.2);
    }

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
    }
}

@keyframes smp-art-pulse {
    0%, 100% {
        border-color: rgba(220, 38, 38, 0.2);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
    50% {
        border-color: rgba(220, 38, 38, 0.5);
        box-shadow: 0 0 8px 2px rgba(220, 38, 38, 0.15);
    }
}

/* Simplified: vinyl element now shows as clean static thumbnail */
.smp-vinyl {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smp-vinyl.playing {
    /* Static - no spin animation */
}

.smp-vinyl-center {
    width: 8px;
    height: 8px;
    background: #ff6b6b;
    border-radius: 50%;
}

/* Removed: dated vinyl animation */
/* @keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
} */

/* Removed: dated rotate animation (was used for album art border) */
/* @keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
} */

/* ========================================
   TRACK INFO
   ======================================== */

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

.smp-title {
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.smp-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   CONTROLS
   ======================================== */

.smp-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.smp-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    font-size: 18px;
    position: relative;
    overflow: hidden;

    /* Mobile fix: explicit SVG size prevents layout shift from intrinsic dimensions */
    & svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        pointer-events: none;
    }

    &:hover {
        background: rgba(255, 255, 255, 0.14);
    }

    &:active {
        background: rgba(255, 255, 255, 0.1);
    }
}

.smp-btn-play {
    background: var(--accent, #dc2626);
    width: 52px;
    height: 52px;
    font-size: 20px;
    border-radius: 50%;
    position: relative;
    overflow: visible;

    /* Mobile fix: explicit SVG size for play button */
    & svg {
        width: 20px;
        height: 20px;
    }

    &:hover {
        background: #ef4444;
        opacity: 0.9;
    }

    &:active {
        opacity: 0.8;
    }
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.smp-progress {
    flex: 0 0 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.smp-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: height 0.15s ease;
}

.smp-progress-bar:hover,
.smp-progress-bar.dragging {
    height: 6px;
}

/* Buffered progress indicator */
.smp-progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    z-index: 1;
}

.smp-progress-fill {
    height: 100%;
    background: var(--accent, #dc2626);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    z-index: 2;
}

.smp-progress-fill::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -5px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease;
    z-index: 3;
}

.smp-progress-bar:hover .smp-progress-fill::after,
.smp-progress-bar.dragging .smp-progress-fill::after {
    transform: translateY(-50%) scale(1);
}

/* ---- Waveform Visualizer (progress bar overlay) ---- */

.smp-progress-bar.smp-waveform-active {
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
}

.smp-progress-bar.smp-waveform-active .smp-progress-fill {
    opacity: 0.55;
}

.smp-progress-bar.smp-waveform-active .smp-progress-buffered {
    opacity: 0.3;
}

/* Keep the seek thumb visible on hover even when waveform is active */
.smp-progress-bar.smp-waveform-active:hover .smp-progress-fill::after,
.smp-progress-bar.smp-waveform-active.dragging .smp-progress-fill::after {
    transform: translateY(-50%) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .smp-progress-bar.smp-waveform-active {
        height: 6px;
    }
}

.smp-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}

/* ========================================
   VOLUME - Vertical Popup Slider
   ======================================== */

.smp-volume-section {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.smp-volume-wrapper {
    position: relative;
}

.smp-volume-popup {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: var(--z-player-popup, 1000);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);

    &.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) scale(1);
    }

    &::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: rgba(15, 15, 25, 0.95);
    }
}

.smp-volume-slider-vertical {
    -webkit-appearance: none;
    appearance: none;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 6px;
    height: 100px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.smp-volume-slider-vertical::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.smp-volume-slider-vertical::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.smp-volume-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}

/* ========================================
   PLAYLIST
   ======================================== */

.smp-playlist {
    flex: 1;
    max-height: 60vh;
    min-height: 200px;
    overflow-y: auto;

    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;

    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Removed: decorative gradient line */
.smp-playlist::before {
    display: none;
}

.smp-playlist::-webkit-scrollbar {
    width: 6px;
}

.smp-playlist::-webkit-scrollbar-track {
    background: transparent;
}

.smp-playlist::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.smp-playlist::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.smp-playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.smp-playlist-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.smp-playlist-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;

    & svg {
        width: 16px;
        height: 16px;
        pointer-events: none;
    }

    &:hover {
        background: rgba(255, 107, 107, 0.2);
        color: #ffffff;
        transform: scale(1.1);
    }
}

.smp-playlist-title {
    font-weight: 600;
    font-size: 15px;
    color: #ffffff;
}

.smp-playlist-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 107, 107, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.smp-playlist-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;

    &:hover {
        color: #ff6b6b;
        background: rgba(255, 107, 107, 0.1);
        transform: scale(1.1);
    }
}

.smp-close-playlist {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;

    &:hover {
        color: #ff6b6b;
        background: rgba(255, 107, 107, 0.1);
    }
}

.smp-playlist-content {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
}

.smp-track-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;

    &:hover {
        background: rgba(255, 255, 255, 0.05);
        border-left-color: #ff6b6b;

        & .smp-track-remove,
        & .smp-track-share {
            opacity: 1;
        }
    }

    &.active {
        background: rgba(255, 107, 107, 0.1);
        border-left-color: #ff6b6b;

        & .smp-track-number {
            color: #ff6b6b;
        }
    }
}

.smp-track-thumb {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    margin-right: 8px;
}

/* When thumbnail is present, hide the track number on small screens */
.smp-track-thumb + .smp-track-number {
    width: 20px;
    font-size: 10px;
    margin-right: 8px;
}

.smp-track-number {
    width: 24px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-right: 12px;
}

.smp-track-details {
    flex: 1;
    min-width: 0;
}

.smp-track-name {
    font-weight: 500;
    color: #ffffff;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.smp-track-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.smp-track-duration {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 12px;
}

.smp-track-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    & svg {
        width: 14px;
        height: 14px;
        pointer-events: none;
    }

    &:hover {
        color: #ff4757;
        background: rgba(255, 71, 87, 0.1);
    }
}

.smp-track-share {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    margin-left: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    & svg {
        width: 13px;
        height: 13px;
        pointer-events: none;
    }

    &:hover {
        color: #3b82f6;
        background: rgba(59, 130, 246, 0.1);
    }
}

/* Drag-and-drop reordering */
.smp-playlist-drag-handle {
    cursor: grab;
    opacity: 0.3;
    padding: 0 6px;
    user-select: none;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;

    &:hover {
        opacity: 0.8;
    }
}
.smp-track-item[draggable].dragging {
    opacity: 0.4;
}
.smp-track-item.drag-over-top {
    box-shadow: inset 0 2px 0 #ff6b6b;
}
.smp-track-item.drag-over-bottom {
    box-shadow: inset 0 -2px 0 #ff6b6b;
}
.smp-track-item.drag-placeholder {
    background: rgba(255, 107, 107, 0.08);
    border: 1px dashed rgba(255, 107, 107, 0.3);
    border-radius: 4px;
}

.smp-playlist-empty {
    text-align: center;
    padding: clamp(1.5rem, 4vw, 2.5rem) 1.25rem;
    color: rgba(255, 255, 255, 0.5);
}

.smp-playlist-empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;

    & svg {
        width: 32px;
        height: 32px;
    }
}

.smp-playlist-empty-text {
    font-size: 14px;
    line-height: 1.5;
}

.smp-mode-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.smp-btn-mode {
    width: 28px;
    height: 28px;
    font-size: 12px;

    & svg {
        width: 14px;
        height: 14px;
    }
}

.smp-btn-mode.active {
    background: #ff6b6b;
    color: white;
}

.smp-btn-crossfade {
    font-size: 10px;
    letter-spacing: -1px;
    line-height: 28px;
}

.smp-btn-crossfade.active {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
}

/* ========================================
   KEYBOARD SHORTCUTS HELP
   ======================================== */

.smp-keyboard-help {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 16px;
    background: rgba(10, 10, 20, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    z-index: var(--z-player-popup, 1000);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: smp-help-in 0.2s ease-out;
    max-width: 320px;
}

@keyframes smp-help-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smp-keyboard-help-title {
    font-weight: 600;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.smp-keyboard-help-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    align-items: center;
}

.smp-keyboard-help-grid kbd {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.85);
    min-width: 24px;
    text-align: center;
    white-space: nowrap;
}

.smp-keyboard-help-grid span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   SLEEP TIMER
   ======================================== */

.smp-sleep-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}

.smp-sleep-remaining {
    font-size: 10px;
    color: #ff6b6b;
    font-variant-numeric: tabular-nums;
    min-width: 0;
    white-space: nowrap;
}

#smp-sleep-btn.active {
    color: #ff6b6b;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
}

.smp-sleep-dropdown {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    z-index: var(--z-player-popup, 1000);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 90px;

    &.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) scale(1);
    }

    &::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: rgba(15, 15, 25, 0.95);
    }
}

.smp-sleep-option {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 6px;
    text-align: center;
    transition: background 0.15s ease;
    font-family: inherit;

    &:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
}

.smp-sleep-option.smp-sleep-off {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 2px;
    padding-top: 8px;
    color: rgba(255, 107, 107, 0.8);
}

.smp-sleep-option.smp-sleep-off:hover {
    color: #ff6b6b;
}

/* ========================================
   TRACK TRANSITION ANIMATION
   ======================================== */

.smp-info {
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.smp-info.smp-track-transition {
    opacity: 0;
    transform: translateY(4px);
}

/* ========================================
   PLAYER STATES
   ======================================== */

.smp-player.hidden {
    transform: translateY(100%) !important;
    pointer-events: none !important;
}

.smp-player:not(.hidden) {
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.smp-player.loading .smp-title::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {

    0%,
    20% {
        content: ".";
    }

    40% {
        content: "..";
    }

    60%,
    100% {
        content: "...";
    }
}

.smp-btn:focus,
.smp-progress-bar:focus,
.smp-volume-slider-vertical:focus {
    outline: 2px solid #ff6b6b;
    outline-offset: 2px;
}

/* Buffering state - spinner on play button */
.smp-player.smp-buffering .smp-btn-play {
    position: relative;
    pointer-events: none;
}

.smp-player.smp-buffering .smp-btn-play svg {
    opacity: 0.3;
}

.smp-player.smp-buffering .smp-btn-play::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: smp-spin 0.8s linear infinite;
}

@keyframes smp-spin {
    to { transform: rotate(360deg); }
}

/* Screen reader only utility (for live region) */
#smp-live-region {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus-visible for keyboard-only focus rings */
.smp-btn:focus:not(:focus-visible),
.smp-progress-bar:focus:not(:focus-visible),
.smp-volume-slider-vertical:focus:not(:focus-visible) {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .smp-art.playing::before {
        animation: none;
        border-color: rgba(220, 38, 38, 0.4);
    }

    .smp-info.smp-track-transition {
        transition: none;
    }

    .smp-keyboard-help {
        animation: none;
    }

    .smp-player.smp-buffering .smp-btn-play::after {
        animation: none;
        border-top-color: rgba(255, 255, 255, 0.6);
    }
}

/* ============================================================
   NAVIGATION SYSTEM
   ============================================================ */

/* ========================================
   HEADER
   ======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header, 1000);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;

    &.scrolled {
        background: #0a0a0a;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
}

.site-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 0.75rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   BRAND
   ======================================== */

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ff3366;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;

    &:hover {
        color: #ff6b9d;
        text-decoration: none;
    }
}

.brand-icon {
    font-size: 1.5rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
}

.brand-tagline {
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1;
}

/* ========================================
   NAVIGATION MENU
   ======================================== */

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
}

/* Desktop: hide hamburger nav-menu when desktop-nav is visible */
@media (min-width: 1024px) {
    .nav-menu {
        display: none;
    }
    .nav-toggle {
        display: none;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;

    &:hover {
        color: var(--accent-red, #dc2626);
        text-decoration: none;
    }

    &.active {
        color: var(--accent-red, #dc2626);
    }

    &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--accent-red);
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    &:hover::after,
    &.active::after {
        opacity: 1;
    }
}

/* ========================================
   DROPDOWN MENU
   ======================================== */

.site-dropdown {
    position: relative;
}

.site-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: rgba(22, 22, 22, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: calc(var(--z-header, 1000) + 1);
}

.site-dropdown.active .site-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    text-decoration: none;
    color: #b3b3b3;
    border-radius: 8px;
    transition: all 0.3s ease;

    &:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.05);
        text-decoration: none;
    }
}

.item-icon {
    font-size: 1.25rem;
    opacity: 0.8;
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-title {
    font-weight: 500;
    font-size: 0.9rem;
}

.item-desc {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ========================================
   NAVIGATION ACTIONS
   ======================================== */

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-btn,
.theme-toggle-btn,
.nav-toggle {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #b3b3b3;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.search-btn:hover,
.theme-toggle-btn:hover,
.nav-toggle:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-toggle {
    flex-direction: column;
    gap: 4px;
    display: none;
}

.toggle-line {
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.nav-toggle.active .toggle-line:nth-child(1) {
    transform: rotate(45deg) translateY(6px);
}

.nav-toggle.active .toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .toggle-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-6px);
}

/* ========================================
   SEARCH OVERLAY
   ======================================== */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: calc(var(--z-header, 1000) + 2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;

    &.active {
        opacity: 1;
        visibility: visible;
    }
}

.search-container {
    position: relative;
    max-width: 600px;
    width: 90%;
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 1.5rem 2rem;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 1.2rem;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-submit {
    padding: 1.5rem 2rem;
    border: none;
    background: #ff3366;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
        background: #ff6b9d;
    }
}

.search-close {
    position: absolute;
    top: -60px;
    right: 0;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }
}

/* ========================================
   LANGUAGE SWITCHER
   ======================================== */

.language-switcher {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: #b3b3b3;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.1);
    }
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 150px;
    background: rgba(22, 22, 22, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: calc(var(--z-header, 1000) + 1);
}

.language-switcher.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ========================================
   BODY LAYOUT FIXES
   ======================================== */

body {
    padding-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {

    /* Toast Notifications */
    .toast-container {
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .toast {
        min-width: auto;
    }

    @keyframes toast-slide-in {
        from {
            opacity: 0;
            transform: translateY(100%) scale(0.95);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes toast-slide-out {
        from {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        to {
            opacity: 0;
            transform: translateY(100%) scale(0.95);
        }
    }

    .update-notification-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    /* Music Player */
    .smp-player {
        padding: 0;
        gap: 0;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        /* Prevent player from capturing scroll events */
        touch-action: pan-x;
        overscroll-behavior: none;
    }

    .smp-main-controls {
        padding: 10px 12px;
        height: auto;
        min-height: 64px;
        gap: 10px;
    }

    .smp-art {
        width: 44px;
        height: 44px;
    }

    .smp-vinyl {
        width: 44px;
        height: 44px;
    }

    /* Mobile fix: visual size 32px, expanded 44px touch target via ::after for WCAG 2.5.8 */
    .smp-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;

        &::after {
            content: '';
            position: absolute;
            inset: -6px;
            min-width: 44px;
            min-height: 44px;
        }

        & svg {
            width: 14px;
            height: 14px;
        }
    }

    .smp-btn-play {
        width: 40px;
        height: 40px;
        font-size: 16px;

        & svg {
            width: 16px;
            height: 16px;
        }
    }

    .smp-progress {
        flex: 0 0 80px;
    }

    /* Hide keyboard help and sleep timer on mobile */
    #smp-keyboard-help-btn {
        display: none;
    }

    .smp-keyboard-help {
        display: none !important;
    }

    .smp-sleep-wrapper {
        display: none;
    }

    .smp-mode-buttons {
        display: none;
    }

    .smp-volume-popup {
        right: 0;
        left: auto;
        transform: translateX(0) scale(0.9);
    }

    .smp-volume-popup.active {
        transform: translateX(0) scale(1);
    }

    .smp-volume-popup::after {
        right: 16px;
        left: auto;
        transform: none;
    }

    /* Navigation */
    .site-navbar {
        padding: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0a0a0a;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        padding: 1rem;
        justify-content: flex-start;
    }

    .site-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 0.5rem;
        margin-left: 1rem;
    }

    body {
        padding-top: 70px;
    }
}

@media (max-width: 480px) {
    .smp-main-controls {
        flex-wrap: wrap;
        padding: 8px 10px;
        gap: 6px;
    }

    .smp-art {
        width: 36px;
        height: 36px;
    }

    .smp-info {
        flex: 1 1 0;
        min-width: 60px;
    }

    .smp-title {
        font-size: 13px;
    }

    .smp-artist {
        font-size: 11px;
    }

    .smp-controls {
        gap: 4px;
    }

    .smp-progress {
        flex: 0 0 60px;
    }

    .smp-time {
        font-size: 10px;
    }

    .smp-volume-section {
        gap: 4px;
    }

    .smp-playlist-panel {
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .toast,
    .toast-enter,
    .toast-exit {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .toast-progress {
        animation: none !important;
        display: none;
    }
}

@media (prefers-contrast: high) {
    .toast {
        border: 2px solid white;
    }

    .toast-dismiss,
    .toast-action-btn {
        border: 2px solid white;
    }
}


/* Navigation Styles - Fixes for site-header and site-navbar
   NOTE: These duplicate selectors override the earlier navigation section with slightly different values */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header, 1000);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;

    &.scrolled {
        background: #0a0a0a;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
}

.site-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ff3366;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;

    &:hover {
        color: #ff6b9d;
        text-decoration: none;
    }
}

.brand-icon {
    font-size: 1.5rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
}

.brand-tagline {
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Desktop: hide hamburger nav-menu (duplicate guard) */
@media (min-width: 1024px) {
    .nav-menu {
        display: none;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #b3b3b3;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: color 0.2s ease;
    position: relative;

    &:hover {
        color: var(--accent-red, #dc2626);
        text-decoration: none;
    }

    &.active {
        color: var(--accent-red, #dc2626);
    }
}

.site-dropdown {
    position: relative;
}

.site-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: rgba(22, 22, 22, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: calc(var(--z-header, 1000) + 1);
}

.site-dropdown.active .site-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    text-decoration: none;
    color: #b3b3b3;
    border-radius: 8px;
    transition: all 0.3s ease;

    &:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.05);
        text-decoration: none;
    }
}

.item-icon {
    font-size: 1.25rem;
    opacity: 0.8;
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-title {
    font-weight: 500;
    font-size: 0.9rem;
}

.item-desc {
    font-size: 0.8rem;
    opacity: 0.7;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-btn,
.theme-toggle-btn,
.nav-toggle {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #b3b3b3;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.search-btn:hover,
.theme-toggle-btn:hover,
.nav-toggle:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-toggle {
    flex-direction: column;
    gap: 4px;
    display: none;
    /* Hidden by default, shown on mobile */
}

.toggle-line {
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.nav-toggle.active .toggle-line:nth-child(1) {
    transform: rotate(45deg) translateY(6px);
}

.nav-toggle.active .toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .toggle-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-6px);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: calc(var(--z-header, 1000) + 2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;

    &.active {
        opacity: 1;
        visibility: visible;
    }
}

.search-container {
    position: relative;
    max-width: 600px;
    width: 90%;
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 1.5rem 2rem;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 1.2rem;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-submit {
    padding: 1.5rem 2rem;
    border: none;
    background: #ff3366;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
        background: #ff6b9d;
    }
}

.search-close {
    position: absolute;
    top: -60px;
    right: 0;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .site-navbar {
        padding: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0a0a0a;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        padding: 1rem;
        justify-content: flex-start;
    }

    .site-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 0.5rem;
        margin-left: 1rem;
    }
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: #b3b3b3;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.1);
    }
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 150px;
    background: rgba(22, 22, 22, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: calc(var(--z-header, 1000) + 1);
}

.language-switcher.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Fix for body padding to account for fixed header */
body {
    padding-top: 80px;
}

/* Container for centering */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

.content-visibility-auto {
    content-visibility: auto;
    contain-intrinsic-size: 1px 1000px;
}

/* ============================================================
   PREMIUM INTERACTION FEATURES
   ============================================================ */

/* Smooth scroll-to-top with deceleration (extends base rules above) */
[data-scroll-top] {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease,
                box-shadow 0.3s ease;
}

/* Music player progress bar smooth interaction */
.player-progress:hover .progress-bar {
    height: 6px;
    transition: height 0.2s ease;
}

.player-progress .progress-bar {
    height: 3px;
    transition: height 0.2s ease;
}

/* Toast notification slide-in: CSS @starting-style handles entrance;
   .show/.hide classes kept for JS compatibility */
.toast.show {
    transform: translateX(0);
}

.toast.hide {
    transform: translateX(110%);
    transition: transform 0.3s cubic-bezier(0.5, 0, 0.75, 0);
}

/* Search modal backdrop with blur */
.search-modal-overlay {
    backdrop-filter: blur(8px);
    transition: backdrop-filter 0.3s ease, opacity 0.3s ease;
}

/* Navigation link active indicator */
.nav-links-minimal a[aria-current="page"]::after,
.nav-links-minimal a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent, #dc2626);
}

/* Smooth theme transition */
*,
*::before,
*::after {
    transition-property: background-color, border-color;
    transition-duration: 0s;
}

html[data-transitioning-theme] *,
html[data-transitioning-theme] *::before,
html[data-transitioning-theme] *::after {
    transition-duration: 0.3s !important;
}

/* Loading bar at top */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--accent, #dc2626);
    z-index: var(--z-overlay, 800);
    transition: width 0.3s ease;
}

/* Improved keyboard navigation indicator */
body.keyboard-nav :focus-visible {
    outline: 2px solid var(--accent, #dc2626);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

/* prefers-reduced-motion, prefers-contrast, .skip-link, :focus-visible
   — all handled by comprehensive rules in base.css ACCESSIBILITY section */

/* ================================================
   HEADER - Moved from inline styles (header.ejs)
   ================================================ */
.site-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header .header-bg {
    backdrop-filter: blur(20px);
    background: rgba(20, 20, 25, 0.5);
}

/* Navigation minimal layout */
.nav-modern {
    padding: 0.75rem 1.5rem;
}

.nav-brand-text {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.site-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.nav-links-minimal {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.nav-links-minimal a {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
    transition: opacity 0.2s;
    text-decoration: none;
    color: inherit;
}

.nav-links-minimal .nav-link {
    padding: 0.5rem 0.25rem;
}

.nav-links-minimal a:hover,
.nav-links-minimal a.active {
    opacity: 1;
}

@media (max-width: 1200px) {
    .nav-links-minimal {
        display: none;
    }
    .nav-menu.active .nav-links-minimal {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    .nav-menu.active .nav-links-minimal a {
        font-size: 1rem;
        opacity: 0.85;
    }
}

/* ================================================
   VIEW TRANSITIONS API - Moved from inline styles
   ================================================ */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: vt-fade-out 0.2s ease-in forwards;
}

::view-transition-new(root) {
    animation: vt-fade-in 0.3s ease-out 0.1s forwards;
}

@keyframes vt-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes vt-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-title {
    view-transition-name: hero-title;
}

.nav-brand-text {
    view-transition-name: brand;
}

::view-transition-old(hero-title) {
    animation: vt-slide-out-up 0.3s ease-in forwards;
}

::view-transition-new(hero-title) {
    animation: vt-slide-in-up 0.4s ease-out forwards;
}

@keyframes vt-slide-out-up {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

@keyframes vt-slide-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ENHANCED SEARCH MODAL (search-modal-enhanced)
   Full-screen overlay with blur, categories, keyboard nav,
   recent searches, and grouped result cards.
   ============================================================ */

/* --- Dialog reset & base --- */
.search-modal-enhanced {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.search-modal-enhanced::backdrop {
    background: oklch(0 0 0 / 0.65);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    opacity: 1;
    transition: opacity 0.22s ease-out,
                overlay 0.22s ease-out allow-discrete,
                display 0.22s ease-out allow-discrete;
}

@starting-style {
    .search-modal-enhanced::backdrop {
        opacity: 0;
    }
}

/* @starting-style entrance replaces keyframe animation */
.search-modal-enhanced[open] {
    opacity: 1;
    transition: opacity 0.22s ease-out,
                overlay 0.22s ease-out allow-discrete,
                display 0.22s ease-out allow-discrete;
}

@starting-style {
    .search-modal-enhanced[open] {
        opacity: 0;
    }
}

/* --- Container (centered card) --- */
.sme-container {
    position: fixed;
    top: 12vh;
    left: 50%;
    transform: translateX(-50%);
    width: 95vw;
    max-width: 640px;
    max-height: 74vh;
    display: flex;
    flex-direction: column;
    background: rgba(18, 18, 28, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow: hidden;
    animation: sme-slide-up 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sme-slide-up {
    from { opacity: 0; transform: translateX(-50%) translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1); }
}

/* --- Header --- */
.sme-header {
    flex-shrink: 0;
    padding: 16px 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sme-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px;
}

.sme-search-icon {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.4);
}

.sme-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary, #fff);
    font-family: inherit;
    padding: 8px 0;
}

.sme-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.sme-kbd {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-mono, ui-monospace, monospace);
    line-height: 1.4;
}

.sme-close-form {
    margin: 0;
    padding: 0;
    display: flex;
}

.sme-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.sme-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* --- Category Tabs --- */
.sme-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 0 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.sme-tabs::-webkit-scrollbar { display: none; }

.sme-tab {
    padding: 5px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.sme-tab:hover {
    border-color: rgba(220, 38, 38, 0.5);
    color: rgba(255, 255, 255, 0.8);
}

.sme-tab.active {
    background: var(--accent-red, #dc2626);
    border-color: var(--accent-red, #dc2626);
    color: #fff;
}

/* --- Results body (scrollable) --- */
.sme-body {
    flex: 1;
    overflow-y: auto;
    min-height: 120px;
    max-height: calc(74vh - 180px);
}

.sme-body::-webkit-scrollbar { width: 6px; }
.sme-body::-webkit-scrollbar-track { background: transparent; }
.sme-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.sme-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sme-results-scroll { padding: 8px; }

/* --- Results count --- */
.sme-results-count {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    padding: 4px 12px 8px;
}

/* --- Result group --- */
.sme-group {
    margin-bottom: 8px;
}

.sme-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 4px;
}

.sme-group-icon {
    color: var(--accent-red, #dc2626);
    display: flex;
    align-items: center;
}

.sme-group-label {
    flex: 1;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
}

.sme-group-count {
    font-size: 0.68rem;
    padding: 1px 7px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 700;
}

/* --- Result item --- */
.sme-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sme-result:hover,
.sme-result.selected {
    background: rgba(220, 38, 38, 0.12);
}

.sme-result-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
}

.sme-result.selected .sme-result-icon,
.sme-result:hover .sme-result-icon {
    background: rgba(220, 38, 38, 0.15);
    color: var(--accent-red, #dc2626);
}

.sme-result-body {
    flex: 1;
    min-width: 0;
}

.sme-result-title {
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.sme-result-title mark {
    background: rgba(220, 38, 38, 0.25);
    color: var(--accent-red, #ff6b6b);
    padding: 0.05em 0.15em;
    border-radius: 2px;
}

.sme-result-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sme-result-desc mark {
    background: rgba(220, 38, 38, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

.sme-result-meta {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 2px;
}

.sme-result-arrow {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.15);
    transition: color 0.15s, transform 0.15s;
}

.sme-result:hover .sme-result-arrow,
.sme-result.selected .sme-result-arrow {
    color: var(--accent-red, #dc2626);
    transform: translateX(2px);
}

/* --- Member result with photo thumbnail --- */
.sme-result-thumb {
    border-radius: 50%;
    overflow: hidden;
    padding: 0;
    background: rgba(255, 255, 255, 0.06);
}

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

.sme-result--member .sme-result-meta {
    color: rgba(220, 38, 38, 0.55);
    font-style: italic;
}

.sme-result--member.selected .sme-result-thumb,
.sme-result--member:hover .sme-result-thumb {
    box-shadow: 0 0 0 2px var(--accent-red, #dc2626);
}

/* --- Idle state --- */
.sme-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px 16px;
    text-align: center;
}

.sme-idle-icon {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.25);
}

.sme-idle-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0 8px;
}

.sme-idle-shortcut {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    gap: 4px;
}

.sme-idle-shortcut kbd {
    font-size: 0.7rem;
    padding: 2px 5px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    font-family: var(--font-mono, ui-monospace, monospace);
}

/* --- Recent searches --- */
.sme-recent {
    width: 100%;
    margin-top: 20px;
    text-align: left;
}

.sme-recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
    margin-bottom: 8px;
}

.sme-recent-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.35);
}

.sme-recent-clear {
    background: none;
    border: none;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
}

.sme-recent-clear:hover {
    color: var(--accent-red, #dc2626);
    background: rgba(220, 38, 38, 0.1);
}

.sme-recent-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sme-recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: none;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.15s;
}

.sme-recent-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sme-recent-icon {
    flex-shrink: 0;
    display: flex;
    color: rgba(255, 255, 255, 0.25);
}

.sme-recent-text {
    flex: 1;
}

.sme-recent-arrow {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.15);
    display: flex;
}

.sme-recent-item:hover .sme-recent-arrow {
    color: rgba(255, 255, 255, 0.4);
}

/* --- Loading state --- */
.sme-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 16px;
    gap: 12px;
}

.sme-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-red, #dc2626);
    border-radius: 50%;
    animation: sme-spin 0.7s linear infinite;
}

@keyframes sme-spin {
    to { transform: rotate(360deg); }
}

.sme-loading-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Empty/No results state --- */
.sme-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 16px;
    text-align: center;
}

.sme-empty-icon {
    color: rgba(255, 255, 255, 0.15);
    margin-bottom: 16px;
}

.sme-empty-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
}

.sme-empty-hint {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.5;
}

/* --- Footer --- */
.sme-footer {
    flex-shrink: 0;
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}

.sme-footer-hints {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
}

.sme-footer-hints kbd {
    font-size: 0.65rem;
    padding: 1px 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    font-family: var(--font-mono, ui-monospace, monospace);
    margin: 0 2px;
}

/* --- Result slide-in animation --- */
.sme-result {
    animation: sme-result-in 0.18s ease backwards;
}
.sme-result:nth-child(1) { animation-delay: 0.02s; }
.sme-result:nth-child(2) { animation-delay: 0.04s; }
.sme-result:nth-child(3) { animation-delay: 0.06s; }
.sme-result:nth-child(4) { animation-delay: 0.08s; }
.sme-result:nth-child(5) { animation-delay: 0.10s; }

@keyframes sme-result-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .sme-container {
        top: 4vh;
        width: 96vw;
        max-height: 92vh;
        border-radius: 12px;
    }

    .sme-body {
        max-height: calc(92vh - 170px);
    }

    .sme-input {
        font-size: 1rem;
    }

    .sme-tab {
        font-size: 0.72rem;
        padding: 4px 10px;
    }

    .sme-footer-hints {
        gap: 8px;
        font-size: 0.62rem;
    }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .search-modal-enhanced[open],
    .sme-container,
    .sme-result {
        animation: none;
    }
    .sme-spinner {
        animation-duration: 1.5s;
    }
}

/* =============================================
   COMPREHENSIVE PRINT STYLESHEET
   Covers: Articles, Lyrics, Albums, Members,
   Events, Gallery, and General pages.
   ============================================= */
@media print {

    /* ── @page rules ── */
    @page {
        margin: 1.8cm 2cm;
        size: A4;
    }
    @page :first {
        margin-top: 1.4cm;
    }

    /* ── Global resets ── */
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        filter: none !important;
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto !important;
    }

    body {
        font-family: 'Georgia', 'Times New Roman', serif !important;
        font-size: 12pt !important;
        line-height: 1.6 !important;
        color: #000 !important;
        background: #fff !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    body::before,
    body::after {
        display: none !important;
        content: none !important;
    }

    /* ── Hide non-printable elements ── */
    nav:not(.article-breadcrumbs-modern),
    .site-header,
    .site-footer,
    footer,
    .footer-modern,
    .nav-modern,
    .nav-toggle,
    .nav-menu,
    .nav-actions,
    .header-bg,
    .header-blur,
    .scroll-to-top-btn,
    .pwa-install-btn,
    .theme-toggle-btn,
    .search-btn,
    .search-modal-enhanced,
    #search-modal,
    .smp-player,
    .simple-music-player,
    .player-container,
    .bottom-player,
    video,
    iframe,
    .video-player,
    .video-modal,
    .cookie-consent,
    .batch-action-bar,
    .skip-link,
    .skip-to-main,
    .reading-progress,
    .reading-progress-bar,
    .toast,
    .toast-container,
    .sticky-share-bar,
    .share-btn-modern,
    .social-share,
    .social-share-bar,
    .share-bar-toast,
    .article-prev-next-nav,
    .related-section-modern,
    .album-actions,
    .track-play-btn,
    .track-add-to-queue-btn,
    .track-actions,
    #play-album-btn,
    #add-album-to-queue-btn,
    #share-album-btn,
    .album-share-btn,
    .album-queue-btn,
    .album-play-all-btn,
    .bottom-nav-mobile,
    .breadcrumb,
    .breadcrumbs,
    .loading-spinner,
    .album-loading-container,
    .admin-toolbar,
    .admin-sidebar,
    .popover,
    [role="tooltip"],
    .era-filters,
    .filter-controls,
    .comments-section,
    .album-interactions,
    .tts-reader,
    .tts-toolbar,
    .toc-auto,
    .toc-sticky,
    .article-toc,
    .quick-nav,
    .quick-nav-btn,
    .page-loader,
    #page-loader,
    .article-lightbox,
    .gallery-slideshow,
    .gallery-slideshow-btn,
    .spa-progress,
    .swup-progress-bar,
    .keyboard-shortcuts-modal,
    .keyboard-shortcuts-overlay,
    .share-track-popup,
    .share-track-overlay,
    .guestbook-form,
    .guestbook-pagination,
    .member-back,
    .member-activity-timeline,
    .other-members,
    .album-share-bar,
    .album-streaming-platforms,
    #streaming-links-container,
    .album-cover-thumbs,
    .album-nav,
    .album-related-articles,
    .album-cover-lightbox,
    .track-copy-link-btn,
    .track-download-btn,
    #related-content-album,
    #related-content-article,
    .vinyl-record,
    .track-list-waveform,
    .album-credits,
    .album-lyrics-badge,
    .annotation-display,
    .lyrics-controls,
    .lyrics-search-wrapper,
    .lyrics-album-filter,
    .lyrics-search-hint,
    .lyrics-search-input,
    .lyrics-search-clear,
    .lyrics-track__chevron,
    .lyrics-track__preview,
    .lyrics-album__link,
    .lyrics-empty,
    .lyrics-btn,
    .lyrics-track__loading,
    .lyrics-track__actions,
    .lyrics-quickjump,
    .lyrics-hero__actions,
    .lyrics-hero__coverage,
    .lyrics-search-results-count,
    .lyrics-action-btn,
    .lyrics-copy-btn,
    .print-btn,
    .print-lyrics-btn,
    .print-article-btn,
    .print-album-lyrics-btn,
    [data-print-btn],
    [data-component="offline-album"],
    [data-component="related-content"],
    [data-component="favorites"],
    script,
    .concert-map-container,
    .events-filter-bar,
    .event-type-badges,
    .newsletter-signup,
    .fan-photos-dropzone,
    .community-nav {
        display: none !important;
    }

    /* ── Typography ── */
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
        break-after: avoid;
        orphans: 3;
        widows: 3;
        font-family: 'Arial', 'Helvetica Neue', sans-serif !important;
    }

    h1 {
        font-size: 18pt !important;
        margin-bottom: 8pt !important;
        border-bottom: 1pt solid #999;
        padding-bottom: 4pt;
    }

    h2 {
        font-size: 15pt !important;
        margin-top: 14pt !important;
        margin-bottom: 6pt !important;
    }

    h3 {
        font-size: 13pt !important;
        margin-bottom: 4pt !important;
    }

    h4, h5, h6 {
        font-size: 12pt !important;
        margin-bottom: 4pt !important;
    }

    p {
        color: #000 !important;
        font-size: 12pt !important;
        line-height: 1.6 !important;
        orphans: 3;
        widows: 3;
    }

    blockquote {
        border-left: 2pt solid #666 !important;
        padding-left: 12pt !important;
        margin: 8pt 0 !important;
        font-style: italic;
        color: #333 !important;
    }

    code, pre {
        font-size: 10pt !important;
        border: 0.5pt solid #ccc !important;
        padding: 2pt 4pt !important;
    }

    pre {
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* ── Links: show URL footnotes ── */
    a,
    a:visited {
        color: #000 !important;
        text-decoration: underline !important;
    }

    .article-body-modern a[href^="http"]::after,
    .typography-content a[href^="http"]::after,
    .album-description a[href^="http"]::after,
    .bio-text a[href^="http"]::after,
    .member-biography a[href^="http"]::after {
        content: " [" attr(href) "]" !important;
        font-size: 8pt !important;
        font-weight: normal !important;
        color: #555 !important;
        word-break: break-all;
    }

    a[href^="http"] > img::after,
    .btn::after,
    a.btn::after,
    .member-album-card::after {
        content: none !important;
    }

    /* ── Images ── */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .typography-content img,
    .article-body-modern img {
        filter: grayscale(100%) !important;
        -webkit-filter: grayscale(100%) !important;
    }

    .album-artwork-large img,
    .album-cover img,
    .member-photo-wrapper img,
    .lyrics-album__cover {
        filter: none !important;
        -webkit-filter: none !important;
    }

    /* ── Page break control ── */
    figure,
    table,
    .bento-card,
    .track-item,
    .guestbook-entry {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .track-list,
    .album-tracks-section {
        page-break-inside: auto;
        break-inside: auto;
    }

    /* ── Layout resets ── */
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    main {
        padding: 0 !important;
        min-height: auto !important;
    }

    #swup {
        opacity: 1 !important;
    }

    .transition-fade {
        opacity: 1 !important;
        transform: none !important;
    }

    [data-reveal],
    [data-stagger] > *,
    [data-animate],
    .scroll-reveal,
    .scroll-reveal-scale,
    .scroll-reveal-left,
    .scroll-animate,
    .scroll-animate-fade,
    .scroll-animate-scale,
    .text-reveal span,
    .album-detail-fade-in {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    /* ── Tables ── */
    table {
        border-collapse: collapse !important;
        width: 100% !important;
    }

    th, td {
        border: 0.5pt solid #999 !important;
        padding: 3pt 6pt !important;
        font-size: 10pt !important;
    }

    thead {
        display: table-header-group !important;
    }

    tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* =============================================
       ARTICLE PAGE
       ============================================= */

    .article-page-layout {
        padding: 0 !important;
        margin: 0 !important;
    }

    .article-grid-layout {
        display: block !important;
        max-width: 100% !important;
    }

    .article-hero-single {
        min-height: auto !important;
        height: auto !important;
        padding: 0 !important;
        margin-bottom: 10pt !important;
    }

    .article-bg-image {
        display: none !important;
    }

    .article-hero-fallback {
        display: none !important;
    }

    .article-header-content {
        position: relative !important;
        padding: 0 !important;
    }

    .article-breadcrumbs-modern {
        display: none !important;
    }

    .article-title-hero {
        font-size: 20pt !important;
        text-align: left !important;
        margin-bottom: 4pt !important;
    }

    .article-meta-grid {
        margin-bottom: 8pt !important;
        font-size: 10pt !important;
        color: #555 !important;
        display: flex !important;
        gap: 10pt !important;
    }

    .meta-item-modern svg {
        display: none !important;
    }

    .article-lead {
        font-size: 12pt !important;
        font-style: italic;
        border-left: 2pt solid #999;
        padding-left: 10pt;
        margin-bottom: 10pt !important;
    }

    .article-body-modern {
        page-break-inside: auto;
        break-inside: auto;
    }

    .typography-content {
        font-size: 12pt !important;
        line-height: 1.7 !important;
    }

    .typography-content h2 {
        font-size: 15pt !important;
        margin-top: 16pt !important;
        border-bottom: 0.5pt solid #ccc;
        padding-bottom: 3pt;
    }

    .typography-content h3 {
        font-size: 13pt !important;
        margin-top: 12pt !important;
    }

    .smart-tags {
        margin-top: 10pt !important;
    }

    .smart-tag {
        border: 0.5pt solid #999 !important;
        padding: 1pt 4pt !important;
        font-size: 9pt !important;
        margin-right: 4pt !important;
        display: inline-block !important;
    }

    /* =============================================
       ALBUM DETAIL PAGE
       ============================================= */

    .album-detail-page {
        padding: 0 !important;
    }

    .album-header__grid {
        display: flex !important;
        gap: 12pt !important;
        align-items: flex-start !important;
    }

    .album-artwork-large {
        width: 150pt !important;
        flex-shrink: 0 !important;
    }

    .album-artwork-large img {
        width: 150pt !important;
        height: auto !important;
        border: 0.5pt solid #ccc !important;
        border-radius: 0 !important;
    }

    .album-placeholder-large {
        width: 150pt !important;
        height: 150pt !important;
        border: 0.5pt solid #ccc !important;
    }

    .album-info {
        flex: 1 !important;
    }

    .album-info h1 {
        font-size: 18pt !important;
        margin-bottom: 4pt !important;
    }

    .album-meta-detail {
        font-size: 10pt !important;
        color: #555 !important;
        margin-bottom: 6pt !important;
    }

    .album-meta-sep {
        color: #999 !important;
    }

    .album-description {
        font-size: 11pt !important;
        line-height: 1.5 !important;
        margin-bottom: 8pt !important;
    }

    .album-tracks-section {
        margin-top: 10pt !important;
    }

    .album-tracks-header {
        border-bottom: 1pt solid #999 !important;
        padding-bottom: 3pt !important;
        margin-bottom: 6pt !important;
    }

    .album-tracks-title {
        font-size: 14pt !important;
    }

    .album-tracks-total-duration {
        font-size: 10pt !important;
        color: #555 !important;
    }

    .album-tracks-header__right {
        font-size: 10pt !important;
    }

    .track-list {
        border: 0.5pt solid #ddd !important;
    }

    .track-item {
        display: flex !important;
        align-items: baseline !important;
        padding: 3pt 6pt !important;
        border-bottom: 0.5pt solid #eee !important;
        font-size: 11pt !important;
        gap: 6pt !important;
    }

    .track-item:last-child {
        border-bottom: none !important;
    }

    .track-number {
        width: 18pt !important;
        text-align: right !important;
        padding-right: 4pt !important;
        color: #666 !important;
        font-size: 10pt !important;
        flex-shrink: 0 !important;
    }

    .track-title {
        flex: 1 !important;
    }

    .track-title span {
        font-size: 11pt !important;
    }

    .track-duration {
        display: inline !important;
        width: auto !important;
        min-width: 35pt !important;
        text-align: right !important;
        color: #666 !important;
        font-size: 10pt !important;
        flex-shrink: 0 !important;
    }

    /* Show inline lyrics for print */
    .track-lyrics {
        display: block !important;
        grid-column: 1 / -1 !important;
        padding: 4pt 0 4pt 22pt !important;
        margin: 2pt 0 !important;
        font-size: 10pt !important;
        font-style: italic;
        color: #333 !important;
        border-left: 1pt solid #ddd !important;
        border-radius: 0 !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .lyrics-content {
        white-space: pre-line !important;
        font-size: 10pt !important;
        line-height: 1.4 !important;
    }

    /* =============================================
       LYRICS BROWSER PAGE
       ============================================= */

    .lyrics-page {
        padding: 0 !important;
    }

    .lyrics-hero {
        padding: 0 !important;
        margin-bottom: 10pt !important;
        min-height: auto !important;
    }

    .lyrics-hero__title {
        font-size: 20pt !important;
        margin-bottom: 2pt !important;
    }

    .lyrics-hero__subtitle {
        font-size: 11pt !important;
        color: #555 !important;
        margin-bottom: 4pt !important;
    }

    .lyrics-hero__stats {
        font-size: 10pt !important;
        color: #555 !important;
        display: flex !important;
        gap: 6pt !important;
    }

    .lyrics-hero__header-row {
        display: block !important;
    }

    /* Each album starts on a new page (except the first) */
    .lyrics-album {
        page-break-before: always;
        margin-bottom: 0 !important;
        padding-top: 6pt !important;
    }

    .lyrics-album:first-child {
        page-break-before: avoid;
    }

    .lyrics-album__header {
        display: flex !important;
        align-items: center !important;
        gap: 8pt !important;
        margin-bottom: 8pt !important;
        padding-bottom: 4pt !important;
        border-bottom: 1pt solid #999 !important;
    }

    .lyrics-album__cover {
        width: 36pt !important;
        height: 36pt !important;
        border: 0.5pt solid #ccc !important;
        border-radius: 0 !important;
        object-fit: cover !important;
    }

    .lyrics-album__cover--placeholder {
        display: none !important;
    }

    .lyrics-album__title {
        font-size: 14pt !important;
        font-family: 'Arial', 'Helvetica Neue', sans-serif !important;
        margin: 0 !important;
    }

    .lyrics-album__meta {
        font-size: 9pt !important;
        color: #666 !important;
    }

    .lyrics-album__tracks {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Expand all lyrics tracks */
    .lyrics-track {
        margin-bottom: 10pt !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .lyrics-track__body,
    .lyrics-track__body[hidden] {
        display: block !important;
    }

    .lyrics-track__toggle {
        pointer-events: none !important;
        cursor: default !important;
        border: none !important;
        padding: 3pt 0 2pt !important;
        display: flex !important;
        align-items: baseline !important;
        gap: 4pt !important;
    }

    .lyrics-track__number {
        font-weight: bold;
        color: #555 !important;
        font-size: 10pt !important;
        min-width: 14pt !important;
    }

    .lyrics-track__title {
        font-weight: bold;
        font-size: 11pt !important;
        font-family: 'Arial', 'Helvetica Neue', sans-serif !important;
    }

    .lyrics-track__text {
        white-space: pre-wrap !important;
        font-family: 'Georgia', 'Times New Roman', serif !important;
        font-size: 10pt !important;
        line-height: 1.45 !important;
        color: #222 !important;
        margin-top: 2pt !important;
        padding-left: 14pt !important;
        border-left: 1pt solid #ccc !important;
    }

    .lyrics-highlight {
        background: transparent !important;
        color: #000 !important;
        font-weight: normal !important;
    }

    /* =============================================
       MEMBER DETAIL PAGE
       ============================================= */

    .member-detail {
        padding: 0 !important;
    }

    .member-hero {
        display: flex !important;
        gap: 12pt !important;
        margin-bottom: 14pt !important;
        align-items: flex-start !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .member-photo-wrapper {
        width: 120pt !important;
        flex-shrink: 0 !important;
    }

    .member-photo-wrapper img {
        width: 120pt !important;
        height: auto !important;
        border: 0.5pt solid #ccc !important;
        border-radius: 0 !important;
        filter: none !important;
        -webkit-filter: none !important;
    }

    .member-initials-avatar {
        width: 100pt !important;
        height: 100pt !important;
        border: 1pt solid #999 !important;
        border-radius: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .member-initials-avatar__text {
        font-size: 28pt !important;
        font-weight: bold !important;
        color: #333 !important;
    }

    .member-info {
        flex: 1 !important;
    }

    .member-info h1 {
        font-size: 18pt !important;
        margin-bottom: 4pt !important;
    }

    .member-role-display {
        font-size: 12pt !important;
        font-style: italic;
        color: #444 !important;
        margin-bottom: 4pt !important;
    }

    .member-meta {
        font-size: 10pt !important;
        color: #555 !important;
    }

    .member-meta-item {
        display: inline !important;
        margin-right: 8pt !important;
    }

    .deceased-marker {
        font-size: 10pt !important;
        color: #444 !important;
        margin-bottom: 4pt !important;
    }

    .member-founder-badge {
        font-size: 9pt !important;
        border: 0.5pt solid #999 !important;
        padding: 1pt 4pt !important;
        display: inline-block !important;
        margin-bottom: 4pt !important;
    }

    .instruments-list {
        font-size: 10pt !important;
        padding-left: 14pt !important;
    }

    /* Show all tab panels, hide tabs */
    .member-tabs {
        display: none !important;
    }

    .member-tab-panel {
        display: block !important;
        padding: 0 !important;
    }

    .member-biography {
        margin-bottom: 12pt !important;
    }

    .member-biography h2 {
        font-size: 14pt !important;
    }

    .bio-text {
        font-size: 11pt !important;
        line-height: 1.6 !important;
    }

    .bio-text p {
        margin-bottom: 6pt !important;
    }

    .member-section {
        margin-bottom: 10pt !important;
    }

    .member-section h2 {
        font-size: 14pt !important;
    }

    .member-section ul {
        padding-left: 14pt !important;
        font-size: 11pt !important;
    }

    /* Discography as compact list */
    .member-discography-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6pt !important;
    }

    .member-album-card {
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 80pt !important;
        text-decoration: none !important;
        font-size: 9pt !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .member-album-cover {
        width: 70pt !important;
        height: 70pt !important;
    }

    .member-album-cover img {
        width: 70pt !important;
        height: 70pt !important;
        object-fit: cover !important;
        border: 0.5pt solid #ccc !important;
    }

    .member-album-title {
        font-size: 8pt !important;
        text-align: center !important;
        margin: 2pt 0 0 !important;
        font-weight: 600 !important;
    }

    .member-album-year {
        font-size: 8pt !important;
        color: #666 !important;
        margin: 0 !important;
    }

    .member-discography-heading {
        font-size: 12pt !important;
        margin-top: 10pt !important;
        margin-bottom: 4pt !important;
    }

    .member-discography-grid--dimmed {
        opacity: 0.7 !important;
    }

    /* Gallery - small thumbnails */
    .member-gallery-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4pt !important;
    }

    .member-gallery-item {
        width: 60pt !important;
        height: 60pt !important;
        overflow: hidden !important;
    }

    .member-gallery-item img {
        width: 60pt !important;
        height: 60pt !important;
        object-fit: cover !important;
    }

    /* =============================================
       EVENTS PAGE
       ============================================= */

    .events-page {
        padding: 0 !important;
    }

    .events-timeline {
        border-left: 1pt solid #999 !important;
        padding-left: 12pt !important;
    }

    .event-card,
    .timeline-event {
        page-break-inside: avoid;
        break-inside: avoid;
        margin-bottom: 8pt !important;
        padding-bottom: 6pt !important;
        border-bottom: 0.5pt solid #ddd !important;
    }

    .event-date {
        font-size: 10pt !important;
        font-weight: bold !important;
        color: #444 !important;
    }

    .event-title {
        font-size: 12pt !important;
        font-weight: 600 !important;
    }

    .event-venue,
    .event-location {
        font-size: 10pt !important;
        color: #555 !important;
    }

    .decade-marker {
        font-size: 14pt !important;
        font-weight: bold !important;
        margin: 10pt 0 6pt !important;
        border-bottom: 1pt solid #999 !important;
        padding-bottom: 2pt !important;
    }

    /* =============================================
       GALLERY PAGE
       ============================================= */

    .gallery-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4pt !important;
    }

    .gallery-item,
    .gallery-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .gallery-item img,
    .gallery-card img {
        max-width: 120pt !important;
        height: auto !important;
    }

    /* =============================================
       GUESTBOOK PAGE
       ============================================= */

    .guestbook-entry {
        page-break-inside: avoid;
        break-inside: avoid;
        margin-bottom: 8pt !important;
        padding-bottom: 6pt !important;
        border-bottom: 0.5pt solid #ddd !important;
    }

    .guestbook-entry-author {
        font-weight: bold;
        font-size: 11pt !important;
    }

    .guestbook-entry-date {
        font-size: 9pt !important;
        color: #666 !important;
    }

    .guestbook-entry-text {
        font-size: 11pt !important;
    }

    /* =============================================
       SOURCE URL (shown only in print)
       ============================================= */

    .print-source-url {
        display: block !important;
        margin-top: 16pt !important;
        padding-top: 8pt !important;
        border-top: 0.5pt solid #ccc !important;
        font-size: 9pt !important;
        color: #555 !important;
        font-family: 'Arial', sans-serif !important;
    }

    /* =============================================
       MEMBERS LISTING PAGE
       ============================================= */

    .member-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .member-card img {
        filter: none !important;
        -webkit-filter: none !important;
    }

}

/* ============================================
   2026 Modern Feature Enhancements
   ============================================ */

/* Music player glassmorphism effect */
.music-player,
.player-bar,
.mini-player {
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  background: oklch(0.15 0.02 260 / 0.75);
  border: 1px solid oklch(1 0 0 / 0.08);
}

/* Light theme override for player glass */
[data-theme="light"] .music-player,
[data-theme="light"] .player-bar,
[data-theme="light"] .mini-player {
  background: oklch(0.98 0.005 260 / 0.8);
  border-color: oklch(0 0 0 / 0.08);
}

/* Gallery masonry-like layout with CSS columns */
.gallery-masonry {
  columns: 3 250px;
  column-gap: 1rem;
}

.gallery-masonry > * {
  break-inside: avoid;
  margin-bottom: 1rem;
}

/* Animated gradient for hero sections */
@property --hero-angle {
  syntax: "<angle>";
  initial-value: 135deg;
  inherits: false;
}

.hero-gradient-animated {
  --hero-angle: 135deg;
  background: linear-gradient(var(--hero-angle), oklch(0.15 0.03 260), oklch(0.12 0.04 300), oklch(0.18 0.03 240));
  animation: gradient-rotate 12s linear infinite;
}

@keyframes gradient-rotate {
  to { --hero-angle: 495deg; }
}

/* Video card hover effect - modern */
.video-card:hover .video-thumbnail img {
  scale: 1.05;
  transition: scale 500ms cubic-bezier(0.2, 0, 0, 1);
}

/* Timeline modern styling */
.timeline-container .timeline-item {
  position: relative;
}

.timeline-container .timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    oklch(0.78 0.15 85) 0%,
    oklch(0.78 0.15 85 / 0) 100%
  );
}

.timeline-container .timeline-item:hover {
  background: oklch(0.78 0.15 85 / 0.05);
}

/* Modern image loading placeholder */
img[loading="lazy"] {
  background: linear-gradient(
    110deg,
    oklch(0.2 0.01 260) 8%,
    oklch(0.25 0.01 260) 18%,
    oklch(0.2 0.01 260) 33%
  );
  background-size: 200% 100%;
  animation: shimmer-lazy 1.5s linear infinite;
}

@keyframes shimmer-lazy {
  to { background-position: -200% 0; }
}

[data-theme="light"] img[loading="lazy"] {
  background: linear-gradient(
    110deg,
    oklch(0.92 0.005 260) 8%,
    oklch(0.96 0.005 260) 18%,
    oklch(0.92 0.005 260) 33%
  );
  background-size: 200% 100%;
}

/* Popover-style tooltips (native CSS) */
[popover] {
  background: oklch(0.2 0.02 260 / 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid oklch(1 0 0 / 0.1);
  border-radius: var(--radius-lg, 12px);
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  max-width: 320px;
  box-shadow: 0 20px 60px oklch(0 0 0 / 0.4);
}

[data-theme="light"] [popover] {
  background: oklch(1 0 0 / 0.95);
  border-color: oklch(0 0 0 / 0.1);
  box-shadow: 0 20px 60px oklch(0 0 0 / 0.1);
}

/* Starting style for popover animation */
@starting-style {
  [popover]:popover-open {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
}

[popover]:popover-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 200ms ease, transform 200ms cubic-bezier(0.2, 0, 0, 1), display 200ms allow-discrete, overlay 200ms allow-discrete;
}

/* ============================================================
   LRC SYNCHRONIZED LYRICS - Karaoke Display
   Scoped to music player panel only (.lyrics-text inside .lyrics-panel)
   to avoid affecting static track lyrics on album pages.
   ============================================================ */

.lyrics-text .lyrics-line {
    padding: 8px 0;
    transition: all 0.3s ease;
    opacity: 0.5;
    cursor: pointer;
    line-height: 1.6;
}

.lyrics-text .lyrics-line-active {
    opacity: 1;
    color: var(--color-accent, #e74c3c);
    font-size: 1.1em;
    font-weight: 600;
}

.lyrics-text .lyrics-line-past {
    opacity: 0.35;
}

.lyrics-text .lyrics-line:hover {
    opacity: 0.8;
}

/* =============================================
   GUESTBOOK LIVE UPDATES
   ============================================= */

.guestbook-entry-live {
    animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.guestbook-live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
    margin-right: 6px;
    vertical-align: middle;
    transition: background 0.3s ease;
}

.guestbook-live-indicator-connected {
    background: #2ecc71;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
}

.guestbook-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-surface, #1a1a2e);
    color: var(--color-text, #e0e0e0);
    border-left: 3px solid var(--color-accent, #e74c3c);
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    z-index: var(--z-overlay, 800);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 360px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.guestbook-toast-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   OFFLINE ALBUM DOWNLOAD BUTTON
   ============================================================ */

.btn-offline-album {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--color-border, rgba(255,255,255,0.15));
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-secondary, #aaa);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-offline-album:hover {
    background: rgba(255,255,255,0.05);
    color: var(--color-text, #fff);
    border-color: var(--color-accent, #e74c3c);
}

.btn-offline-album:disabled {
    cursor: wait;
    opacity: 0.8;
}

.btn-offline-album.btn-offline-cached {
    border-color: #27ae60;
    color: #27ae60;
}

.btn-offline-album.btn-offline-cached:hover {
    background: rgba(39, 174, 96, 0.1);
    color: #e74c3c;
    border-color: #e74c3c;
}

.offline-icon {
    font-size: 1.1em;
    line-height: 1;
}

.offline-spinner {
    display: inline-block;
    animation: offline-spin 1s linear infinite;
}

@keyframes offline-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.offline-progress {
    font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
    opacity: 0.8;
}

.offline-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--color-accent, #e74c3c);
    transition: width 0.3s ease;
}

[data-component="offline-album"] {
    display: inline-block;
}

/* ============================================================
   KEYBOARD SHORTCUTS HELP DIALOG
   Native <dialog> styled as a dark overlay modal
   Triggered by pressing "?" globally
   ============================================================ */

/* Dialog backdrop */
.kbd-help-dialog::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Dialog container */
.kbd-help-dialog {
    position: fixed;
    max-width: 640px;
    width: calc(100% - 2rem);
    max-height: 85vh;
    margin: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg, 12px);
    background: var(--bg-secondary, #0f0f0f);
    color: var(--text-primary, #ffffff);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(220, 38, 38, 0.08);
    overflow: hidden;
    animation: kbd-help-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kbd-help-dialog[open] {
    display: flex;
    flex-direction: column;
}

@keyframes kbd-help-enter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header */
.kbd-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(220, 38, 38, 0.04);
    flex-shrink: 0;
}

.kbd-help-title {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary, #ffffff);
    margin: 0;
    line-height: 1;
}

.kbd-help-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm, 4px);
    background: transparent;
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    transition: color var(--transition-fast, 150ms), background var(--transition-fast, 150ms);
}

.kbd-help-close:hover {
    color: var(--text-primary, #ffffff);
    background: rgba(255, 255, 255, 0.08);
}

.kbd-help-close:focus-visible {
    outline: 2px solid var(--accent-red, #dc2626);
    outline-offset: 2px;
}

/* Scrollable body */
.kbd-help-body {
    overflow-y: auto;
    padding: 1rem 1.5rem 1.5rem;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.kbd-help-body::-webkit-scrollbar {
    width: 6px;
}

.kbd-help-body::-webkit-scrollbar-track {
    background: transparent;
}

.kbd-help-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* Shortcut groups */
.kbd-help-group {
    margin-bottom: 1.5rem;
}

.kbd-help-group:last-child {
    margin-bottom: 0;
}

.kbd-help-group-title {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-red, #dc2626);
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(220, 38, 38, 0.15);
}

/* Shortcut grid rows */
.kbd-help-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kbd-help-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm, 4px);
    transition: background var(--transition-fast, 150ms);
}

.kbd-help-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Description text */
.kbd-help-desc {
    font-size: 0.9rem;
    color: var(--text-secondary, #d1d5db);
    flex: 1;
    line-height: 1.4;
}

/* Key combination container */
.kbd-help-keys {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* Keyboard key styling */
.kbd-help-keys kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.5rem;
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text-primary, #ffffff);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom-width: 2px;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    text-transform: capitalize;
    user-select: none;
}

/* Plus sign between keys */
.kbd-help-plus {
    font-size: 0.7rem;
    color: var(--text-muted, #9ca3af);
    margin: 0 0.1rem;
    user-select: none;
}

/* Dash between keys (e.g. 1 -- 9) */
.kbd-help-dash {
    font-size: 0.7rem;
    color: var(--text-muted, #9ca3af);
    margin: 0 0.1rem;
    user-select: none;
}

/* Footer hint */
.kbd-help-footer {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    flex-shrink: 0;
}

.kbd-help-footer p {
    font-size: 0.78rem;
    color: var(--text-muted, #9ca3af);
    margin: 0;
    line-height: 1.4;
}

/* Body scroll lock when dialog is open */
body.kbd-help-open {
    overflow: hidden;
}

/* Light theme overrides */
[data-theme="light"] .kbd-help-dialog {
    background: var(--bg-elevated, #ffffff);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .kbd-help-keys kbd {
    background: linear-gradient(180deg, #f9fafb 0%, #e5e7eb 100%);
    border-color: rgba(0, 0, 0, 0.15);
    border-bottom-color: rgba(0, 0, 0, 0.2);
    color: var(--text-primary, #111827);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .kbd-help-row:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .kbd-help-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

/* Responsive: smaller screens */
@media (max-width: 480px) {
    .kbd-help-dialog {
        max-height: 90vh;
        width: calc(100% - 1rem);
        border-radius: var(--radius-md, 8px);
    }

    .kbd-help-header {
        padding: 1rem;
    }

    .kbd-help-body {
        padding: 0.75rem 1rem 1rem;
    }

    .kbd-help-row {
        padding: 0.25rem 0;
    }

    .kbd-help-desc {
        font-size: 0.82rem;
    }

    .kbd-help-keys kbd {
        min-width: 24px;
        height: 24px;
        padding: 0 0.35rem;
        font-size: 0.68rem;
    }

    .kbd-help-footer {
        padding: 0.6rem 1rem;
    }
}

/* Footer keyboard hint */
.footer-keyboard-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted, #9ca3af);
    opacity: 0.6;
    cursor: pointer;
    transition: opacity var(--transition-fast, 150ms);
    border: none;
    background: none;
    padding: 0.25rem 0;
    font-family: inherit;
}

.footer-keyboard-hint:hover {
    opacity: 1;
}

.footer-keyboard-hint kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.3rem;
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text-muted, #9ca3af);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-width: 2px;
    border-radius: 4px;
}

[data-theme="light"] .footer-keyboard-hint kbd {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-muted, #6b7280);
}

/* ============================================================
   SHARE TRACK POPUP (Music Player)
   Popup with social sharing options: Copy Link, VK, Telegram, X
   ============================================================ */

.smp-share-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 60px;
    z-index: 100002;
    min-width: 220px;
    max-width: 280px;
    background: rgba(18, 18, 22, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.smp-share-popup--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header with track info */
.smp-share-popup__header {
    padding: 12px 14px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.smp-share-popup__track-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.smp-share-popup__album-title {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Buttons container */
.smp-share-popup__buttons {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
}

/* Individual share button */
.smp-share-popup__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 14px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-align: left;
    line-height: 1;
}

.smp-share-popup__btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.smp-share-popup__btn:active {
    background: rgba(255, 255, 255, 0.12);
}

.smp-share-popup__btn:focus-visible {
    outline: 2px solid var(--color-accent, #e74c3c);
    outline-offset: -2px;
    border-radius: 4px;
}

/* Icon container */
.smp-share-popup__btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.smp-share-popup__btn-icon svg {
    width: 16px;
    height: 16px;
}

/* Brand colors for icons */
.smp-share-popup__btn--copy .smp-share-popup__btn-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.smp-share-popup__btn--vk .smp-share-popup__btn-icon {
    background: rgba(39, 135, 245, 0.15);
    color: #2787F5;
}

.smp-share-popup__btn--telegram .smp-share-popup__btn-icon {
    background: rgba(36, 161, 222, 0.15);
    color: #24A1DE;
}

.smp-share-popup__btn--twitter .smp-share-popup__btn-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Hover: intensify icon background */
.smp-share-popup__btn--vk:hover .smp-share-popup__btn-icon {
    background: rgba(39, 135, 245, 0.25);
}

.smp-share-popup__btn--telegram:hover .smp-share-popup__btn-icon {
    background: rgba(36, 161, 222, 0.25);
}

.smp-share-popup__btn--twitter:hover .smp-share-popup__btn-icon {
    background: rgba(255, 255, 255, 0.15);
}

.smp-share-popup__btn--copy:hover .smp-share-popup__btn-icon {
    background: rgba(255, 255, 255, 0.15);
}

/* Copied state */
.smp-share-popup__btn--copied .smp-share-popup__btn-icon {
    background: rgba(46, 204, 113, 0.2) !important;
    color: #2ecc71 !important;
}

.smp-share-popup__btn--copied .smp-share-popup__btn-label {
    color: #2ecc71;
}

/* Active share button highlight */
#smp-share-btn.smp-btn--active {
    color: var(--color-accent, #e74c3c);
    background: rgba(231, 76, 60, 0.15);
}

/* Light theme adjustments */
[data-theme="light"] .smp-share-popup {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .smp-share-popup__header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .smp-share-popup__track-title {
    color: #1a1a1a;
}

[data-theme="light"] .smp-share-popup__album-title {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .smp-share-popup__btn {
    color: rgba(0, 0, 0, 0.75);
}

[data-theme="light"] .smp-share-popup__btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

[data-theme="light"] .smp-share-popup__btn--copy .smp-share-popup__btn-icon {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}

[data-theme="light"] .smp-share-popup__btn--twitter .smp-share-popup__btn-icon {
    background: rgba(0, 0, 0, 0.06);
    color: #1a1a1a;
}

/* Mobile responsive: popup goes full-width at bottom */
@media (max-width: 600px) {
    .smp-share-popup {
        position: fixed;
        bottom: 80px;
        left: 8px;
        right: 8px;
        max-width: none;
        min-width: 0;
    }
}
/* ============================================================
   ERA FILTERS (consolidated from era-filters.css)
   ============================================================ */

/* Era-appropriate photo filters for gallery and album images */
/* Subtle 10-20% effects to hint at era without washing out photos */

/* 1978-1981: Subtle sepia hint (Soviet underground era) */
.era-filter-1978 {
    filter: sepia(0.15) contrast(0.95) saturate(0.9) brightness(0.95);
}

/* 1982-1983: Very light sepia (early recordings) */
.era-filter-1982 {
    filter: sepia(0.1) contrast(0.97) saturate(0.92);
}

/* 1984-1985: Barely-there warmth (peak underground) */
.era-filter-1984 {
    filter: sepia(0.05) contrast(0.98) saturate(0.95);
}

/* 1987: Minimal desaturation (festival era) */
.era-filter-1987 {
    filter: saturate(0.95) contrast(0.98);
}

/* 1990-1991: Very slight fade (perestroika) */
.era-filter-1990 {
    filter: saturate(0.95) brightness(0.98) contrast(0.97);
}

/* 1995-2004: Subtle warmth only (later period) */
.era-filter-1995 {
    filter: sepia(0.05) saturate(0.97);
}

/* 2011: Clean, no filter (modern era) */
.era-filter-2011 {
    filter: none;
}

/* Smooth transition for all era-filtered elements */
[class*="era-filter-"] {
    transition: filter 0.5s ease;
}

/* Hover removes filter to show original */
[class*="era-filter-"]:hover,
[class*="era-filter-"]:focus-within {
    filter: none;
}

/* Grain overlay pseudo-element for early eras (pre-1985) */
.era-grain {
    position: relative;
}

.era-grain::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    mix-blend-mode: overlay;
    border-radius: inherit;
    transition: opacity 0.5s ease;
}

.era-grain:hover::after {
    opacity: 0;
}

/* ============================================================
   TYPEWRITER ANIMATION (consolidated from typewriter.css)
   ============================================================ */

/* Typewriter reveal animation */
.typewriter {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid oklch(0.82 0.14 85); /* warm amber cursor */
  animation:
    typewriter-reveal 3s steps(40, end) forwards,
    typewriter-cursor 0.75s step-end infinite;
  width: 0;
}

.typewriter.typewriter-done {
  width: 100%;
  border-right-color: transparent;
  animation: none;
}

@keyframes typewriter-reveal {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes typewriter-cursor {
  from, to { border-color: transparent; }
  50% { border-color: oklch(0.82 0.14 85); }
}

/* Multi-line text reveal (paragraph by paragraph) */
.text-reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.text-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.text-reveal-group > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.text-reveal-group.revealed > *:nth-child(1) { transition-delay: 0s; }
.text-reveal-group.revealed > *:nth-child(2) { transition-delay: 0.15s; }
.text-reveal-group.revealed > *:nth-child(3) { transition-delay: 0.3s; }
.text-reveal-group.revealed > *:nth-child(4) { transition-delay: 0.45s; }
.text-reveal-group.revealed > *:nth-child(5) { transition-delay: 0.6s; }
.text-reveal-group.revealed > * { opacity: 1; transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .typewriter { animation: none; width: 100%; border-right: none; }
  .text-reveal, .text-reveal-group > * {
    opacity: 1; transform: none; transition: none;
  }
}

/* ============================================================
   ANIMATIONS (consolidated from animations.css)
   ============================================================ */

/**
 * Modern Animations & Micro-interactions
 * Part of OK Rock Website Redesign
 */

/* ========================================
   KEYFRAMES
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-subtle {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes spin-slow {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Entry Animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    /* Ensures element is hidden before animation starts */
}

/* Delay Utilities */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-500 {
    animation-delay: 500ms;
}

.delay-700 {
    animation-delay: 700ms;
}

.delay-1000 {
    animation-delay: 1000ms;
}

/* Interactive Hover Effects */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow-hover);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Loading Shimmer */
.skeleton-shimmer {
    background: linear-gradient(90deg,
            var(--bg-secondary) 25%,
            var(--bg-tertiary) 37%,
            var(--bg-secondary) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}

/* Scroll Trigger Class - visible by default, animated by CSS scroll-driven animations in base.css */
/* The .visible class is a JS fallback for browsers without animation-timeline support */
.scroll-reveal.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
/* ============================================================
   PAGE TRANSITIONS (consolidated from transitions.css)
   ============================================================ */

/* ============================================================
   Page Transition Styles
   Swup.js transitions + CSS View Transitions API
   ============================================================ */

/* === Swup.js Container Transitions === */

.transition-fade {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

html.is-changing .transition-fade {
    opacity: 0;
    transform: translateY(10px);
}

html.is-animating .transition-fade {
    /* pointer-events: none; */
}

html.is-changing {
    scroll-behavior: auto !important;
}

/* Swup progress bar */
.swup-progress-bar {
    height: 3px;
    background-color: var(--accent-red, #ff4757);
    transition: width 0.3s ease;
}

/* === CSS View Transitions API (same-origin navigations) === */

@view-transition {
    navigation: auto;
}

/* Root page transition: subtle fade + blur */
::view-transition-old(root) {
    animation: 200ms cubic-bezier(0.4, 0, 1, 1) both vt-fade-out;
}

::view-transition-new(root) {
    animation: 300ms cubic-bezier(0, 0, 0.2, 1) 50ms both vt-fade-in;
}

@keyframes vt-fade-out {
    to {
        opacity: 0;
        filter: blur(2px);
    }
}

@keyframes vt-fade-in {
    from {
        opacity: 0;
        filter: blur(2px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* === Named View Transitions for specific elements === */

/* Page titles slide between pages */
.hero-title,
.page-hero h1,
.page-header h1,
.about-hero h1,
.albums-page-header h1,
.members-page-header h1 {
    view-transition-name: page-title;
}

::view-transition-old(page-title) {
    animation: 180ms ease-out both vt-slide-out-up;
}

::view-transition-new(page-title) {
    animation: 280ms ease-out 80ms both vt-slide-in-up;
}

@keyframes vt-slide-out-up {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes vt-slide-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Album cover images morph between list and detail views.
   Each album cover gets a unique view-transition-name via inline style
   (view-transition-name: album-<slug>) in both albums.ejs and album-detail.js.
   The browser automatically creates a cross-fade + position/size morph for
   matching named elements across pages -- no custom keyframes needed.
   The view-transition-class property lets us style all album transitions
   with a single rule in supporting browsers. */

.album-cover,
.album-artwork-large {
    view-transition-class: album-cover;
}

::view-transition-old(*.album-cover) {
    animation: 250ms ease-out both vt-scale-out;
}

::view-transition-new(*.album-cover) {
    animation: 350ms cubic-bezier(0.16, 1, 0.3, 1) both vt-scale-in;
}

@keyframes vt-scale-out {
    to {
        opacity: 0;
        transform: scale(0.94);
    }
}

@keyframes vt-scale-in {
    from {
        opacity: 0;
        transform: scale(1.06);
    }
}

/* Navigation bar persists across transitions */
.site-header {
    view-transition-name: site-header;
}

::view-transition-old(site-header),
::view-transition-new(site-header) {
    animation: none;
    mix-blend-mode: normal;
}

/* Music player persists across transitions */
.music-player-container,
.simple-music-player {
    view-transition-name: music-player;
}

::view-transition-old(music-player),
::view-transition-new(music-player) {
    animation: none;
    mix-blend-mode: normal;
}

/* === Reduced Motion: respect user preference === */

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root),
    ::view-transition-old(page-title),
    ::view-transition-new(page-title),
    ::view-transition-old(*.album-cover),
    ::view-transition-new(*.album-cover) {
        animation-duration: 0.01ms !important;
    }

    .transition-fade {
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   CONSOLIDATED FROM INDIVIDUAL FILES
   Phase 64 - CSS Consolidation
   ============================================ */

/* --- animations.css --- */
/**
 * Modern Animations & Micro-interactions
 * Part of OK Rock Website Redesign
 */

/* ========================================
   KEYFRAMES
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-subtle {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes spin-slow {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Entry Animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    /* Ensures element is hidden before animation starts */
}

/* Delay Utilities */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-500 {
    animation-delay: 500ms;
}

.delay-700 {
    animation-delay: 700ms;
}

.delay-1000 {
    animation-delay: 1000ms;
}

/* Interactive Hover Effects */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow-hover);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Loading Shimmer */
.skeleton-shimmer {
    background: linear-gradient(90deg,
            var(--bg-secondary) 25%,
            var(--bg-tertiary) 37%,
            var(--bg-secondary) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}

/* Scroll Trigger Class - visible by default, animated by CSS scroll-driven animations in base.css */
/* The .visible class is a JS fallback for browsers without animation-timeline support */
.scroll-reveal.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* --- transitions.css --- */
/* ============================================================
   Page Transition Styles
   Swup.js transitions + CSS View Transitions API
   ============================================================ */

/* === Swup.js Container Transitions === */

.transition-fade {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

html.is-changing .transition-fade {
    opacity: 0;
    transform: translateY(10px);
}

html.is-animating .transition-fade {
    /* pointer-events: none; */
}

html.is-changing {
    scroll-behavior: auto !important;
}

/* Swup progress bar */
.swup-progress-bar {
    height: 3px;
    background-color: var(--accent-red, #ff4757);
    transition: width 0.3s ease;
}

/* === CSS View Transitions API (same-origin navigations) === */

@view-transition {
    navigation: auto;
}

/* Root page transition: subtle fade + blur */
::view-transition-old(root) {
    animation: 200ms cubic-bezier(0.4, 0, 1, 1) both vt-fade-out;
}

::view-transition-new(root) {
    animation: 300ms cubic-bezier(0, 0, 0.2, 1) 50ms both vt-fade-in;
}

@keyframes vt-fade-out {
    to {
        opacity: 0;
        filter: blur(2px);
    }
}

@keyframes vt-fade-in {
    from {
        opacity: 0;
        filter: blur(2px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* === Named View Transitions for specific elements === */

/* Page titles slide between pages */
.hero-title,
.page-hero h1,
.page-header h1,
.about-hero h1,
.albums-page-header h1,
.members-page-header h1 {
    view-transition-name: page-title;
}

::view-transition-old(page-title) {
    animation: 180ms ease-out both vt-slide-out-up;
}

::view-transition-new(page-title) {
    animation: 280ms ease-out 80ms both vt-slide-in-up;
}

@keyframes vt-slide-out-up {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes vt-slide-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Album cover images morph between list and detail views.
   Each album cover gets a unique view-transition-name via inline style
   (view-transition-name: album-<slug>) in both albums.ejs and album-detail.js.
   The browser automatically creates a cross-fade + position/size morph for
   matching named elements across pages -- no custom keyframes needed.
   The view-transition-class property lets us style all album transitions
   with a single rule in supporting browsers. */

.album-cover,
.album-artwork-large {
    view-transition-class: album-cover;
}

::view-transition-old(*.album-cover) {
    animation: 250ms ease-out both vt-scale-out;
}

::view-transition-new(*.album-cover) {
    animation: 350ms cubic-bezier(0.16, 1, 0.3, 1) both vt-scale-in;
}

@keyframes vt-scale-out {
    to {
        opacity: 0;
        transform: scale(0.94);
    }
}

@keyframes vt-scale-in {
    from {
        opacity: 0;
        transform: scale(1.06);
    }
}

/* Navigation bar persists across transitions */
.site-header {
    view-transition-name: site-header;
}

::view-transition-old(site-header),
::view-transition-new(site-header) {
    animation: none;
    mix-blend-mode: normal;
}

/* Music player persists across transitions */
.music-player-container,
.simple-music-player {
    view-transition-name: music-player;
}

::view-transition-old(music-player),
::view-transition-new(music-player) {
    animation: none;
    mix-blend-mode: normal;
}

/* === Reduced Motion: respect user preference === */

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root),
    ::view-transition-old(page-title),
    ::view-transition-new(page-title),
    ::view-transition-old(*.album-cover),
    ::view-transition-new(*.album-cover) {
        animation-duration: 0.01ms !important;
    }

    .transition-fade {
        transition-duration: 0.01ms !important;
    }
}



/* === Phase 73: Community Pages Enhancement === */

/* ============================================================
   COMMUNITY NAVIGATION TABS
   ============================================================ */

.community-nav {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    margin-bottom: clamp(2rem, 4vw, 3rem);
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.community-nav::-webkit-scrollbar {
    display: none;
}

.community-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    border-radius: 9px;
    font-size: 0.875rem;
    font-weight: 500;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    opacity: 0.65;
    border: 1px solid transparent;
}

.community-nav__link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.04);
}

.community-nav__link.active {
    opacity: 1;
    background: var(--accent-red, #dc2626);
    color: #fff;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
    border-color: rgba(255, 255, 255, 0.08);
}

.community-nav__link .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

[data-theme="light"] .community-nav {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .community-nav__link:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* ============================================================
   GUESTBOOK ENHANCEMENTS
   ============================================================ */

.guestbook-entry--new {
    animation: gb-newEntry 0.6s ease both;
    border-color: rgba(220, 38, 38, 0.25);
}

@keyframes gb-newEntry {
    0% {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3);
    }
    50% {
        box-shadow: 0 0 20px 0 rgba(220, 38, 38, 0.15);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.submit-btn--success {
    background: #16a34a !important;
    animation: gb-successPulse 0.4s ease;
}

@keyframes gb-successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Improved empty state */
.community-empty-state {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
}

.community-empty-state .empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.1);
    color: var(--accent-red, #dc2626);
    opacity: 0.5;
}

.community-empty-state .empty-icon svg {
    width: 28px;
    height: 28px;
}

.community-empty-state h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
}

.community-empty-state p {
    font-size: 0.9rem;
    opacity: 0.55;
    margin: 0 0 1.25rem;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.empty-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 1px solid var(--accent-red, #dc2626);
    color: var(--accent-red, #dc2626);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    text-decoration: none;
}

.empty-cta-btn:hover {
    background: var(--accent-red, #dc2626);
    color: #fff;
    transform: translateY(-1px);
}

.empty-cta-btn .icon {
    width: 16px;
    height: 16px;
}

/* Form field validation */
.form-group--error input,
.form-group--error textarea {
    border-color: rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.06);
}

.form-group .field-error {
    color: #f87171;
    font-size: 0.78rem;
    margin-top: 0.3rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.2s, max-height 0.2s;
}

.form-group--error .field-error {
    opacity: 1;
    max-height: 2rem;
}

/* ============================================================
   FAN PHOTOS ENHANCEMENTS
   ============================================================ */

.file-drop-zone-enhanced {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: clamp(1.5rem, 4vw, 2.5rem) 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, transform 0.15s;
    position: relative;
}

.file-drop-zone-enhanced:hover {
    border-color: rgba(220, 38, 38, 0.4);
    background: rgba(220, 38, 38, 0.02);
}

.file-drop-zone-enhanced.dragover {
    border-color: var(--accent-red, #dc2626);
    background: rgba(220, 38, 38, 0.05);
    transform: scale(1.01);
}

.file-drop-zone-enhanced .dropzone-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    opacity: 0.3;
    color: var(--accent-red, #dc2626);
    transition: opacity 0.2s, transform 0.2s;
}

.file-drop-zone-enhanced:hover .dropzone-icon,
.file-drop-zone-enhanced.dragover .dropzone-icon {
    opacity: 0.6;
    transform: translateY(-2px);
}

.file-drop-zone-enhanced .dropzone-text {
    font-size: 0.9rem;
    opacity: 0.5;
    margin: 0;
}

.file-drop-zone-enhanced .dropzone-text strong {
    color: var(--accent-red, #dc2626);
    opacity: 1;
}

.file-drop-zone-enhanced .dropzone-hint {
    font-size: 0.78rem;
    opacity: 0.4;
    margin-top: 0.5rem;
}

.file-drop-zone-enhanced .file-preview-area {
    margin-top: 1rem;
}

.file-drop-zone-enhanced .file-preview-area img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(220, 38, 38, 0.2);
}

[data-theme="light"] .file-drop-zone-enhanced {
    border-color: rgba(0, 0, 0, 0.12);
}

.file-drop-zone-enhanced .dropzone-or {
    display: block;
    font-size: 0.78rem;
    opacity: 0.35;
    margin: 0.5rem 0;
    text-transform: lowercase;
}

.file-drop-zone-enhanced .dropzone-browse {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    background: transparent;
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: var(--accent-red, #dc2626);
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.file-drop-zone-enhanced .dropzone-browse:hover {
    background: var(--accent-red, #dc2626);
    color: #fff;
}

[data-theme="light"] .file-drop-zone-enhanced:hover {
    border-color: rgba(220, 38, 38, 0.4);
    background: rgba(220, 38, 38, 0.02);
}

/* Photo grid animation */
.fan-photos-grid .photo-card {
    animation: fp-cardIn 0.4s ease both;
}

.fan-photos-grid .photo-card:nth-child(1) { animation-delay: 0s; }
.fan-photos-grid .photo-card:nth-child(2) { animation-delay: 0.04s; }
.fan-photos-grid .photo-card:nth-child(3) { animation-delay: 0.08s; }
.fan-photos-grid .photo-card:nth-child(4) { animation-delay: 0.12s; }
.fan-photos-grid .photo-card:nth-child(5) { animation-delay: 0.16s; }
.fan-photos-grid .photo-card:nth-child(6) { animation-delay: 0.2s; }

@keyframes fp-cardIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Photo card overlay on hover */
.fan-photos-grid .photo-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
    border-radius: inherit;
}

.fan-photos-grid .photo-card:hover::after {
    opacity: 1;
}

.fan-photos-grid .photo-card-info {
    position: relative;
    z-index: 1;
}

/* ============================================================
   FAN STORIES ENHANCEMENTS
   ============================================================ */

.story-card-enhanced {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    transition: border-color 0.2s, box-shadow 0.2s;
    animation: fs-cardIn 0.4s ease both;
}

.story-card-enhanced:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

@keyframes fs-cardIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.story-card-enhanced .story-header-enhanced {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.story-card-enhanced .story-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red, #dc2626), #991b1b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}

.story-card-enhanced .story-meta {
    flex: 1;
    min-width: 0;
}

.story-card-enhanced .story-author-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-card-enhanced .story-date-text {
    font-size: 0.8rem;
    opacity: 0.45;
}

.story-card-enhanced .story-body {
    line-height: 1.75;
    font-size: 0.95rem;
    opacity: 0.82;
    white-space: pre-line;
    word-break: break-word;
    max-width: 65ch;
}

.story-card-enhanced .story-body.collapsed {
    max-height: 7.5em;
    overflow: hidden;
    position: relative;
}

.story-card-enhanced .story-body.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3em;
    background: linear-gradient(transparent, rgba(18, 18, 18, 0.95));
    pointer-events: none;
}

[data-theme="light"] .story-card-enhanced .story-body.collapsed::after {
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.95));
}

.story-card-enhanced .story-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0;
    background: none;
    border: none;
    color: var(--accent-red, #dc2626);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.story-card-enhanced .story-read-more:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.story-card-enhanced .story-concert-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.25rem 0.65rem;
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.12);
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--accent-red, #dc2626);
}

[data-theme="light"] .story-card-enhanced {
    background: rgba(0, 0, 0, 0.015);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .story-card-enhanced:hover {
    border-color: rgba(0, 0, 0, 0.12);
}

/* ============================================================
   COMMUNITY RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
    .community-nav {
        justify-content: stretch;
    }
    .community-nav__link {
        flex: 1;
        justify-content: center;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    .community-nav__link .icon {
        width: 14px;
        height: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guestbook-entry--new,
    .fan-photos-grid .photo-card,
    .story-card-enhanced {
        animation: none !important;
    }
    .story-card-enhanced .story-body.collapsed::after {
        transition: none;
    }
}

/* ============================================================
   LYRICS BROWSER ENHANCEMENTS (2026)
   Modern UX: typography, copy, quickjump, coverage, animations
   ============================================================ */

/* --- Hero Actions Row --- */
.lyrics-hero__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lyrics-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-secondary, rgba(255,255,255,0.1));
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    color: var(--text-muted, #9ca3af);
    font-size: 0.8rem;
    font-family: var(--font-primary, sans-serif);
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.lyrics-action-btn:hover {
    color: var(--text-primary, #fff);
    background: rgba(255,255,255,0.1);
    border-color: var(--border-primary, rgba(220,38,38,0.2));
}

.lyrics-action-btn:focus-visible {
    outline: 2px solid var(--accent-red, #dc2626);
    outline-offset: 2px;
}

.lyrics-action-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

[data-theme="light"] .lyrics-action-btn {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.12);
    color: var(--text-muted, #6b7280);
}

[data-theme="light"] .lyrics-action-btn:hover {
    background: rgba(0,0,0,0.06);
    color: var(--text-primary, #111827);
}

/* --- Coverage Progress Bar --- */
.lyrics-hero__coverage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.lyrics-coverage-bar {
    width: 180px;
    height: 6px;
    background: var(--bg-tertiary, #18181b);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.lyrics-coverage-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent, #dc2626) 0%, #f87171 100%);
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lyrics-coverage-bar__label {
    color: var(--text-muted, #9ca3af);
    font-size: 0.8rem;
    white-space: nowrap;
}

[data-theme="light"] .lyrics-coverage-bar {
    background: rgba(0, 0, 0, 0.08);
}

/* --- Search Results Count Badge --- */
.lyrics-controls__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.lyrics-search-results-count {
    font-size: 0.8rem;
    color: var(--accent, #dc2626);
    font-weight: 600;
    white-space: nowrap;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm, 4px);
    background: rgba(220, 38, 38, 0.1);
}

/* --- Lyrics Layout (content + quickjump sidebar) --- */
.lyrics-layout {
    display: flex;
    gap: 0;
    position: relative;
}

.lyrics-layout > .lyrics-results {
    flex: 1;
    min-width: 0;
}

/* --- Alphabetical Quick-Jump Navigation --- */
.lyrics-quickjump {
    position: sticky;
    top: 120px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.5rem 0.35rem;
    margin-left: 0.5rem;
    z-index: 40;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    scrollbar-width: none;
}

.lyrics-quickjump::-webkit-scrollbar {
    display: none;
}

.lyrics-quickjump__label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #9ca3af);
    margin-bottom: 0.25rem;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    white-space: nowrap;
    opacity: 0.6;
}

.lyrics-quickjump__letters {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.lyrics-quickjump__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary, #d1d5db);
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-primary, sans-serif);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    padding: 0;
    line-height: 1;
}

.lyrics-quickjump__btn:hover {
    background: rgba(220, 38, 38, 0.15);
    color: var(--accent, #dc2626);
    transform: scale(1.2);
}

.lyrics-quickjump__btn:active {
    transform: scale(0.95);
}

[data-theme="light"] .lyrics-quickjump__btn {
    color: var(--text-secondary, #4b5563);
}

[data-theme="light"] .lyrics-quickjump__btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: var(--accent, #dc2626);
}

/* Flash animation for quick-jump target */
@keyframes lyrics-track-flash {
    0%   { background: rgba(220, 38, 38, 0.2); }
    100% { background: transparent; }
}

.lyrics-track--flash {
    animation: lyrics-track-flash 1.2s ease-out;
}

/* --- Smooth Accordion Expand/Collapse --- */
.lyrics-track__body {
    overflow: hidden;
}

.lyrics-track__body:not([hidden]) {
    animation: lyrics-accordion-open 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes lyrics-accordion-open {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        max-height: 2000px;
        transform: translateY(0);
    }
}

/* --- Lyrics Content Area (text + actions row) --- */
.lyrics-track__content {
    position: relative;
}

/* --- Enhanced Lyrics Typography --- */
.lyrics-verse {
    display: block;
    position: relative;
}

.lyrics-verse--first::first-line {
    font-size: 1.05em;
    color: var(--text-primary, #f5f5f5);
}

.lyrics-verse--first {
    position: relative;
}

.lyrics-verse--chorus {
    padding-left: 1rem;
    border-left: 2px solid rgba(220, 38, 38, 0.4);
    color: var(--text-primary, #e5e5e5);
    font-style: italic;
}

[data-theme="light"] .lyrics-verse--chorus {
    border-left-color: rgba(220, 38, 38, 0.3);
    color: var(--text-primary, #1f2937);
}

/* --- Copy Lyrics Button --- */
.lyrics-track__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-tertiary, rgba(255,255,255,0.05));
}

.lyrics-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border-secondary, rgba(255,255,255,0.1));
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    color: var(--text-muted, #9ca3af);
    font-size: 0.75rem;
    font-family: var(--font-primary, sans-serif);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lyrics-copy-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary, #fff);
    border-color: rgba(255,255,255,0.2);
}

.lyrics-copy-btn:active {
    transform: scale(0.97);
}

.lyrics-copy-btn--success {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #10b981 !important;
}

.lyrics-copy-btn svg {
    flex-shrink: 0;
}

[data-theme="light"] .lyrics-copy-btn {
    border-color: rgba(0,0,0,0.12);
    color: var(--text-muted, #6b7280);
}

[data-theme="light"] .lyrics-copy-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text-primary, #1f2937);
    border-color: rgba(0,0,0,0.2);
}

/* --- Enhanced Track Toggle Hover --- */
.lyrics-track__toggle {
    position: relative;
}

.lyrics-track__toggle::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--accent, #dc2626);
    transition: width 0.3s ease;
}

.lyrics-track__toggle:hover::after {
    width: 100%;
}

/* --- Enhanced Search Highlight --- */
.lyrics-highlight {
    background: rgba(220, 38, 38, 0.3);
    color: #fff;
    border-radius: 2px;
    padding: 0.05em 0.2em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.lyrics-track__title .lyrics-highlight {
    background: rgba(220, 38, 38, 0.25);
    font-weight: inherit;
}

[data-theme="light"] .lyrics-highlight {
    background: rgba(220, 38, 38, 0.2);
    color: inherit;
}

/* --- Spinner animation for loading --- */
.lyrics-track__spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--text-muted, #9ca3af);
    border-top-color: var(--accent, #dc2626);
    border-radius: 50%;
    animation: lyrics-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.3rem;
}

@keyframes lyrics-spin {
    to { transform: rotate(360deg); }
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
    .lyrics-quickjump {
        position: fixed;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 0;
        padding: 0.25rem 0.15rem;
        background: var(--bg-secondary, #0f0f0f);
        border-radius: 8px 0 0 8px;
        border: 1px solid var(--border-secondary, rgba(255,255,255,0.08));
        border-right: none;
        box-shadow: -4px 0 12px rgba(0,0,0,0.3);
        max-height: 60vh;
    }

    .lyrics-quickjump__label {
        display: none;
    }

    .lyrics-quickjump__btn {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }

    .lyrics-hero__actions {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .lyrics-action-btn span {
        display: none;
    }

    .lyrics-action-btn {
        padding: 0.45rem;
    }

    .lyrics-hero__coverage {
        flex-direction: column;
        gap: 0.35rem;
    }

    .lyrics-coverage-bar {
        width: 140px;
    }

    .lyrics-controls__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .lyrics-track__toggle::after {
        display: none;
    }

    [data-theme="light"] .lyrics-quickjump {
        background: var(--bg-primary, #fff);
        border-color: rgba(0,0,0,0.1);
        box-shadow: -4px 0 12px rgba(0,0,0,0.08);
    }
}

@media (max-width: 480px) {
    .lyrics-quickjump {
        padding: 0.15rem 0.1rem;
    }

    .lyrics-quickjump__btn {
        width: 18px;
        height: 18px;
        font-size: 0.55rem;
    }
}

/* --- Print: hide enhancements --- */
@media print {
    .lyrics-quickjump,
    .lyrics-track__actions,
    .lyrics-hero__actions,
    .lyrics-hero__coverage,
    .lyrics-search-results-count,
    .lyrics-controls__bottom {
        display: none !important;
    }

    .lyrics-layout {
        display: block;
    }

    .lyrics-verse--chorus {
        border-left: 1pt solid #999;
        padding-left: 8pt;
        font-style: italic;
    }

    .lyrics-track--flash {
        animation: none !important;
    }

    .lyrics-track__body:not([hidden]) {
        animation: none !important;
    }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .lyrics-track__body:not([hidden]) {
        animation: none;
    }

    .lyrics-track--flash {
        animation: none;
    }

    .lyrics-quickjump__btn:hover {
        transform: none;
    }

    .lyrics-track__toggle::after {
        transition: none;
    }

    .lyrics-copy-btn,
    .lyrics-action-btn svg,
    .lyrics-coverage-bar__fill {
        transition: none;
    }
}

/* ============================================================
   OFFLINE PAGE — Enhanced styles (supplement inline CSS)
   Loaded when the page is served online (preview/testing);
   the inline styles in offline.ejs handle the true offline case.
   ============================================================ */

.offline-vinyl-wrapper {
    filter: drop-shadow(0 0 30px rgba(220, 38, 38, 0.2));
}

.offline-vinyl {
    background:
        radial-gradient(circle at 50% 50%, #111 0%, #111 15%, transparent 15.5%),
        radial-gradient(circle at 50% 50%, var(--accent-red, #dc2626) 16%, var(--accent-red, #dc2626) 18%, transparent 18.5%),
        repeating-radial-gradient(circle at 50% 50%, #1a1a1a 19%, #222 21%, #1a1a1a 23%, #181818 25%),
        radial-gradient(circle at 50% 50%, #1a1a1a 0%, #111 100%);
}

.offline-cached-links a:hover .offline-cached-icon {
    transform: scale(1.15);
    transition: transform 0.15s ease;
}

.offline-retry:hover {
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4),
                0 0 60px rgba(220, 38, 38, 0.1);
}

.offline-container {
    animation: offline-fadeIn 0.6s ease-out;
}

@keyframes offline-fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .offline-container {
        animation: none;
    }
}

/* === Phase 97: Light Theme Completeness === */

/* ------------------------------------------------------------------
   Fix critical light-theme visibility issues where hardcoded dark
   backgrounds and white text survive the theme switch.
   Scoped under [data-theme="light"] so dark theme is unaffected.

   NOTE: Many section backgrounds are set in modern-fixes.css which
   loads AFTER this file. Where needed, !important is used to ensure
   these light-theme overrides win the cascade.
   ------------------------------------------------------------------ */

/* --- 1. Header: ensure glassmorphism bg is light at ALL viewports --- */
[data-theme="light"] .site-header .header-bg {
    background: rgba(255, 255, 255, 0.92) !important;
}

[data-theme="light"] .site-header.scrolled .header-bg {
    background: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="light"] .site-header.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* --- 2. Homepage section backgrounds: override hardcoded dark
   from modern-fixes.css lines ~20892-20918 --- */
[data-theme="light"] .homepage .archive-section {
    background: rgba(249, 250, 251, 0.95) !important;
}

[data-theme="light"] .homepage .guestbook-teaser-section {
    background: rgba(249, 250, 251, 0.95) !important;
    border-top-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .homepage .quote-rotator-section {
    background: rgba(243, 244, 246, 0.95) !important;
}

[data-theme="light"] .homepage .latest-album-showcase {
    background: rgba(243, 244, 246, 0.95) !important;
}

[data-theme="light"] .homepage .timeline-section {
    background: rgba(249, 250, 251, 0.95) !important;
}

[data-theme="light"] .homepage .memorial-section {
    background: rgba(249, 250, 251, 0.98) !important;
}

[data-theme="light"] .homepage .stats-section {
    background: rgba(249, 250, 251, 0.95) !important;
}

/* --- 3. .block-title + .word children: white text invisible on light bg.
   homepage.css and modern-fixes.css set color:#fff / var(--text-primary)
   which in .homepage context resolves to white. Must use !important. */
[data-theme="light"] .block-title,
[data-theme="light"] .section-title,
[data-theme="light"] .homepage .block-title,
[data-theme="light"] .homepage .timeline-section .block-title,
[data-theme="light"] .homepage .archive-section .block-title,
[data-theme="light"] .homepage .stats-section .block-title {
    color: #111827 !important;
}

/* .word spans inside split titles inherit white — override too */
[data-theme="light"] .block-title .word,
[data-theme="light"] .section-title .word,
[data-theme="light"] .homepage .block-title .word {
    color: #111827 !important;
}

/* --- 4. Archive cards: text colors for light bg --- */
[data-theme="light"] .homepage .archive-card {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .homepage .archive-card:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(200, 30, 30, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .homepage .archive-card-title {
    color: #111827 !important;
}

[data-theme="light"] .homepage .archive-card:hover .archive-card-title {
    color: #111827 !important;
}

[data-theme="light"] .homepage .archive-card-date {
    color: rgba(0, 0, 0, 0.45) !important;
}

[data-theme="light"] .homepage .archive-card-excerpt {
    color: rgba(0, 0, 0, 0.55) !important;
}

[data-theme="light"] .homepage .archive-card-link {
    color: var(--accent, #dc2626);
}

[data-theme="light"] .homepage .archive-card-thumb-placeholder {
    background: linear-gradient(135deg, rgba(200, 30, 30, 0.05), rgba(230, 230, 230, 0.8)) !important;
    color: rgba(0, 0, 0, 0.15);
}

/* --- 5. Guestbook teaser: all children use hardcoded white --- */
[data-theme="light"] .guestbook-teaser-title {
    color: #111827 !important;
}

/* .word spans inside guestbook title */
[data-theme="light"] .guestbook-teaser-title .word {
    color: #111827 !important;
}

[data-theme="light"] .guestbook-teaser-sub {
    color: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="light"] .guestbook-teaser-entry {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.06);
    border-left-color: rgba(220, 38, 38, 0.4);
}

[data-theme="light"] .guestbook-teaser-entry:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    border-left-color: #dc2626;
}

[data-theme="light"] .guestbook-entry-name {
    color: #111827 !important;
}

[data-theme="light"] .guestbook-entry-date {
    color: rgba(0, 0, 0, 0.4) !important;
}

[data-theme="light"] .guestbook-entry-msg {
    color: rgba(0, 0, 0, 0.6) !important;
}

[data-theme="light"] .guestbook-teaser-icon {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.2);
}

[data-theme="light"] .btn-guestbook {
    color: #111827;
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .btn-guestbook:hover {
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(220, 38, 38, 0.04);
}

/* --- 6. Latest album showcase: text forced white --- */
[data-theme="light"] .homepage .latest-album-showcase .latest-album-label {
    color: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="light"] .homepage .latest-album-showcase h2 {
    color: #111827 !important;
}

[data-theme="light"] .homepage .latest-album-showcase p {
    color: rgba(0, 0, 0, 0.6) !important;
}

[data-theme="light"] .homepage .latest-album-showcase .btn-secondary {
    color: #111827 !important;
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .homepage .latest-album-showcase .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.25);
}

/* --- 7. Quote rotator: light bg needs dark text --- */
[data-theme="light"] .quote-rotator-card blockquote,
[data-theme="light"] .quote-rotator-card p {
    color: #111827 !important;
}

[data-theme="light"] .quote-rotator-card .quote-attribution,
[data-theme="light"] .quote-rotator-card cite {
    color: rgba(0, 0, 0, 0.5) !important;
}

/* --- 8. Timeline section: text on light bg --- */
[data-theme="light"] .homepage .timeline-section .timeline-card,
[data-theme="light"] .homepage .timeline-section .hp-timeline-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .homepage .timeline-section .timeline-card:hover,
[data-theme="light"] .homepage .timeline-section .hp-timeline-card:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(220, 38, 38, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .homepage .timeline-section h3 {
    color: #111827 !important;
}

[data-theme="light"] .homepage .timeline-section .hp-timeline-date,
[data-theme="light"] .homepage .timeline-section .timeline-date {
    color: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="light"] .homepage .timeline-section .hp-timeline-type,
[data-theme="light"] .homepage .timeline-section .timeline-type {
    color: rgba(0, 0, 0, 0.4) !important;
}

[data-theme="light"] .homepage .timeline-section .timeline-line,
[data-theme="light"] .homepage .timeline-section .hp-timeline-line {
    background: linear-gradient(to bottom, transparent, rgba(220, 38, 38, 0.2), transparent) !important;
}

/* --- 9. Track spotlight: "K albomy" btn-secondary on light page --- */
[data-theme="light"] .track-spotlight-section .btn-secondary {
    color: #111827 !important;
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .track-spotlight-section .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .track-spotlight-section .track-spotlight-label {
    color: rgba(0, 0, 0, 0.5) !important;
}

/* --- 10. Stats counter section --- */
[data-theme="light"] .homepage .stats-section .stat-card {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .homepage .stats-section .stat-card .stat-label {
    color: rgba(0, 0, 0, 0.6) !important;
}

/* --- 11. Newsletter section in footer stays dark (footer is intentionally dark) ---
   No changes needed: footer already explicitly keeps dark in light theme. */

/* === Phase 97: Light Theme + Mobile Fixes === */

/* --- 12. Player volume label: hardcoded white → dark in light theme --- */
[data-theme="light"] .smp-volume-label {
    color: rgba(0, 0, 0, 0.5);
}

/* --- 13. Player progress time: ensure readable in light theme --- */
[data-theme="light"] .smp-time {
    color: var(--text-muted, #595f69);
}

/* --- 14. Player secondary controls: ensure icon visibility --- */
[data-theme="light"] .smp-secondary-controls .smp-btn {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .smp-secondary-controls .smp-btn:hover {
    color: rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.05);
}

/* --- 15. Lyrics quickjump sidebar: light theme background --- */
[data-theme="light"] .lyrics-quickjump {
    background: rgba(249, 250, 251, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .lyrics-quickjump__title {
    color: var(--text-secondary, #374151);
}

/* --- 16. Ribbon nav (TOC sidebar): light theme --- */
[data-theme="light"] .ribbon-nav {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ribbon-nav__label {
    color: var(--text-secondary, #374151);
}

[data-theme="light"] .ribbon-nav__frame:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* --- 17. Cookie consent banner: light theme --- */
[data-theme="light"] .cookie-consent {
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-primary, #111827);
}

[data-theme="light"] .cookie-consent .btn-accept {
    background: var(--accent, #dc2626);
    color: #fff;
}

/* --- 18. Scroll-to-top button: light theme --- */
[data-theme="light"] .scroll-to-top-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-primary, #111827);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .scroll-to-top-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* --- 19. Ambient sound toggle: light theme --- */
[data-theme="light"] .ambient-sound-toggle {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-secondary, #374151);
}

[data-theme="light"] .ambient-sound-toggle:hover {
    background: rgba(255, 255, 255, 1);
}

/* --- 20. Era filter buttons on members page: ensure active state visible --- */
[data-theme="light"] .members-era-btn.active {
    background: var(--accent, #dc2626);
    color: #fff;
    border-color: var(--accent, #dc2626);
}

/* --- 21. Discography stats bar: light theme background --- */
[data-theme="light"] .disco-stats-bar {
    background: rgba(249, 250, 251, 0.95);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .disco-stats-bar__label {
    color: var(--text-muted, #595f69);
}

/* --- 22. Timeline view on albums page --- */
[data-theme="light"] .disco-timeline__line {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .disco-timeline__dot {
    background: var(--accent, #dc2626);
    border-color: #fff;
}

/* --- 23. Reading progress bar: light theme --- */
[data-theme="light"] .reading-progress {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .reading-progress-fill,
[data-theme="light"] .reading-progress::after {
    background: var(--accent, #dc2626);
}

/* === End Phase 97: Light Theme + Mobile Fixes === */

/* ============================================================
   FAN PHOTOS & FAN STORIES — Light Theme + Visibility Fixes
   Phase 95: Audit findings for community pages
   ============================================================ */

/* --- 1. Photo card needs position:relative for ::after overlay --- */
.fan-photos-grid .photo-card {
    position: relative;
}

/* --- 2. Form messages outside <form> — selector fix --- */
.fan-photos-form-section > .form-message,
.fan-stories-form-section > .form-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.fan-photos-form-section > .form-message.success,
.fan-stories-form-section > .form-message.success {
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.fan-photos-form-section > .form-message.error,
.fan-stories-form-section > .form-message.error {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* --- 3. Light theme: Fan Photos page --- */
[data-theme="light"] .fan-photos-page-header p {
    opacity: 0.6;
    color: #374151;
}

[data-theme="light"] .fan-photos-filters .filter-tab {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #374151;
}

[data-theme="light"] .fan-photos-filters .filter-tab:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .fan-photos-filters .filter-tab.active {
    background: var(--accent-red, #dc2626);
    color: #fff;
    border-color: var(--accent-red, #dc2626);
}

[data-theme="light"] .fan-photos-grid .photo-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .fan-photos-grid .photo-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .fan-photos-grid .photo-card-category {
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.15);
}

[data-theme="light"] .fan-photos-grid .photo-card::after {
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
}

/* --- 4. Light theme: Fan Photos form section --- */
[data-theme="light"] .fan-photos-form-section {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .fan-photos-form-section h2 {
    color: #111827;
}

[data-theme="light"] .fan-photos-form .form-group label {
    color: #374151;
    opacity: 1;
}

[data-theme="light"] .fan-photos-form .form-group input,
[data-theme="light"] .fan-photos-form .form-group textarea,
[data-theme="light"] .fan-photos-form .form-group select {
    background: #f9fafb;
    border-color: rgba(0, 0, 0, 0.12);
    color: #111827;
}

[data-theme="light"] .fan-photos-form .form-group input:focus,
[data-theme="light"] .fan-photos-form .form-group textarea:focus,
[data-theme="light"] .fan-photos-form .form-group select:focus {
    background: #fff;
    border-color: var(--accent-red, #dc2626);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

[data-theme="light"] .fan-photos-form .form-group input::placeholder,
[data-theme="light"] .fan-photos-form .form-group textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

[data-theme="light"] .fan-photos-form .form-group select option {
    background: #fff;
    color: #111827;
}

[data-theme="light"] .fan-photos-form .file-drop-zone {
    border-color: rgba(0, 0, 0, 0.15);
    background: #fafafa;
}

[data-theme="light"] .fan-photos-form .file-drop-zone:hover,
[data-theme="light"] .fan-photos-form .file-drop-zone.dragover {
    border-color: var(--accent-red, #dc2626);
    background: rgba(220, 38, 38, 0.02);
}

[data-theme="light"] .fan-photos-form .file-drop-zone p {
    color: #6b7280;
    opacity: 1;
}

[data-theme="light"] .fan-photos-form .submit-btn {
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

/* --- 5. Light theme: Fan Photos pagination --- */
[data-theme="light"] .fan-photos-pagination .page-btn {
    background: #fff;
    color: #374151;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .fan-photos-pagination .page-btn:hover {
    background: var(--accent-red, #dc2626);
    color: #fff;
    border-color: var(--accent-red, #dc2626);
}

[data-theme="light"] .fan-photos-pagination .page-current {
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

/* --- 6. Light theme: Fan Photos loading / empty --- */
[data-theme="light"] .fan-photos-loading {
    color: #6b7280;
}

/* --- 7. Light theme: Fan Stories page --- */
[data-theme="light"] .fan-stories-page-header p {
    opacity: 0.6;
    color: #374151;
}

/* --- 8. Light theme: Fan Stories form section --- */
[data-theme="light"] .fan-stories-form-section {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .fan-stories-form-section h2 {
    color: #111827;
}

[data-theme="light"] .fan-stories-form .form-group label {
    color: #374151;
    opacity: 1;
}

[data-theme="light"] .fan-stories-form .form-group input,
[data-theme="light"] .fan-stories-form .form-group textarea,
[data-theme="light"] .fan-stories-form .form-group select {
    background: #f9fafb;
    border-color: rgba(0, 0, 0, 0.12);
    color: #111827;
}

[data-theme="light"] .fan-stories-form .form-group input:focus,
[data-theme="light"] .fan-stories-form .form-group textarea:focus,
[data-theme="light"] .fan-stories-form .form-group select:focus {
    background: #fff;
    border-color: var(--accent-red, #dc2626);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

[data-theme="light"] .fan-stories-form .form-group input::placeholder,
[data-theme="light"] .fan-stories-form .form-group textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

[data-theme="light"] .fan-stories-form .form-group select option {
    background: #fff;
    color: #111827;
}

[data-theme="light"] .fan-stories-form .char-counter {
    color: #6b7280;
}

[data-theme="light"] .fan-stories-form .submit-btn {
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

/* --- 9. Light theme: Fan Stories list section --- */
[data-theme="light"] .fan-stories-list-section h2 {
    color: #111827;
}

/* --- 10. Light theme: Story cards (basic .story-card from fan-stories.css) --- */
[data-theme="light"] .story-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .story-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .story-author {
    color: #111827;
}

[data-theme="light"] .story-date {
    color: #6b7280;
}

[data-theme="light"] .story-text {
    color: #374151;
}

/* --- 11. Light theme: Fan Stories pagination --- */
[data-theme="light"] .fan-stories-pagination .page-btn {
    background: #fff;
    color: #374151;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .fan-stories-pagination .page-btn:hover {
    background: var(--accent-red, #dc2626);
    color: #fff;
    border-color: var(--accent-red, #dc2626);
}

[data-theme="light"] .fan-stories-pagination .page-current {
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

/* --- 12. Light theme: Fan Stories loading / empty --- */
[data-theme="light"] .fan-stories-loading {
    color: #6b7280;
}

/* --- 13. Light theme: Form messages (both pages) --- */
[data-theme="light"] .fan-photos-form-section > .form-message.success,
[data-theme="light"] .fan-stories-form-section > .form-message.success,
[data-theme="light"] .fan-photos-form .form-message.success,
[data-theme="light"] .fan-stories-form .form-message.success {
    background: rgba(22, 163, 74, 0.06);
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.2);
}

[data-theme="light"] .fan-photos-form-section > .form-message.error,
[data-theme="light"] .fan-stories-form-section > .form-message.error,
[data-theme="light"] .fan-photos-form .form-message.error,
[data-theme="light"] .fan-stories-form .form-message.error {
    background: rgba(220, 38, 38, 0.06);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.2);
}

/* === End Fan Photos & Fan Stories Light Theme Fixes === */

/* ============================================================
   LYRICS DEEP SEARCH (Search Within Lyrics Text)
   ============================================================ */

/* --- Deep Search Toggle Button --- */
.lyrics-deep-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.lyrics-deep-search-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.lyrics-deep-search-btn:focus-visible {
    outline: 2px solid var(--color-primary, #e53e3e);
    outline-offset: 2px;
}

.lyrics-deep-search-btn--active {
    background: rgba(229, 62, 62, 0.15);
    border-color: rgba(229, 62, 62, 0.4);
    color: #f87171;
}

.lyrics-deep-search-btn--active:hover {
    background: rgba(229, 62, 62, 0.25);
    color: #fca5a5;
}

.lyrics-deep-search-btn--loading {
    opacity: 0.7;
    cursor: wait;
}

.lyrics-deep-search-btn--loading svg {
    animation: lyrics-deep-spin 1s linear infinite;
}

@keyframes lyrics-deep-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Deep Search Status --- */
.lyrics-deep-search-status {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.25rem 0;
    transition: opacity 0.3s ease;
}

/* --- Deep Search Results Section --- */
.lyrics-deep-results {
    padding: 1rem 0 2rem;
}

.lyrics-deep-results__header {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1rem;
    background: rgba(229, 62, 62, 0.08);
    border: 1px solid rgba(229, 62, 62, 0.2);
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

/* --- Album Groups in Deep Results --- */
.lyrics-deep-album {
    margin-bottom: 1.5rem;
}

.lyrics-deep-album__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0;
    margin: 0 0 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.01em;
}

/* --- Track Results --- */
.lyrics-deep-track {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s ease;
}

.lyrics-deep-track:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.lyrics-deep-track__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.lyrics-deep-track__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f87171;
}

.lyrics-deep-track__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.4rem;
    background: rgba(229, 62, 62, 0.2);
    color: #fca5a5;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* --- Context Blocks --- */
.lyrics-deep-context {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    padding: 0.5rem 0;
    margin: 0.4rem 0;
    overflow-x: auto;
}

.lyrics-deep-line {
    display: flex;
    gap: 0;
    padding: 0.1rem 0.75rem;
    transition: background 0.15s ease;
}

.lyrics-deep-line--match {
    background: rgba(229, 62, 62, 0.1);
}

.lyrics-deep-line__num {
    flex-shrink: 0;
    width: 2.5rem;
    text-align: right;
    color: rgba(255, 255, 255, 0.25);
    padding-right: 0.75rem;
    user-select: none;
    font-size: 0.75rem;
}

.lyrics-deep-line__text {
    color: rgba(255, 255, 255, 0.65);
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 1em;
}

.lyrics-deep-line--match .lyrics-deep-line__text {
    color: rgba(255, 255, 255, 0.9);
}

/* --- Ellipsis between context groups --- */
.lyrics-deep-ellipsis {
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
    padding: 0.15rem 0;
    letter-spacing: 0.2em;
}

/* --- Mark highlight in deep search --- */
.lyrics-deep-line .lyrics-highlight,
.lyrics-deep-results .lyrics-highlight {
    background: rgba(229, 62, 62, 0.35);
    color: #fff;
    border-radius: 2px;
    padding: 0.05em 0.15em;
    font-weight: 600;
}

/* --- Light Theme --- */
[data-theme="light"] .lyrics-deep-search-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .lyrics-deep-search-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.85);
    border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .lyrics-deep-search-btn--active {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.3);
    color: #dc2626;
}

[data-theme="light"] .lyrics-deep-results__header {
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.15);
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .lyrics-deep-album__title {
    color: rgba(0, 0, 0, 0.85);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .lyrics-deep-track {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .lyrics-deep-track:hover {
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .lyrics-deep-track__title {
    color: #dc2626;
}

[data-theme="light"] .lyrics-deep-track__count {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

[data-theme="light"] .lyrics-deep-context {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .lyrics-deep-line--match {
    background: rgba(220, 38, 38, 0.06);
}

[data-theme="light"] .lyrics-deep-line__num {
    color: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .lyrics-deep-line__text {
    color: rgba(0, 0, 0, 0.55);
}

[data-theme="light"] .lyrics-deep-line--match .lyrics-deep-line__text {
    color: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .lyrics-deep-ellipsis {
    color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .lyrics-deep-line .lyrics-highlight {
    background: rgba(220, 38, 38, 0.2);
    color: #7f1d1d;
}

[data-theme="light"] .lyrics-deep-search-status {
    color: rgba(0, 0, 0, 0.45);
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .lyrics-deep-search-btn span {
        display: none;
    }

    .lyrics-deep-search-btn {
        padding: 0.5rem;
    }

    .lyrics-deep-track {
        padding: 0.5rem 0.6rem;
    }

    .lyrics-deep-line {
        padding: 0.1rem 0.4rem;
    }

    .lyrics-deep-line__num {
        width: 2rem;
        font-size: 0.7rem;
    }

    .lyrics-deep-context {
        font-size: 0.78rem;
    }

    .lyrics-deep-results__header {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lyrics-deep-search-btn--loading svg {
        animation: none;
    }
}

/* === End Lyrics Deep Search === */

/* === EQ Presets Panel === */
.smp-eq-panel {
    padding: 0.5rem 0.75rem 0.6rem;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.smp-eq-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.4rem;
}

.smp-eq-presets {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.smp-eq-presets::-webkit-scrollbar {
    display: none;
}

.smp-eq-btn {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.65);
    padding: 0.22rem 0.65rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    line-height: 1.6;
}

.smp-eq-btn:hover {
    background: rgba(230, 57, 70, 0.22);
    border-color: rgba(230, 57, 70, 0.5);
    color: #fff;
}

.smp-eq-btn.active {
    background: rgba(230, 57, 70, 0.32);
    border-color: #e63946;
    color: #fff;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .smp-eq-btn {
        transition: none;
    }
}
/* === End EQ Presets Panel === */

/* === READING PROGRESS BAR (fixed top) === */
.reading-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.08);
  z-index: 1100;
  pointer-events: none;
}
.reading-progress-fill {
  height: 100%;
  background: linear-gradient(to right, #e63946, #f4a261);
  width: 0%;
  transition: width 0.1s linear;
  will-change: width;
}
/* Reading time + view count meta items */
.reading-time,
.view-count {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
/* Related articles (simple fallback section) */
.related-articles {
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 2rem;
}
.related-articles h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}
.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.related-article-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
.related-article-card:hover {
  background: rgba(255,255,255,0.08);
}
.related-article-card h4 {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}
.related-article-card p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
}
.skeleton-card {
  height: 100px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  animation: skeleton-pulse 1.5s infinite;
}
@media (prefers-reduced-motion: reduce) {
  .reading-progress-fill {
    transition: none;
  }
}
/* === End Reading Progress Bar === */

/* ============================================================
   KEYBOARD SHORTCUTS HELP OVERLAY
   ============================================================ */
.keyboard-help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.keyboard-help-panel {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 2rem;
    max-width: 640px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.keyboard-help-panel::-webkit-scrollbar {
    width: 4px;
}

.keyboard-help-panel::-webkit-scrollbar-track {
    background: transparent;
}

.keyboard-help-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.keyboard-help-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.keyboard-help-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.keyboard-help-panel h2 {
    margin: 0 0 1.5rem;
    font-size: 1.2rem;
    color: #fff;
    padding-right: 2rem;
}

.keyboard-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.75rem;
}

.keyboard-help-section h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(230, 57, 70, 0.9);
    margin: 0 0 0.75rem;
    font-weight: 600;
}

.keyboard-help-section dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
}

.keyboard-help-section dt {
    margin: 0;
    white-space: nowrap;
}

.keyboard-help-section dd {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.82rem;
    margin: 0;
    line-height: 1.5;
}

kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 0.1em 0.4em;
    font-size: 0.75em;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.keyboard-help-tip {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    margin: 1.5rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
}

/* Floating ? trigger button */
.keyboard-help-trigger {
    position: fixed;
    bottom: 5.5rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
    font-family: inherit;
}

.keyboard-help-trigger:hover,
.keyboard-help-trigger:focus-visible {
    background: rgba(230, 57, 70, 0.3);
    border-color: rgba(230, 57, 70, 0.6);
    color: #fff;
    transform: scale(1.1);
    outline: none;
}

@media (max-width: 480px) {
    .keyboard-help-trigger {
        bottom: 4.5rem;
        right: 0.75rem;
    }

    .keyboard-help-panel {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }

    .keyboard-help-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .keyboard-help-trigger {
        transition: none;
    }
}

/* ============================================================
   PLAYER MINI MODE — additional CSS selectors
   The primary .smp-player.smp-mini rule is in features.css above.
   These supplement hiding of non-essential sections in mini mode.
   ============================================================ */
#smp-player.smp-mini .smp-playlist,
#smp-player.smp-mini .smp-art,
#smp-player.smp-mini .smp-eq-panel,
#smp-player.smp-mini .smp-visualizer-container,
#smp-player.smp-mini .smp-keyboard-help {
    display: none !important;
}

#smp-player.smp-mini .smp-main-controls {
    display: none !important;
    padding-block: 0 !important;
}

/* Expose the mini-bar when in mini mode (controlled by JS toggleMiniMode) */
#smp-player.smp-mini .smp-mini-bar {
    display: flex !important;
}

/* In expanded mode: hide mini bar so only full controls show */
#smp-player:not(.smp-mini) .smp-mini-bar {
    display: none !important;
}

/* ============================================================
   End keyboard help + player mini mode
   ============================================================ */
