/* theme-galaxy-dynamic.css - Optimized Version */

:root {
    --color-primary: #00d2ff !important;
    --color-primary-hover: #3aedff !important;
    --color-body: #050505 !important;
    --color-navbar: rgba(10, 10, 20, 0.85) !important;
    --color-card: rgba(15, 20, 35, 0.6) !important;
    --color-text: #ffffff !important;
    --border-radius: 12px !important;
}

/* 1. Optimized High-Quality Background */
body {
    background-color: var(--color-body);
    /* Switched to 4k source with a linear-gradient overlay for better contrast */
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
        url('https://images.unsplash.com/photo-1464802686167-b939a6910659?q=80&w=3840&auto=format&fit=crop');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    /* Slowed down animation to prevent pixel jitter/blur during movement */
    animation: spaceDrift 120s linear infinite alternate;
}

@keyframes spaceDrift {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}

/* 2. Frosted Glass Effect & Clipping Fix */
.ui.segment, 
.repository .header-wrapper, 
.ui.menu:not(.vertical):not(.tabular),
.modal {
    background: var(--color-card) !important;
    backdrop-filter: blur(15px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8) !important;
    border-radius: var(--border-radius) !important;
    /* CRITICAL FIX: Allows dropdowns to "break out" of the container */
    overflow: visible !important; 
}

/* 3. Dropdown & Action Menu Layering (The Screenshot Fix) */
.ui.dropdown .menu {
    z-index: 9999 !important; /* Ensures it sits above everything else */
    background-color: rgba(20, 20, 35, 0.98) !important; /* Opaque to prevent bleed-through */
    border: 1px solid rgba(0, 210, 255, 0.3) !important;
    backdrop-filter: blur(10px) !important;
}

.ui.dropdown .menu > .item {
    color: var(--color-text) !important;
}

.ui.dropdown .menu > .item:hover {
    background: rgba(0, 210, 255, 0.15) !important;
    color: var(--color-primary) !important;
}

/* 4. Navbar Fixes */
.full.height .borderless.menu {
    background: var(--color-navbar) !important;
    backdrop-filter: blur(20px) !important;
    z-index: 1001 !important;
    border-bottom: 2px solid transparent !important;
    border-image: linear-gradient(90deg, transparent, var(--color-primary), transparent) 1;
}

/* 5. "Plasma" Buttons */
.ui.primary.button {
    background: linear-gradient(-45deg, #00d2ff, #3aedff, #7000ff, #00d2ff) !important;
    background-size: 300% 300% !important;
    animation: plasmaGradient 5s ease infinite !important;
    border: none !important;
    transition: transform 0.2s !important;
    font-weight: bold !important;
}

@keyframes plasmaGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ui.primary.button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.5) !important;
}

/* 6. Footer Removal (Forgejo Clean-up) */
footer .container .links, 
footer .ui.left, 
footer .ui.right,
footer .license,
.ui.footer .text.muted {
    display: none !important;
}

/* 7. Typography Visibility */
.ui.header, .ui.table, .ui.list, .ui.breadcrumb .section {
    color: var(--color-text) !important;
}
