/* MusicMan Playlists — shared aurora theme (aligned with Profiles) */

:root,
[data-theme="dark"] {
    --primary-color: #7C4DFF;
    --secondary-color: #2C2F33;
    --text-color: #ffffff;
    --text-muted: #b8c0cc;
    --accent-color: #00E5FF;
    --hover-color: #651FFF;
    --gradient-start: #00E5FF;
    --gradient-end: #b388ff;
    --card-bg: rgba(8, 12, 22, 0.75);
    --card-text: #ffffff;
    --card-text-muted: #b8c0cc;
    --card-border: rgba(255, 255, 255, 0.12);
    --panel-bg: rgba(8, 12, 22, 0.55);
    --panel-border: rgba(255, 255, 255, 0.1);
    --transition-speed: 0.3s;
    --sidebar-bg: rgba(8, 12, 22, 0.92);
    --sidebar-text: #e8eef6;
    --sidebar-text-muted: #b0bac8;
    --sidebar-border: rgba(255, 255, 255, 0.12);
    --sidebar-hover: rgba(0, 229, 255, 0.12);
    --content-bg: rgba(8, 12, 22, 0.72);
    --content-text: #e8eef6;
    --content-text-muted: #9aa4b2;
    --content-border: rgba(255, 255, 255, 0.1);
    --content-section-bg: rgba(12, 16, 28, 0.85);
    --content-input-bg: rgba(6, 10, 18, 0.9);
    --content-input-border: rgba(0, 229, 255, 0.28);
    --mm-nav-bg: rgba(8, 12, 22, 0.55);
    --mm-starfield-opacity: 0.5;
    --mm-aurora-a: rgba(0, 229, 255, 0.1);
    --mm-aurora-b: rgba(124, 77, 255, 0.14);
    --mm-page-bg:
        radial-gradient(1200px 700px at 12% -10%, rgba(0, 229, 255, 0.14), transparent 55%),
        radial-gradient(900px 600px at 90% 10%, rgba(124, 77, 255, 0.18), transparent 50%),
        linear-gradient(165deg, #070b16 0%, #12102a 42%, #0a1628 100%);
    --mm-color-scheme: dark;
}

[data-theme="light"] {
    --primary-color: #5B35D5;
    --secondary-color: #E8ECF4;
    --text-color: #152033;
    --text-muted: #5a667a;
    --accent-color: #0891b2;
    --hover-color: #4C2BB8;
    --gradient-start: #0891b2;
    --gradient-end: #7C4DFF;
    --card-bg: rgba(255, 255, 255, 0.88);
    --card-text: #152033;
    --card-text-muted: #5a667a;
    --card-border: rgba(21, 32, 51, 0.1);
    --panel-bg: rgba(255, 255, 255, 0.82);
    --panel-border: rgba(21, 32, 51, 0.1);
    --sidebar-bg: rgba(255, 255, 255, 0.92);
    --sidebar-text: #152033;
    --sidebar-text-muted: #5a667a;
    --sidebar-border: rgba(21, 32, 51, 0.1);
    --sidebar-hover: rgba(8, 145, 178, 0.1);
    --content-bg: rgba(255, 255, 255, 0.88);
    --content-text: #152033;
    --content-text-muted: #5a667a;
    --content-border: rgba(21, 32, 51, 0.1);
    --content-section-bg: rgba(243, 246, 252, 0.95);
    --content-input-bg: rgba(255, 255, 255, 0.98);
    --content-input-border: rgba(8, 145, 178, 0.35);
    --mm-nav-bg: rgba(255, 255, 255, 0.8);
    --mm-starfield-opacity: 0.18;
    --mm-aurora-a: rgba(8, 145, 178, 0.12);
    --mm-aurora-b: rgba(124, 77, 255, 0.1);
    --mm-page-bg:
        radial-gradient(1200px 700px at 12% -10%, rgba(8, 145, 178, 0.12), transparent 55%),
        radial-gradient(900px 600px at 90% 10%, rgba(124, 77, 255, 0.1), transparent 50%),
        linear-gradient(165deg, #eef3fb 0%, #e4eaf6 42%, #f4f7fc 100%);
    --mm-color-scheme: light;
}

@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes shoot {
    0% { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
    70% { opacity: 1; transform: translateX(300px) translateY(300px) scale(1); }
    100% { opacity: 0; transform: translateX(400px) translateY(400px) scale(0); }
}

* { box-sizing: border-box; }

body,
body.mm-theme {
    font-family: 'Outfit', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--mm-page-bg);
    background-size: auto;
    animation: none;
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    color-scheme: var(--mm-color-scheme);
}

body.mm-theme-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

body::before,
body.mm-theme::before {
    content: '';
    position: fixed;
    inset: -20% -10% auto;
    height: 70vh;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 30% 40%, var(--mm-aurora-a), transparent 55%),
        radial-gradient(ellipse at 70% 30%, var(--mm-aurora-b), transparent 50%);
    filter: blur(40px);
}

.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: var(--mm-starfield-opacity);
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

[data-theme="light"] .star {
    background: #5a667a;
}

.star.small { width: 1px; height: 1px; opacity: 0.7; }
.star.medium { width: 2px; height: 2px; opacity: 0.8; }
.star.large { width: 3px; height: 3px; opacity: 0.9; }

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, #fff, transparent);
    border-radius: 50%;
    opacity: 0;
    animation: shoot 2s linear infinite;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), transparent);
    transform: rotate(45deg);
    transform-origin: 0 0;
}

