﻿:root,
body,
html,
.mud-layout,
.mud-main-content,
.mud-container,
.mud-appbar,
.mud-drawer {
    background-color: transparent !important;
    --mud-palette-background: transparent !important;
    --mud-palette-background-grey: transparent !important;
    --mud-palette-surface: rgba(15, 23, 30, 0.4) !important;
    --mud-palette-drawer-background: transparent !important;
}

html,
body {
    height: 100%;
    margin: 0;
    overflow-x: hidden;
    background: #090A0F !important;
    /* One source of truth for background color */
    font-family: 'Audiowide', cursive !important;
}

/* --- THE GLOBAL BACKGROUND --- */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -100;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    pointer-events: none;
}

/* --- HERO CELESTIAL OVERHAUL --- */
.hero-celestial {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.hero-nebula-1 {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 80%;
    height: 100%;
    background: radial-gradient(circle, rgba(41, 182, 246, 0.2) 0%, transparent 70%);
    filter: blur(80px);
    animation: nebula-float 20s infinite alternate;
}

.hero-nebula-2 {
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 80%;
    height: 100%;
    background: radial-gradient(circle, rgba(171, 71, 188, 0.15) 0%, transparent 70%);
    filter: blur(100px);
    animation: nebula-float 30s infinite alternate-reverse;
}

@keyframes nebula-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 30px) scale(1.1);
    }
}

.hero-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(1.5px 1.5px at 10% 20%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 30% 50%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 50% 80%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 70% 30%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 90% 60%, #fff, transparent),
        radial-gradient(2px 2px at 15% 75%, #41B6F6, transparent),
        radial-gradient(2px 2px at 85% 25%, #AB47BC, transparent);
    background-size: 50% 50%;
    animation: stars-twinkle 4s infinite ease-in-out;
}

@keyframes stars-twinkle {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.hero-asteroid-1,
.hero-asteroid-2 {
    position: absolute;
    background: #555;
    clip-path: polygon(25% 0%, 75% 0%, 100% 35%, 85% 100%, 15% 100%, 0% 35%);
    opacity: 0.7;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}

.hero-asteroid-1 {
    width: 12px;
    height: 10px;
    top: 20%;
    left: -20px;
    animation: hero-ast-1 15s infinite linear;
}

.hero-asteroid-2 {
    width: 8px;
    height: 8px;
    bottom: 30%;
    right: -20px;
    animation: hero-ast-2 20s infinite linear;
}

@keyframes hero-ast-1 {
    0% {
        left: -20px;
        transform: rotate(0deg);
    }

    100% {
        left: 110%;
        transform: rotate(360deg);
    }
}

@keyframes hero-ast-2 {
    0% {
        right: -20px;
        transform: rotate(0deg);
    }

    100% {
        right: 110%;
        transform: rotate(-360deg);
    }
}

.hero-rocket {
    position: absolute;
    top: 60%;
    left: -50px;
    width: 30px;
    height: 12px;
    background: #fff;
    clip-path: polygon(0% 20%, 80% 20%, 100% 50%, 80% 80%, 0% 80%);
    box-shadow: -20px 0 15px rgba(255, 69, 0, 0.9);
    opacity: 0.9;
    animation: hero-rocket-fly 25s infinite linear;
}

@keyframes hero-rocket-fly {
    0% {
        left: -50px;
        transform: translate(0, 0);
    }

    100% {
        left: 110%;
        transform: translate(50px, -20px);
    }
}

/* --- UTILITIES --- */
.mud-typography {
    font-family: 'Audiowide', cursive !important;
}

.glass-card {
    background: rgba(30, 45, 55, 0.4) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.admin-toolbar {
    background: rgba(13, 71, 161, 0.2) !important;
    backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.mud-drawer {
    background: rgba(10, 15, 20, 0.6) !important;
    backdrop-filter: blur(20px);
}

.mud-appbar {
    background: rgba(10, 15, 20, 0.4) !important;
    backdrop-filter: blur(10px);
}

/* --- DIALOG FIXES --- */
.mud-dialog,
.mud-dialog-content,
.mud-dialog .mud-paper {
    opacity: 1 !important;
    background-color: #18242B !important;
    /* Hardcoded Surface color from MainLayout to ensure opacity */
    background: #18242B !important;
    backdrop-filter: none !important;
}

/* Ensure no glass effect overrides it */
.mud-dialog.glass-card {
    background: #18242B !important;
    backdrop-filter: none !important;
}