/* Header Layout Fixes */

header.section {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    overflow: visible !important;
    z-index: 1000 !important;
    background-color: #fff !important;
    margin: 0 !important;
    margin-top: 0 !important;
}

/* Override .section padding that might cause gaps */
header.section {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

body, html {
    overflow-x: visible !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#header_space {
    height: 70px !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Style strip fixed in body (below header) - must come AFTER header in DOM */
.style-strip-fixed {
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0 !important;
    background: rgba(0,0,0,0.3) !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    margin-top: 0 !important;
    z-index: 999 !important;
    display: block !important;
    visibility: visible !important;
}

.style-strip-fixed .style-strip-container {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 0 20px;
    align-items: center;
}

.style-strip-fixed .style-strip-item {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.style-strip-fixed .style-strip-item:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.style-strip-fixed .style-strip-item.active {
    background: #8c52ff;
    color: #fff;
    border-color: #8c52ff;
    font-weight: bold;
}

.style-strip-fixed .style-strip-item.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.style-strip-fixed .style-strip-item.locked:hover {
    background: rgba(255,255,255,0.1);
}

/* When music is paused, make style buttons more readable */
body.music-paused .style-strip-fixed .style-strip-item:not(.active) {
    background: rgba(255,255,255,0.8) !important;
    color: #333 !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

body.music-paused .style-strip-fixed .style-strip-item:not(.active):hover {
    background: rgba(255,255,255,0.9) !important;
    color: #000 !important;
}

body.music-paused .style-strip-fixed .style-strip-item.locked {
    background: rgba(200,200,200,0.8) !important;
    color: #666 !important;
    opacity: 0.8 !important;
}

.style-strip-fixed::-webkit-scrollbar {
    height: 4px;
}

.style-strip-fixed::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.style-strip-fixed::-webkit-scrollbar-thumb {
    background: rgba(140,82,255,0.5);
    border-radius: 2px;
}

.style-strip-fixed::-webkit-scrollbar-thumb:hover {
    background: rgba(140,82,255,0.7);
}

/* Account for style strip on mix pages - add space for fixed strip */
body:has(.style-strip-fixed) #header_space {
    height: 70px !important;
}

/* Remove any top margin/padding that might cause gaps */
body {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body:has(.style-strip-fixed) .section {
    margin-top: 120px !important;
    padding-top: 0 !important;
}

@media (max-width: 455px) {
    .style-strip-fixed {
        top: 55px;
    }
    
    body:has(.style-strip-fixed) .section {
        margin-top: 110px !important;
    }
}

@media (max-width: 455px) {
    header.section {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
    
    #header_space {
        height: 55px !important;
    }
}

header.section .container.logoContainerNew {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

header.section .container.logoContainerNew #logo {
    flex: 0 0 auto;
    margin-right: auto;
    width: 120px;
    max-width: 120px;
}

header.section .container.logoContainerNew #logo img {
    width: 100%;
    height: auto;
    max-width: 120px;
}

header.section .container.logoContainerNew #primary_nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

header.section .container.logoContainerNew .login_buttons {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-left: auto;
    line-height: 1.2;
}

header.section .container.logoContainerNew .login_buttons span {
    font-size: 0.9em;
}

header.section .container.logoContainerNew .login_buttons .small {
    font-size: 0.75em;
}

header.section .container.logoContainerNew .login_buttons span,
header.section .container.logoContainerNew .login_buttons div {
    text-align: right;
    white-space: nowrap;
}

header.section .container.logoContainerNew .login_buttons a.login-link {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: opacity 0.2s ease;
    flex-direction: row !important;
    align-items: flex-start !important;
}

header.section .container.logoContainerNew .login_buttons a.login-link:hover {
    opacity: 0.8;
}

header.section .container.logoContainerNew .login_buttons a.login-link i {
    flex-shrink: 0 !important;
    color: #8c52ff !important;
    font-size: 18px !important;
    margin-top: 1.5em !important;
    align-self: flex-start !important;
    line-height: 1 !important;
}

header.section .container.logoContainerNew .login_buttons a.login-link .login-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    text-align: right !important;
}

header.section .container.logoContainerNew .login_buttons a.login-link .login-text span.text-primary-larnii {
    display: block;
    line-height: 1.2;
    font-size: 0.9em;
    color: #fff !important;
}

header.section .container.logoContainerNew .login_buttons a.login-link .login-text .small {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c6c6c !important;
    line-height: 1.2;
    font-size: 0.75em !important;
}

/* Make Listen, Create, and Pricing bigger for logged-in users */
body:has(.login-link) #primary_nav li.listen > a,
body:has(.login-link) #primary_nav li.create > a,
body:has(.login-link) #primary_nav li.pricing > a {
    font-size: 1.3em !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
}

/* Underline Listen to Live Mixes when on mix pages - REMOVED */
#primary_nav li.listen.active > a,
#primary_nav li.listen.active > a:hover {
    text-decoration: none !important;
}