[data-theme="light"] .shooting-star,
[data-theme="light"] .shooting-star::before {
    background: linear-gradient(45deg, rgba(21, 32, 51, 0.55), transparent);
}

/* Shared glass / panels */
.mm-glass,
.login-container {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 10;
}

[data-theme="light"] .mm-glass,
[data-theme="light"] .login-container {
    box-shadow: 0 18px 40px rgba(21, 32, 51, 0.08);
}

/* Brand */
.navbar-brand,
.mm-brand,
.login-container h1 {
    color: var(--accent-color) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    text-shadow: none !important;
    animation: none !important;
    font-weight: 700;
}

/* Shared CTAs */
.discord-btn,
.btn-discord,
.mm-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.35rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font-family: 'Outfit', sans-serif;
    font-weight: 650;
    font-size: 0.98rem;
    text-decoration: none !important;
    color: #061018 !important;
    background: linear-gradient(120deg, #00e5ff 0%, #7cf0ff 45%, #b388ff 100%);
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    overflow: visible;
    position: relative;
}

.discord-btn:hover,
.btn-discord:hover,
.mm-btn-primary:hover {
    color: #061018 !important;
    transform: translateY(-2px);
    filter: brightness(1.05);
    background: linear-gradient(120deg, #00e5ff 0%, #7cf0ff 45%, #b388ff 100%);
}

.discord-btn::before,
.btn-discord::before {
    display: none !important;
}

.mm-btn-ghost,
.btn-secondary-mm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.35rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 229, 255, 0.4);
    background: transparent;
    color: var(--text-color) !important;
    font-weight: 650;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.mm-btn-ghost:hover,
.btn-secondary-mm:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.65);
    color: var(--text-color) !important;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--hover-color);
}

/* Quieter glass chrome used across hub pages */
.navbar.mm-nav,
.navbar {
    background: var(--mm-nav-bg) !important;
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(12px);
}

.card,
.playlist-card,
.nav-card,
.stat-card,
.controls-card {
    background: var(--panel-bg) !important;
    border: 1px solid var(--panel-border) !important;
    color: var(--text-color);
}

.text-muted,
.mm-text-muted {
    color: var(--text-muted) !important;
}

/* === Panel sidebar (merged; do not rely on separate panel.css deploy) === */
/* Shared MusicMan Panel sidebar (index, server_settings, …) */

body.mm-theme.mm-panel {
    display: block;
    padding: 0;
    min-height: 100vh;
}

.main-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 0 18px 18px 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    transition: width 0.25s ease, left 0.25s ease;
    position: fixed;
    left: 0;
    top: 1.25rem;
    height: calc(100vh - 2.5rem);
    z-index: 1000;
    border: 1px solid var(--sidebar-border);
    border-left: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

