@font-face {
    font-family: 'Papyrus';
    src: url('fonts/papyrus.ttf') format('truetype');
}

html,
body {
    font-family: 'Papyrus', fantasy;
    font-size: 110%;
    /* Crimson Moon Gradient with Radial Overlay for Depth */
    background:
        radial-gradient(circle at 50% 30%, rgba(88, 5, 14, 0.4) 0%, rgba(0, 0, 0, 0.8) 100%),
        linear-gradient(180deg, #58050e 0%, #000000 100%) fixed !important;

    color: #FAEBD7;
    /* AntiqueWhite / Cream */
    overflow-x: hidden;
    min-height: 100vh;
}

/* Smoother Page Transition Animation (Tween Style) */
.mud-main-content {
    animation: fadeSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

/* Explicit Content Animation Class */
.fade-in-card {
    animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

/* General Glass Panel Animation */
.glass-panel {
    animation: fadeSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    /* Maintain other glass panel styles, just ensuring it animates in */
}

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

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

/* 
   --------------------------------------------------
   GLOBAL FONT OVERRIDES (MUD BLAZOR INPUTS)
   --------------------------------------------------
*/

.mud-input-label,
.mud-input-label-outlined,
.mud-input-label-animated,
label.mud-input-label {
    font-family: 'Papyrus', fantasy !important;
    font-size: 1.1em !important;
}

.mud-input-slot,
.mud-input-control-input-container input,
.mud-input-control-input-container textarea {
    font-family: 'Papyrus', fantasy !important;
    color: #FAEBD7 !important;
}

input::placeholder,
textarea::placeholder,
.mud-input-slot::placeholder,
.mud-input-control-input-container input::placeholder,
.form-control::placeholder {
    font-family: 'Papyrus', fantasy !important;
    font-size: 0.9em;
    font-style: italic;
    opacity: 1 !important;
    color: rgba(250, 235, 215, 0.6) !important;
}

.mud-input-helper-text,
.mud-input-error {
    font-family: 'Papyrus', fantasy !important;
}

.mud-typography,
.mud-button-root,
.mud-tooltip-root,
.mud-chip,
.mud-menu-item,
.mud-table-cell,
.mud-table-header,
.mud-grid-item,
.mud-paper,
.mud-card-header-title,
.mud-input,
.mud-select {
    font-family: 'Papyrus', fantasy !important;
}

/* Glass Navbar (Top) */
.glass-navbar {
    background: rgba(88, 5, 14, 0.4) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(250, 235, 215, 0.1);
}

/* Floating Notes Animation */
.notes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.floating-note {
    position: absolute;
    bottom: -50px;
    color: rgba(220, 20, 60, 0.3);
    font-size: 2rem;
    animation: floatUp infinite linear;
    text-shadow: 0 0 5px rgba(220, 20, 60, 0.5);
    font-family: 'Segoe UI Symbol', 'Arial Unicode MS', sans-serif !important;
    /* Ensure music notes render */
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

/* Randomize Notes */
.floating-note:nth-child(1) {
    left: 10%;
    animation-duration: 15s;
    animation-delay: 0s;
    font-size: 3rem;
}

.floating-note:nth-child(2) {
    left: 20%;
    animation-duration: 18s;
    animation-delay: 2s;
}

.floating-note:nth-child(3) {
    left: 35%;
    animation-duration: 12s;
    animation-delay: 5s;
    font-size: 4rem;
}

.floating-note:nth-child(4) {
    left: 50%;
    animation-duration: 20s;
    animation-delay: 1s;
}

.floating-note:nth-child(5) {
    left: 65%;
    animation-duration: 14s;
    animation-delay: 3s;
    font-size: 2.5rem;
}

.floating-note:nth-child(6) {
    left: 80%;
    animation-duration: 16s;
    animation-delay: 6s;
}

.floating-note:nth-child(7) {
    left: 90%;
    animation-duration: 19s;
    animation-delay: 4s;
}

.floating-note:nth-child(8) {
    left: 25%;
    animation-duration: 22s;
    animation-delay: 7s;
}

.floating-note:nth-child(9) {
    left: 55%;
    animation-duration: 13s;
    animation-delay: 2s;
}

.floating-note:nth-child(10) {
    left: 75%;
    animation-duration: 17s;
    animation-delay: 5s;
}

/* MudBlazor Corrections */
.mud-layout {
    background: transparent !important;
}

.mud-nav-link-text {
    font-family: 'Papyrus', fantasy !important;
    font-weight: 900 !important;
    font-size: 1.1em;
}

a,
.btn-link {
    color: #d68f9a;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* 
   --------------------------------------------------
   CREAM POPUPS & DIALOGS (User Request)
   --------------------------------------------------
*/
/* 
   --------------------------------------------------
   CREAM POPUPS & DIALOGS (User Request)
   --------------------------------------------------
*/
.mud-popover,
.mud-dialog {
    background-color: #1a1a1a !important;
    /* Dark Grey/Black Panel */
    color: #FAEBD7 !important;
    /* Cream Text */
    border: 1px solid rgba(250, 235, 215, 0.1);
}

/* Ensure text inside dialogs is readable */
.mud-dialog .mud-typography,
.mud-dialog .mud-icon-root {
    color: #FAEBD7 !important;
}

/* Dialog Button Overrides */
.mud-dialog .mud-button-filled {
    color: #1a1a1a !important;
    background-color: #FAEBD7 !important;
    /* Cream Button with Dark Text */
}

.mud-dialog .mud-button-outlined {
    border-color: rgba(250, 235, 215, 0.3) !important;
    color: #FAEBD7 !important;
}

.mud-dialog .mud-button-text {
    color: #FAEBD7 !important;
}

/* Input Fields inside Dialogs need contrast */
.mud-dialog .mud-input-control {
    color: #FAEBD7 !important;
}

.mud-dialog .mud-input-slot {
    color: #FAEBD7 !important;
}


/* 
   --------------------------------------------------
   PLAYER / MUSIC PANEL STYLES
   --------------------------------------------------
*/
.glass-panel {
    background: rgba(10, 5, 5, 0.3) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(250, 235, 215, 0.1);
    /* Increased border visibility */
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    /* Added Shadow */
}

/* ... */
.crimson-dialog-panel {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px !important;
    /* Mid-Tone Crimson Gradient */
    background: linear-gradient(135deg, rgba(40, 5, 10, 0.92) 0%, rgba(60, 10, 15, 0.94) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
    position: relative;
    overflow: visible !important;
}

.music-card {
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(20, 20, 20, 0.6) !important;
    border: 1px solid rgba(250, 235, 215, 0.05);
}

.music-card:hover {
    transform: translateY(-5px);
    background: rgba(88, 5, 14, 0.3) !important;
    box-shadow: 0 8px 24px rgba(88, 5, 14, 0.4);
    border-color: rgba(220, 20, 60, 0.4);
}

.now-playing-glow {
    box-shadow: 0 0 30px rgba(88, 5, 14, 0.6);
    border: 2px solid #8a0303;
}

.search-bar-glass {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 15px;
}

.playlist-item:hover .playlist-actions {
    opacity: 1 !important;
}

/* Grey Title Block Style */
.title-glass-block {
    background: rgba(80, 80, 80, 0.25);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 8px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 
   --------------------------------------------------
   CRIMSON MOON DIALOG STYLES (User Request)
   --------------------------------------------------
*/
.crimson-dialog-panel {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px !important;
    /* Darker Black/Grey Gradient with Crimson Depth */
    background: linear-gradient(135deg, rgba(8, 0, 0, 0.95) 0%, rgba(20, 5, 5, 0.95) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
    position: relative;
    overflow: visible !important;
}

/* Ensure text inside is Light (Cream) for Dark Glass */
.crimson-dialog-panel .mud-typography,
.crimson-dialog-panel .mud-icon-root,
.crimson-dialog-panel .mud-input-control,
.crimson-dialog-panel .mud-input-slot,
.crimson-dialog-panel .mud-list-item-text {
    color: #FAEBD7 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.crimson-dialog-panel .mud-input-slot::placeholder {
    color: rgba(250, 235, 215, 0.5) !important;
}

/* Hover effects for list items in dark mode */
.crimson-dialog-panel .mud-list-item:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Random Notes Decoration on Border */
.dialog-decoration-note {
    position: absolute;
    color: #8a0303;
    animation: floatNote 3s ease-in-out infinite;
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

.note-top-left {
    top: 5px;
    left: 5px;
    animation-delay: 0s;
    font-size: 1.5rem;
}

.note-top-right {
    top: 5px;
    right: 5px;
    animation-delay: 1s;
    font-size: 1.2rem;
}

.note-bottom-left {
    bottom: 5px;
    left: 5px;
    animation-delay: 2s;
    font-size: 1.8rem;
}

.note-bottom-right {
    bottom: 5px;
    right: 5px;
    animation-delay: 0.5s;
    font-size: 1.4rem;
}

@keyframes floatNote {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(10deg);
    }
}

/* 
   --------------------------------------------------
   SNACKBAR CUSTOMIZATION (Dark Glass)
   --------------------------------------------------
*/
.mud-snackbar-content {
    background-color: rgba(20, 20, 20, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid #8a0303 !important;
    /* Crimson Border */
    box-shadow: 0 0 15px rgba(138, 3, 3, 0.4) !important;
    border-radius: 12px !important;
    color: #FAEBD7 !important;
    /* AntiqueWhite Text */
}

.mud-snackbar-content .mud-icon-root {
    color: #faebd7 !important;
}

/* 
   --------------------------------------------------
   CUSTOM NAVIGATION BAR (Glassmorphism Pilled)
   --------------------------------------------------
*/
.nav-glass-bar {
    background: rgba(20, 5, 5, 0.6) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(250, 235, 215, 0.1);
    border-radius: 40px;
    padding: 3px 5px;
    height: auto;
    display: flex;
    align-items: center;
    gap: 2px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Custom Nav Button to replace MudButton default feel */
.nav-btn {
    color: #FAEBD7 !important;
    font-family: 'Papyrus', fantasy !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px;
    transition: all 0.3s ease !important;
    border-radius: 20px !important;
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
}

.nav-btn:hover {
    background: rgba(250, 235, 215, 0.15) !important;
    color: #fff !important;
    text-shadow: 0 0 8px rgba(250, 235, 215, 0.8);
    transform: translateY(-2px);
}

.nav-btn-active {
    background: rgba(138, 3, 3, 0.4) !important;
    border: 1px solid rgba(138, 3, 3, 0.8) !important;
    box-shadow: 0 0 15px rgba(138, 3, 3, 0.6);
}

/* Nav Menu Button Style (for dropdowns) */
.nav-btn-menu {
    border-radius: 20px;
    padding: 0 5px;
}

.nav-btn-menu .mud-button-root {
    color: #FAEBD7 !important;
    font-family: 'Papyrus', fantasy !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px;
    font-size: 0.85rem !important;
}

.nav-btn-menu .mud-button-root:hover {
    background: rgba(250, 235, 215, 0.15) !important;
    color: #fff !important;
    text-shadow: 0 0 8px rgba(250, 235, 215, 0.8);
}