header.section .container.logoContainerNew .login_buttons a.link_button.accountNew {
    padding: 8px 12px;
    min-width: auto;
}

header.section .container.logoContainerNew .login_buttons a.link_button.accountNew i {
    margin: 0;
    float: none;
}

/* Sign up and Login buttons – same width */
header.section .container.logoContainerNew .login_buttons a.link_button.signUpNew,
header.section .container.logoContainerNew .login_buttons a.link_button.accountNew {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    width: 160px;
    box-sizing: border-box;
    text-align: center;
}

/* Submenu styles */
header.section #primary_nav li.has-submenu {
    position: relative;
}

header.section #primary_nav li.has-submenu .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 8px 0;
    margin-top: 5px;
    display: none;
    z-index: 1000;
    list-style: none;
    margin-left: 0;
}

header.section #primary_nav li.has-submenu:hover .submenu,
header.section #primary_nav li.has-submenu:focus-within .submenu {
    display: block;
}

header.section #primary_nav li.has-submenu .submenu li {
    display: block;
    margin: 0;
    padding: 0;
}

header.section #primary_nav li.has-submenu .submenu li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-bottom: none;
}

header.section #primary_nav li.has-submenu .submenu li a:hover {
    background-color: #f5f5f5;
    color: #8c52ff;
}

header.section #primary_nav li.has-submenu .submenu li.view-all {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 4px;
    padding-bottom: 4px;
}

header.section #primary_nav li.has-submenu .submenu li.view-all a {
    font-weight: bold;
    color: #8c52ff;
}

header.section #primary_nav li.has-submenu .submenu li.locked a {
    opacity: 0.7;
    color: #999;
}

header.section #primary_nav li.has-submenu .submenu li.locked a:hover {
    background-color: #f5f5f5;
    color: #8c52ff;
}