[data-theme="light"] .sidebar {
    box-shadow: 0 12px 32px rgba(21, 32, 51, 0.1);
}

.sidebar.collapsed {
    width: 78px;
}

.sidebar-header {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-header {
    padding: 1rem 0.6rem;
    justify-content: center;
}

.sidebar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sidebar-text) !important;
    margin: 0;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-title {
    display: none;
}

.sidebar-toggle {
    background: transparent;
    border: 1px solid transparent;
    color: var(--accent-color) !important;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: var(--sidebar-hover);
    border-color: rgba(0, 229, 255, 0.3);
}

.nav-menu {
    padding: 0.85rem 0;
    flex: 1 1 auto;
    overflow-y: auto;
}

.nav-item {
    margin: 0.2rem 0.85rem;
}

.sidebar.collapsed .nav-item {
    margin: 0.2rem 0.45rem;
}

/* Beat Bootstrap .nav-link defaults */
.sidebar .nav-link,
.nav-menu .nav-link {
    display: flex !important;
    align-items: center;
    padding: 0.75rem 0.95rem !important;
    color: var(--sidebar-text-muted) !important;
    text-decoration: none !important;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
    background: transparent !important;
    border: 1px solid transparent;
}

.sidebar .nav-link:hover,
.nav-menu .nav-link:hover {
    background: var(--sidebar-hover) !important;
    color: var(--sidebar-text) !important;
    text-decoration: none !important;
}

.sidebar .nav-link.active,
.nav-menu .nav-link.active {
    background: rgba(0, 229, 255, 0.16) !important;
    color: var(--sidebar-text) !important;
    border-color: rgba(0, 229, 255, 0.35);
}

[data-theme="light"] .sidebar .nav-link.active,
[data-theme="light"] .nav-menu .nav-link.active {
    background: rgba(8, 145, 178, 0.14) !important;
    border-color: rgba(8, 145, 178, 0.35);
}

.sidebar .nav-link i,
.nav-menu .nav-link i {
    width: 1.25rem;
    margin-right: 0.75rem;
    text-align: center;
    font-size: 0.95rem;
    color: inherit;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

.nav-text {
    font-weight: 550;
    white-space: nowrap;
}

.sidebar.collapsed .nav-text {
    display: none;
}

.theme-toggle {
    margin: 0.75rem;
    padding: 0.75rem;
    background: var(--sidebar-hover);
    border: 1px solid var(--sidebar-border);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
    color: var(--sidebar-text) !important;
    user-select: none;
}

.theme-toggle:hover {
    border-color: rgba(0, 229, 255, 0.35);
}

.theme-toggle i {
    color: var(--accent-color) !important;
    font-size: 1.05rem;
}

.theme-toggle-text {
    color: var(--sidebar-text) !important;
    font-weight: 550;
    font-size: 0.92rem;
}

.sidebar.collapsed .theme-toggle-text {
    display: none;
}

.content-area {
    flex: 1;
    padding: 1.5rem 1.5rem 2.5rem;
    margin-left: 300px;
    transition: margin-left 0.25s ease;
    color: var(--content-text);
    position: relative;
    z-index: 5;
    min-height: 100vh;
}

.main-container .sidebar.collapsed ~ .content-area {
    margin-left: 110px;
}

.mobile-toggle {
    display: none !important;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    background: var(--sidebar-bg) !important;
    border: 1px solid var(--sidebar-border) !important;
    border-radius: 10px;
    color: var(--accent-color) !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
}

@media (max-width: 900px) {
    .sidebar {
        left: -300px;
        top: 0;
        height: 100vh;
        border-radius: 0 16px 16px 0;
    }

    .sidebar.show {
        left: 0;
    }

    .content-area,
    .main-container .sidebar.collapsed ~ .content-area {
        margin-left: 0;
        padding: 4.5rem 1rem 2rem;
    }

    .mobile-toggle {
        display: inline-flex !important;
    }

    .overlay.show {
        display: block;
    }
}