/* Mobile adjustments - use 980px to match style.min.css so nav is never in-flow or visible when closed */
@media (max-width: 980px) {
    /* More space above header content; hamburger top-right */
    header.section {
        padding-top: 28px !important;
        padding-bottom: 14px !important;
    }
    header.section .container.logoContainerNew {
        flex-wrap: wrap;
        position: relative;
        justify-content: center;
    }
    /* Logged in: logo left; account icon next to hamburger on the right */
    header.section .container.logoContainerNew:has(.login-link) {
        justify-content: space-between;
        padding-left: 24px;
        padding-right: 54px;
    }
    header.section .container.logoContainerNew:has(.login-link) .login_buttons {
        margin-left: auto;
    }
    /* Mobile logged-in: hide Welcome and email/premium so header is just logo + account icon */
    header.section .container.logoContainerNew .login_buttons a.login-link .login-text {
        display: none !important;
    }
    header.section .container.logoContainerNew #logo {
        margin-right: 0;
    }
    header.section .container.logoContainerNew .login_buttons {
        margin-left: 0;
    }
    /* Hamburger: fixed top right, 10px from viewport edge */
    header.section .container.logoContainerNew #menu_control {
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        margin-left: 0;
        z-index: 1001;
    }
    /* Logged out: logo + buttons centered together, buttons side by side */
    header.section .container.logoContainerNew .login_buttons:has(.link_button) {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-left: 0;
    }
    /* Slightly smaller buttons on mobile so they fit in one row */
    header.section .container.logoContainerNew .login_buttons:has(.link_button) a.link_button.signUpNew,
    header.section .container.logoContainerNew .login_buttons:has(.link_button) a.link_button.accountNew {
        min-width: 0;
        width: auto;
        padding: 8px 14px;
        font-size: 0.85em;
    }
    
    /* Closed nav: always off-screen, never in flow or overlapping content (fixes logged-out overlap) */
    header.section .container.logoContainerNew #primary_nav:not(.open) {
        position: fixed !important;
        left: -100% !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    header.section .container.logoContainerNew #primary_nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Open nav: full viewport position, menu links start below header */
    header.section .container.logoContainerNew #primary_nav.open {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        visibility: visible !important;
        pointer-events: auto !important;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: 72px;
    }
    
    header.section #primary_nav li.has-submenu .submenu {
        position: static;
        display: none;
        box-shadow: none;
        background: transparent;
        padding: 0;
        margin: 0;
    }
    
    header.section #primary_nav li.has-submenu.open .submenu {
        display: block;
    }
    
    header.section #primary_nav li.has-submenu .submenu li a {
        padding: 10px 50px;
        color: #fff;
        font-size: 24px;
        border-bottom: solid 5px #333;
    }
    
    header.section #primary_nav li.has-submenu .submenu li.locked a {
        opacity: 0.6;
    }
    
    /* Mobile: hide down arrow and + on "Listen to Live Mixes" */
    header.section #primary_nav li.has-submenu > a .fa-chevron-down {
        display: none !important;
    }
    
    header.section #primary_nav li.has-submenu > a::after {
        content: none;
        display: none;
    }
    
    header.section #primary_nav li.has-submenu.open > a::after {
        content: none;
        display: none;
    }
    
    /* Mobile submenu toggle */
    header.section #primary_nav li.has-submenu > a {
        position: relative;
    }
    
    /* Close (X) button: exact same position as hamburger – 10px from top and right */
    .menu_close_btn {
        display: none;
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        width: 44px;
        height: 44px;
        padding: 0;
        border: none;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease;
        z-index: 1001;
    }
    .menu_close_btn:hover,
    .menu_close_btn:focus {
        background: rgba(255, 255, 255, 0.25);
        color: #fff;
    }
    header.section .container.logoContainerNew:has(#primary_nav.open) .menu_close_btn {
        display: flex !important;
    }
    
    /* Hide hamburger when menu is open so close button shows in top right */
    header.section .container.logoContainerNew:has(#primary_nav.open) #menu_control {
        display: none !important;
    }
}

/* Close button hidden on desktop; shown only in mobile overlay (see 980px block above) */
.menu_close_btn {
    display: none !important;
}

/* ============================================
   SLEEP TIMER MODAL - Z-INDEX FIX
   Only when OPEN (.show) – when closed, do not cover the page
   ============================================ */
/* When closed: never cover or block the page */
#sleepTimer.modal:not(.show) {
    pointer-events: none !important;
    visibility: hidden !important;
}

#sleepTimer.modal.show {
    z-index: 10050 !important;
    position: fixed !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 80px 15px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* When Sleep Timer is open, raise its stacking context so it appears above Live customise */
body:has(#sleepTimer.modal.show) *:has(> #sleepTimer.modal) {
    z-index: 100000 !important;
    position: relative !important;
}

#sleepTimer.modal .modal-dialog {
    z-index: 10051 !important;
    position: relative !important;
    margin: 0 auto !important;
    min-width: 380px !important;
    max-width: 420px !important;
    max-height: calc(100vh - 160px) !important;
    overflow-y: auto !important;
}

#sleepTimer.modal .modal-content {
    z-index: 10052 !important;
    position: relative !important;
    background: #1a1a1a !important;
    border: 1px solid rgba(140, 82, 255, 0.3) !important;
    border-radius: 12px !important;
}

.modal-backdrop.show {
    z-index: 10049 !important;
}

body .modal-backdrop {
    z-index: 10049 !important;
}

/* Create info modal (and other modals) must sit above backdrop (10049) */
#createInfoModal.modal {
    z-index: 10052 !important;
    position: fixed !important;
}

#createInfoModal.modal .modal-dialog {
    z-index: 10053 !important;
    position: relative !important;
}

/* Sleep timer modal styling */
#sleepTimer .modal-header {
    position: relative !important;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1f4e 100%) !important;
    border-bottom: 1px solid rgba(140, 82, 255, 0.2) !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 20px 24px !important;
    padding-right: 56px !important; /* space for close button */
}

/* Prevent clock icon overlapping the "Sleep Timer" heading – clear gap between icon and text */
#sleepTimer .sleep-timer-header-title-wrap {
    gap: 14px !important;
}
#sleepTimer .modal-header .sleep-timer-header-icon {
    flex-shrink: 0 !important;
    margin-right: 0 !important;
    width: 1.25rem !important;
    display: inline-block !important;
    text-align: center !important;
}

#sleepTimer .modal-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Close (×) button – comfortable padding from edge, visible and tappable */
#sleepTimer .modal-header .sleep-timer-close {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    font-size: 24px !important;
    line-height: 1 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
#sleepTimer .modal-header .sleep-timer-close:hover {
    color: #e0e0e0 !important;
    opacity: 1 !important;
}

#sleepTimer .modal-body {
    background: #1a1a1a !important;
    padding: 25px !important;
}

#sleepTimer .sleep-option {
    display: block !important;
    background: rgba(140, 82, 255, 0.1) !important;
    border: 1px solid rgba(140, 82, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin-bottom: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

/* Hide radio circles – whole row is clickable via label */
#sleepTimer .sleep-option input[type="radio"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#sleepTimer .sleep-option:hover {
    background: rgba(140, 82, 255, 0.2) !important;
    border-color: rgba(140, 82, 255, 0.4) !important;
}

#sleepTimer .sleep-option:has(input:checked) {
    background: rgba(140, 82, 255, 0.25) !important;
    border-color: rgba(140, 82, 255, 0.5) !important;
}

#sleepTimer .sleep-option span {
    color: #ffffff !important;
    cursor: pointer !important;
}

#sleepTimer .sleep-timer-save-btn {
    background: #8c52ff !important;
    border: none !important;
    padding: 12px 30px !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

#sleepTimer .sleep-timer-save-btn:hover {
    background: #7a3fe6 !important;
    transform: translateY(-1px) !important;
}

/* ============================================
   SIDE MENU - Sleep timer & volume (top-right, not bottom-right)
   ============================================ */
.side-menu {
    position: absolute !important;
    top: 90px !important;
    right: 20px !important;
    margin-top: 80px !important;
    margin-bottom: 80px !important;
}

/* ============================================
   WHITE ICONS - Sleep timer and volume
   ============================================ */
.side-menu-item .fa-clock-o,
.side-menu-item .fa-clock-o.primary-color {
    color: #ffffff !important;
}

.side-menu-item .fa-volume-up,
.side-menu-item .fa-volume-off,
.side-menu-item .volume-icon,
.side-menu-item .volume-icon-mute {
    color: #ffffff !important;
}

/* ============================================
   HEADER LOGIN ALIGNMENT FIX
   ============================================ */
header.section .container.logoContainerNew .login_buttons a.login-link {
    align-items: center !important;
}

header.section .container.logoContainerNew .login_buttons a.login-link i {
    margin-top: 0 !important;
    align-self: center !important;
    display: inline-block !important;
    vertical-align: middle !important;
    transform: none !important;
}

/* Account button next to Welcome (top right of header) */
header.section .container.logoContainerNew .login_buttons a.login-link .header-account-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    background: rgba(140, 82, 255, 0.2) !important;
    color: #8c52ff !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}

header.section .container.logoContainerNew .login_buttons a.login-link .header-account-btn i {
    font-size: 20px !important;
    margin: 0 !important;
}

header.section .container.logoContainerNew .login_buttons a.login-link:hover .header-account-btn {
    background: rgba(140, 82, 255, 0.35) !important;
    color: #a78bfa !important;
}

/* ============================================
   FOOTER LINK COLUMNS – EVEN ALIGNMENT
   ============================================ */
footer.section .container .row {
    align-items: flex-start !important;
}

footer.section .container .row .column ul {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Same top offset for all link columns so first row aligns */
footer.section .container .row .column:not(:first-of-type) {
    padding-top: 50px !important;
}

footer.section .container .row .column ul li.genres {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
}

/* Live customise button – in document flow, centered (no fixed/absolute so it doesn’t overlap content) */
.openFloatingControls {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: block !important;
    margin: 1rem auto !important;
}

/* When Sleep Timer modal is open, keep Live customise button behind it */
body:has(#sleepTimer.modal.show) .openFloatingControls {
    z-index: 0 !important;
}

/* ============================================
   LIVE CUSTOMISE PANEL – header and mobile layout
   ============================================ */
.floating-controls-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    padding: 0 15px 20px !important;
    margin-bottom: 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.floating-controls-header .col,
.floating-controls-header .col-auto {
    flex: 0 0 auto !important;
    max-width: none !important;
}
.floating-controls-title {
    margin: 0 !important;
    font-size: 1.25rem !important;
    white-space: nowrap !important;
}
.floating-controls-close {
    padding: 8px 12px !important;
    margin: 0 !important;
    font-size: 28px !important;
    line-height: 1 !important;
    min-width: 44px !important;
    min-height: 44px !important;
}

@media (max-width: 768px) {
    .floating-controls {
        padding: 20px 15px 30px !important;
        overflow-y: auto !important;
        max-height: 85vh !important;
    }
    .floating-controls-header {
        padding: 0 0 16px !important;
    }
    .floating-controls-title {
        white-space: normal !important;
        text-align: left !important;
    }
    .floating-controls .row:not(.floating-controls-header) {
        flex-direction: column !important;
        align-items: center !important;
    }
    .floating-controls .controlButtons,
    .floating-controls .col-md-6,
    .floating-controls .col-md-2 {
        max-width: 100% !important;
        width: 100% !important;
        flex: 0 0 100% !important;
    }
    .floating-controls h3 {
        margin-top: 24px !important;
        margin-bottom: 12px !important;
    }
    .floating-controls h3:first-of-type {
        margin-top: 0 !important;
    }
    .floating-controls .moodButtons,
    .floating-controls .intensityButtons {
        padding: 0 !important;
    }
    .floating-controls .moodButtons button,
    .floating-controls .controlButtons button,
    .floating-controls .intensityButtons button {
        min-width: 140px !important;
    }
}

/* Mix page: no huge gap below change buttons – container only as tall as content */
.mix-page-content .mix-main-container {
    min-height: 0 !important;
}
.mix-page-content .row:has(#mixChangeMessage) {
    min-height: 0 !important;
    margin-bottom: 0 !important;
}

/* Mix page: inline change message below change buttons – small white text (used when snackbar not shown) */
.mix-change-message {
    font-size: 0.875rem !important;
    color: #ffffff !important;
}

/* Mix page: green snackbar (same style as create page) for "Larnii is making changes…" */
#mix-change-snackbar.baseStyleChangealert.alert-success {
    background-color: #8da48b !important;
    border-color: #7a9378 !important;
    color: #1e3d1c !important;
    position: fixed !important;
}
/* Desktop: snackbars bottom right */
@media (min-width: 769px) {
    #mix-change-snackbar.baseStyleChangealert.alert-success {
        right: 24px !important;
        left: auto !important;
        transform: none !important;
        bottom: 24px !important;
    }
}
@media (max-width: 768px) {
    #mix-change-snackbar.baseStyleChangealert.alert-success {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        bottom: 24px !important;
    }
}
#mix-change-snackbar .mix-change-snackbar-close {
    position: absolute !important;
    top: 8px !important;
    right: 10px !important;
    bottom: auto !important;
    left: auto !important;
    margin: 0 !important;
    transform: none !important;
    align-self: flex-start !important;
}
#mix-change-snackbar .mix-change-snackbar-close:hover {
    opacity: 1 !important;
}

/* Create page: "Larnii is loading sounds" alert – close button top right */
.baseStyleChangealert-create {
    position: relative;
}
@media (min-width: 769px) {
    .baseStyleChangealert-create {
        position: fixed !important;
        right: 24px !important;
        bottom: 24px !important;
        left: auto !important;
        transform: none !important;
    }
}
.baseStyleChangealert-create .baseStyleChangealert-close {
    position: absolute !important;
    top: 8px !important;
    right: 10px !important;
    bottom: auto !important;
    left: auto !important;
}
.baseStyleChangealert-create .baseStyleChangealert-close:hover {
    opacity: 1 !important;
}

/* "Preview will update when playing is resumed" – remove grey background */
.mustBePlayingMessage {
    background-color: transparent !important;
    background: none !important;
}

/* Create page: loading spinner icon (fa-circle-notch) */
.loading-image.fa-circle-notch {
    width: auto;
    height: auto;
    font-size: 3rem;
    color: #5a5a62;
}
.createsection .loading .loading-image.fa-circle-notch,
.loadingCreate .loading-image.fa-circle-notch {
    display: inline-block;
}

/* Create page: hide loadingCreate until user triggers a change; when shown, fix to bottom-right (never between buttons) */
.createsection .loadingCreate {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    left: auto !important;
    top: auto !important;
    z-index: 10010;
    margin: 0;
    pointer-events: none;
}
body.create-loading-visible .createsection .loadingCreate {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: rgba(141, 164, 139, 0.95);
    border-radius: 8px;
    color: #1e3d1c !important;
    pointer-events: auto;
    max-width: 320px;
}
/* Ensure text is readable on sage green background */
body.create-loading-visible .createsection .loadingCreate .loadingMessage,
body.create-loading-visible .createsection .loadingCreate .loadingMessage p,
body.create-loading-visible .createsection .loadingCreate .loadingMessage .text-light {
    color: #1e3d1c !important;
}
body.create-loading-visible .createsection .loadingCreate .loading-image.fa-circle-notch {
    color: #2d4a2b !important;
}

/* Mix page: "Like what you hear? Create this song" button – same styling and animation as create page */
#createSongForMix.createSongFromPreviewCreateMode:not(.disabledButton):not(.animation-stopped) {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%) !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    color: #fff !important;
}
#createSongForMix.createSongFromPreviewCreateMode:not(.disabledButton):not(.animation-stopped)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    animation: createBtnShimmer 2.5s ease-in-out infinite;
    pointer-events: none;
}
#createSongForMix.createSongFromPreviewCreateMode:not(.disabledButton):not(.animation-stopped)::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(167, 139, 250, 0.3), rgba(139, 92, 246, 0.5));
    z-index: -1;
    animation: createBtnGlowPulse 3s ease-in-out infinite;
    filter: blur(8px);
}
#createSongForMix.createSongFromPreviewCreateMode:not(.disabledButton):not(.animation-stopped):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15) inset !important;
}
#createSongForMix.createSongFromPreviewCreateMode.animation-stopped {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%) !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3) !important;
    transition: all 0.3s ease;
}
#createSongForMix.createSongFromPreviewCreateMode.animation-stopped::before,
#createSongForMix.createSongFromPreviewCreateMode.animation-stopped::after {
    display: none;
}
#createSongForMix.createSongFromPreviewCreateMode.animation-stopped:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4) !important;
}
#createSongForMix.createSongFromPreviewCreateMode:not(.disabledButton):not(.animation-stopped) .fa-wand-magic-sparkles {
    display: inline-block;
    animation: createBtnWandFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}
#createSongForMix.createSongFromPreviewCreateMode.animation-stopped .fa-wand-magic-sparkles {
    animation: none !important;
    filter: none;
}

/* Create page: "CREATE SONG FROM PREVIEW" button – same gradient, shimmer, glow and wand animation as mix */
.create-page-create-btn.createSongFromPreviewCreateMode:not(.animation-stopped),
.createsection #createSong.createSongFromPreviewCreateMode:not(.animation-stopped),
#createSong.createSongFromPreviewCreateMode:not(.animation-stopped) {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%) !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    color: #fff !important;
}
.create-page-create-btn.createSongFromPreviewCreateMode:not(.animation-stopped)::before,
.createsection #createSong.createSongFromPreviewCreateMode:not(.animation-stopped)::before,
#createSong.createSongFromPreviewCreateMode:not(.animation-stopped)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    animation: createBtnShimmer 2.5s ease-in-out infinite;
    pointer-events: none;
}
.create-page-create-btn.createSongFromPreviewCreateMode:not(.animation-stopped)::after,
.createsection #createSong.createSongFromPreviewCreateMode:not(.animation-stopped)::after,
#createSong.createSongFromPreviewCreateMode:not(.animation-stopped)::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(167, 139, 250, 0.3), rgba(139, 92, 246, 0.5));
    z-index: -1;
    animation: createBtnGlowPulse 3s ease-in-out infinite;
    filter: blur(8px);
}
.create-page-create-btn.createSongFromPreviewCreateMode:not(.animation-stopped):not(.disabledButton):hover,
.createsection #createSong.createSongFromPreviewCreateMode:not(.animation-stopped):not(.disabledButton):hover,
#createSong.createSongFromPreviewCreateMode:not(.animation-stopped):not(.disabledButton):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15) inset !important;
}
.create-page-create-btn.createSongFromPreviewCreateMode.animation-stopped,
.createsection #createSong.createSongFromPreviewCreateMode.animation-stopped,
#createSong.createSongFromPreviewCreateMode.animation-stopped {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%) !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3) !important;
    transition: all 0.3s ease;
}
.create-page-create-btn.createSongFromPreviewCreateMode.animation-stopped::before,
.create-page-create-btn.createSongFromPreviewCreateMode.animation-stopped::after,
.createsection #createSong.createSongFromPreviewCreateMode.animation-stopped::before,
.createsection #createSong.createSongFromPreviewCreateMode.animation-stopped::after,
#createSong.createSongFromPreviewCreateMode.animation-stopped::before,
#createSong.createSongFromPreviewCreateMode.animation-stopped::after {
    display: none;
}
.create-page-create-btn.createSongFromPreviewCreateMode.animation-stopped:hover,
.createsection #createSong.createSongFromPreviewCreateMode.animation-stopped:hover,
#createSong.createSongFromPreviewCreateMode.animation-stopped:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4) !important;
}
.create-page-create-btn.createSongFromPreviewCreateMode:not(.animation-stopped) .fa-wand-magic-sparkles,
.createsection #createSong.createSongFromPreviewCreateMode:not(.animation-stopped) .fa-wand-magic-sparkles,
#createSong.createSongFromPreviewCreateMode:not(.animation-stopped) .fa-wand-magic-sparkles {
    display: inline-block;
    animation: createBtnWandFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}
.create-page-create-btn.createSongFromPreviewCreateMode.animation-stopped .fa-wand-magic-sparkles,
.createsection #createSong.createSongFromPreviewCreateMode.animation-stopped .fa-wand-magic-sparkles,
#createSong.createSongFromPreviewCreateMode.animation-stopped .fa-wand-magic-sparkles {
    animation: none !important;
    filter: none;
}

@keyframes createBtnShimmer {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}
@keyframes createBtnGlowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}
@keyframes createBtnWandFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-2px) rotate(5deg); }
}

/* Mix page: stack "Change all the sounds" / "Change the melody" / "Change the drums" on mobile */
@media (max-width: 768px) {
    .mix-change-buttons {
        flex-direction: column !important;
        align-items: center !important;
    }
    .mix-change-buttons .link_button {
        width: 100% !important;
        max-width: 320px !important;
        text-align: center !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}
