/* Custom styles for Deadend Deafchild */

/* Fonts and Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
    --primary-color: #8a2be2;
    --secondary-color: #00ff41;
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
}

html, body {
    overflow-x: hidden; /* Prevent horizontal scrolling */
    /* REMOVED: position: relative; - This was creating stacking context issues */
    min-height: 100vh; /* Ensure minimum height */
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* REMOVED: contain: layout style; - This was preventing fixed positioning */
}

/* Remove all default focus outlines that could cause blue lines */
* {
    outline: none !important;
}

*:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Prevent browser default focus styles */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus,
div:focus,
canvas:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Ensure visual containers don't block background visuals but contain canvases */
[data-visual-container] {
    overflow: hidden !important; /* Changed to hidden to contain canvases */
    isolation: isolate !important; /* Create stacking context */
    contain: layout style paint !important; /* CSS containment for performance */
    position: relative !important; /* Ensure positioning context */
}

/* Prevent fade-in animations from creating visual artifacts */
.fade-in-up {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Ensure glass containers allow visuals to flow through */
.glass-container {
    isolation: auto !important;
}

/* Global fixes to prevent visual artifacts and line bugs */
* {
    /* Prevent any stray borders or outlines */
    box-sizing: border-box;
}

/* Prevent canvas line artifacts and DOM interference */
canvas {
    border: none !important;
    outline: none !important;
    image-rendering: auto;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Visual layer canvases should never extend container bounds */
.visual-layer-canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    clip-path: inset(0) !important; /* Clip to bounds */
    contain: strict !important; /* Strict containment */
}

/* Fix potential scrollbar rendering issues */
::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-corner {
    border: none !important;
    outline: none !important;
}

/* Prevent iframe and embed element artifacts */
iframe,
embed,
object {
    border: none !important;
    outline: none !important;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
	background: rgba(0,0,0,0.2) !important;
}

/* Remove ALL glow from h1, h2 and h3 - override neon classes */
h1, h2, h3 {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

h1.neon-red, h1.neon-blue, h2.neon-red, h2.neon-blue, h3.neon-red, h3.neon-blue {
    text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.2) !important;
}

/* Styled h2 elements with backgrounds */
h2 {
    background: rgba(0, 0, 0, 0.3) !important; /* Much more transparent */
    border: 2px solid var(--primary-color) !important;
    border-radius: 16px !important;
    padding: 16px 24px !important;
    backdrop-filter: blur(8px) saturate(1.1) !important; /* Reduced blur */
    -webkit-backdrop-filter: blur(8px) saturate(1.1) !important;
    box-shadow: 
        0 0 20px var(--primary-color), /* Colored shadow */
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    position: relative !important;
    overflow: visible !important; /* Allow visuals to flow through */
}

h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        transparent 100%);
    pointer-events: none;
    z-index: -1;
}

/* Glitch Effect */
@keyframes glitch {
    0% {
        text-shadow: 
            0.05em 0 0 rgba(255, 0, 0, .75),
            -0.05em -0.025em 0 rgba(0, 255, 0, .75),
            0.025em 0.05em 0 rgba(0, 0, 255, .75);
    }
    14% {
        text-shadow: 
            0.05em 0 0 rgba(255, 0, 0, .75),
            -0.05em -0.025em 0 rgba(0, 255, 0, .75),
            0.025em 0.05em 0 rgba(0, 0, 255, .75);
    }
    15% {
        text-shadow: 
            -0.05em -0.025em 0 rgba(255, 0, 0, .75),
            0.025em 0.025em 0 rgba(0, 255, 0, .75),
            -0.05em -0.05em 0 rgba(0, 0, 255, .75);
    }
    49% {
        text-shadow: 
            -0.05em -0.025em 0 rgba(255, 0, 0, .75),
            0.025em 0.025em 0 rgba(0, 255, 0, .75),
            -0.05em -0.05em 0 rgba(0, 0, 255, .75);
    }
    50% {
        text-shadow: 
            0.025em 0.05em 0 rgba(255, 0, 0, .75),
            0.05em 0 0 rgba(0, 255, 0, .75),
            0 -0.05em 0 rgba(0, 0, 255, .75);
    }
    99% {
        text-shadow: 
            0.025em 0.05em 0 rgba(255, 0, 0, .75),
            0.05em 0 0 rgba(0, 255, 0, .75),
            0 -0.05em 0 rgba(0, 0, 255, .75);
    }
    100% {
        text-shadow: 
            -0.025em 0 0 rgba(255, 0, 0, .75),
            -0.025em -0.025em 0 rgba(0, 255, 0, .75),
            -0.025em -0.05em 0 rgba(0, 0, 255, .75);
    }
}

.glitch {
    animation: glitch 500ms infinite;
}

/* Professional Text Styling - NO GLOW */
.neon-red {
    color: var(--primary-color);
    text-shadow: 
        0px 0px 1px rgba(0, 0, 0, 0.1) !important;
    font-weight: 700;
}

.neon-blue {
    color: var(--secondary-color);
    text-shadow: 
        0px 0px 1px rgba(0, 0, 0, 0.1) !important;
    font-weight: 700;
}

/* Emoji Glow Effects */
h2:first-child,
nav a {
    position: relative;
}

/* Target emojis in headers and navigation */
h2 .emoji-glow,
nav a .emoji-glow,
h2:before,
nav a:before {
    filter: drop-shadow(0 0 8px var(--primary-color)) 
            drop-shadow(0 0 15px rgba(138, 43, 226, 0.4))
            drop-shadow(0 0 20px rgba(138, 43, 226, 0.2));
}

/* Navigation emoji glow - purple theme */
nav a:hover span {
    filter: drop-shadow(0 0 10px var(--primary-color)) 
            drop-shadow(0 0 20px rgba(138, 43, 226, 0.6))
            drop-shadow(0 0 30px rgba(138, 43, 226, 0.3));
    transition: all 0.3s ease;
}

/* Section header emoji glow - alternating colors */
.neon-red:first-child {
    filter: drop-shadow(0 0 1px var(--primary-color)) 
            drop-shadow(0 0 1px rgba(138, 43, 226, 0.4));
}

.neon-blue:first-child {
    filter: drop-shadow(0 0 8px var(--secondary-color)) 
            drop-shadow(0 0 15px rgba(0, 255, 65, 0.4));
}

/* Glassmorphism Container with Backdrop Effects */
.glass-container {
    background: rgba(2, 2, 2, 0.25); /* Much more transparent */
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px) saturate(1.1); /* Reduced blur */
    -webkit-backdrop-filter: blur(6px) saturate(1.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden; /* Contain visuals within bounds */
}

/* Project-specific container fixes */
.project-item {
    border: 1px solid rgba(255, 255, 255, 0.15) !important; /* Ensure consistent border */
    transition: border-color 0.3s ease, transform 0.3s ease !important;
    /* Prevent transform artifacts */
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}

.project-item:hover {
    border-color: #10b981 !important; /* Green-500 equivalent */
    transform: translateY(-2px) translateZ(0); /* Add translateZ for GPU acceleration */
}

.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(138, 43, 226, 0.03) 0%, 
        rgba(0, 255, 65, 0.03) 50%, 
        rgba(138, 43, 226, 0.03) 100%);
    pointer-events: none;
    z-index: -1;
}

.glass-container:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Section-specific backdrop effects - Reduced to allow visuals through */
#bio .glass-container {
    backdrop-filter: blur(4px) hue-rotate(10deg) brightness(1.05);
    -webkit-backdrop-filter: blur(4px) hue-rotate(10deg) brightness(1.05);
}

#projects .glass-container {
    backdrop-filter: blur(4px) contrast(1.1) saturate(0.9);
    -webkit-backdrop-filter: blur(4px) contrast(1.1) saturate(0.9);
}

#links .glass-container {
    backdrop-filter: blur(4px) brightness(1.1);
    -webkit-backdrop-filter: blur(4px) brightness(1.1);
}

#contact .glass-container {
    backdrop-filter: blur(4px) sepia(0.05) opacity(0.95);
    -webkit-backdrop-filter: blur(4px) sepia(0.05) opacity(0.95);
}

#videos .glass-container {
    backdrop-filter: blur(4px) saturate(1.2) contrast(1.05);
    -webkit-backdrop-filter: blur(4px) saturate(1.2) contrast(1.05);
}

/* Gradient Background */
.gradient-bg {
    background: linear-gradient(135deg, #1a0a1a 0%, #000 50%, #0a1a0a 100%);
}

/* Audio Player Styles with Visual Border */
.audio-player {
    background: rgba(10, 10, 10, 0.4); /* More transparent */
    border: 4px solid transparent;
    position: relative;
    overflow: visible; /* Allow visuals to flow through */
    backdrop-filter: blur(8px) saturate(1.2); /* Reduced blur */
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    box-shadow: 
        0 0 40px rgba(138, 43, 226, 0.3),
        0 0 80px rgba(0, 255, 65, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.audio-player::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--primary-color), 
        var(--secondary-color));
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -2;
    animation: borderGlow 3s ease-in-out infinite;
}

.audio-player::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, 
        rgba(138, 43, 226, 0.1) 0%, 
        rgba(0, 255, 65, 0.05) 30%, 
        transparent 70%);
    border-radius: inherit;
    z-index: -1;
    animation: audioPlayerPulse 4s ease-in-out infinite;
}

/* Additional internal audio player effects */
.audio-player {
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 65, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, rgba(20, 20, 20, 0.9) 0%, rgba(10, 10, 25, 0.9) 100%);
}

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

@keyframes audioPlayerPulse {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.02);
    }
}

/* Visual Flare for Containers */
.visual-flare {
    position: relative;
    overflow: hidden;
}

.visual-flare::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(138, 43, 226, 0.15) 0%, 
        rgba(0, 255, 65, 0.1) 30%, 
        transparent 70%);
    animation: visualRotate 8s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes visualRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Track Item Hover */
.track-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.track-item:hover {
    background: rgba(255, 0, 0, 0.1);
    transform: translateX(5px);
    border-left: 3px solid #ff0040;
}

/* Button Styles - Black with Colored Accents */
.cyber-button {
    background: rgba(0, 0, 0, 0.95); /* Even darker background for better contrast */
    border: 2px solid;
    border-color: color-mix(in srgb, var(--primary-color) 60%, #ffffff 40%); /* Lighter border color */
    color: #ffffff; /* Always white text for maximum readability */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); /* Strong text shadow for visibility */
    padding: 8px 16px; /* Reduced padding */
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    font-size: 0.75rem; /* Reduced font size (text-xs in Tailwind) */
}

.cyber-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.5s;
}

.cyber-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 0 20px color-mix(in srgb, var(--secondary-color) 70%, #ffffff 30%),
        0 4px 15px rgba(0, 0, 0, 0.4);
    border-color: color-mix(in srgb, var(--secondary-color) 70%, #ffffff 30%);
    color: #ffffff; /* Keep white text even on hover */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9); /* Stronger shadow on hover */
}

.cyber-button:hover:before {
    left: 100%;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
    box-shadow: 0 0 10px var(--primary-color);
}

/* Custom scrollbar for playlist */
.custom-scrollbar {
    overflow-x: hidden !important;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Playlist items - ensure no horizontal overflow */
.playlist-item {
    width: 100%;
    box-sizing: border-box;
}

.playlist-item .flex {
    flex-wrap: nowrap;
    width: 100%;
}

.playlist-item h5,
.playlist-item p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 85vw; /* Added to prevent overflow on smaller screens */
    margin: 0 auto; /* Center the video container */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Video Playlist adjustments for responsiveness */
.video-playlist {
    max-width: 85vw; /* Added to prevent overflow on smaller screens */
    margin: 0 auto; /* Center the playlist */
}

/* Grid Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Pulse Animation for Active Elements */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 64, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 64, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 64, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Form Styles */
input, textarea, select {
    background: linear-gradient(135deg, 
        rgba(10, 10, 10, 0.9) 0%, 
        rgba(15, 15, 15, 0.95) 100%);
    border: 2px solid color-mix(in srgb, var(--secondary-color) 60%, transparent 40%);
    color: color-mix(in srgb, var(--secondary-color) 90%, #ffffff 10%);
    padding: 12px 16px !important;
    width: 100%;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 12px;
    backdrop-filter: blur(15px);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--primary-color) 80%, transparent 20%);
    color: color-mix(in srgb, var(--primary-color) 95%, #ffffff 5%);
    background: linear-gradient(135deg, 
        rgba(15, 15, 15, 0.95) 0%, 
        rgba(20, 15, 20, 0.98) 100%);
    box-shadow: 
        0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent 80%),
        0 0 15px color-mix(in srgb, var(--primary-color) 40%, transparent 60%),
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 color-mix(in srgb, var(--primary-color) 30%, transparent 70%),
        0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

input::placeholder, textarea::placeholder {
    color: color-mix(in srgb, var(--secondary-color) 50%, transparent 50%);
    font-style: italic;
}

/* Custom Dropdown Styles */
.custom-select {
    position: relative;
    display: block;
    width: 100%;
}

.custom-select-trigger {
    background: linear-gradient(135deg, 
        rgba(10, 10, 10, 0.9) 0%, 
        rgba(15, 15, 15, 0.95) 100%);
    border: 2px solid rgba(0, 255, 65, 0.6);
    color: rgba(0, 255, 65, 0.9);
    padding: 12px 16px !important;
    width: 100%;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 12px;
    backdrop-filter: blur(15px);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-select-trigger:hover,
.custom-select-trigger.active {
    border-color: rgba(138, 43, 226, 0.8);
    color: rgba(138, 43, 226, 0.95);
    background: linear-gradient(135deg, 
        rgba(15, 15, 15, 0.95) 0%, 
        rgba(20, 15, 20, 0.98) 100%);
    box-shadow: 
        0 0 0 3px rgba(138, 43, 226, 0.2),
        0 0 15px rgba(138, 43, 226, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 rgba(138, 43, 226, 0.3),
        0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.custom-select-arrow {
    transition: transform 0.3s ease;
    color: rgba(0, 255, 65, 0.7);
}

.custom-select-trigger.active .custom-select-arrow {
    transform: rotate(180deg);
    color: rgba(138, 43, 226, 0.9);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, 
        rgba(15, 15, 15, 0.98) 0%, 
        rgba(20, 15, 20, 0.98) 100%);
    border: 2px solid rgba(138, 43, 226, 0.8);
    border-top: none;
    border-radius: 0 0 12px 12px;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 280px;
    z-index: 9999;
}

.custom-select-options.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.custom-select-option:hover {
    background: rgba(138, 43, 226, 0.2);
    color: rgba(138, 43, 226, 0.95);
    padding-left: 20px;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option.selected {
    background: rgba(0, 255, 65, 0.1);
    color: rgba(0, 255, 65, 0.95);
}

/* Custom scrollbar for dropdown */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: rgba(138, 43, 226, 0.6);
    border-radius: 3px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 43, 226, 0.8);
}

label {
    font-weight: 600;
    color:  color: var(--primary-color);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #ff0040;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Fixed Bottom Viewport Container */
#bottom-viewport-container {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 120px !important;
    z-index: 999 !important;
    pointer-events: none !important;
    background: transparent !important;
    display: flex !important;
    align-items: end !important;
    justify-content: space-between !important;
    padding: 0 20px 20px 20px !important;
    /* Force override any parent containment */
    contain: none !important;
    isolation: auto !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    /* Make sure it's not affected by document flow */
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
}

/* Bottom Spectrogram Canvas */
#bottom-spectrogram-canvas {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100px !important;
    z-index: 998 !important;
    pointer-events: none !important;
    background: transparent !important;
}

/* Unified Visual Controls */
.visual-controls-unified {
    position: relative;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    z-index: 1000;
    width: 104px;
    pointer-events: auto !important;
    background: linear-gradient(135deg, 
        rgba(5, 5, 5, 0.95) 0%, 
        rgba(15, 10, 15, 0.98) 50%,
        rgba(10, 5, 10, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 8px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(138, 43, 226, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.control-btn-unified {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(138, 43, 226, 0.4);
    background: linear-gradient(135deg, 
        rgba(5, 5, 5, 0.9) 0%, 
        rgba(20, 15, 25, 0.95) 50%,
        rgba(10, 5, 15, 0.9) 100%);
    backdrop-filter: blur(20px);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.7),
        0 0 8px rgba(138, 43, 226, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.control-btn-unified::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 11px;
}

.control-btn-unified::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: linear-gradient(135deg, 
        rgba(5, 5, 5, 0.9) 0%, 
        rgba(20, 15, 25, 0.95) 50%,
        rgba(10, 5, 15, 0.9) 100%);
    border-radius: 10px;
    z-index: -1;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.control-btn-unified:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: var(--primary-color);
    color: rgba(255, 255, 255, 1);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.9),
        0 0 25px rgba(138, 43, 226, 0.4),
        0 0 40px rgba(0, 255, 65, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.15),
        inset 0 -2px 0 rgba(0, 0, 0, 0.4);
}

.control-btn-unified:hover::before {
    opacity: 0.15;
}

.control-btn-unified:hover::after {
    opacity: 0.8;
}

.control-btn-unified:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(138, 43, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

/* Glow Control Styles */
.glow-control-unified {
    grid-column: span 2; /* Take full width of 2-column grid */
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(138, 43, 226, 0.4);
    background: linear-gradient(135deg, 
        rgba(5, 5, 5, 0.9) 0%, 
        rgba(20, 15, 25, 0.95) 50%,
        rgba(10, 5, 15, 0.9) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.7),
        0 0 12px rgba(138, 43, 226, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glow-control-unified::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 11px;
}

.glow-control-unified::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: linear-gradient(135deg, 
        rgba(5, 5, 5, 0.9) 0%, 
        rgba(20, 15, 25, 0.95) 50%,
        rgba(10, 5, 15, 0.9) 100%);
    border-radius: 10px;
    z-index: -1;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-control-unified:hover {
    transform: translateY(-1px) scale(1.01);
    border-color: var(--primary-color);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(138, 43, 226, 0.3),
        0 0 35px rgba(0, 255, 65, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.12),
        inset 0 -2px 0 rgba(0, 0, 0, 0.4);
}

.glow-control-unified:hover::before {
    opacity: 0.12;
}

.glow-control-unified:hover::after {
    opacity: 0.85;
}

.glow-icon {
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.glow-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.glow-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.glow-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(138, 43, 226, 0.5);
}

.glow-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.glow-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(138, 43, 226, 0.5);
}

.glow-value {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Color Picker Styles */
.color-controls {
    display: flex;
    gap: 8px;
}

.color-picker-wrapper {
    position: relative;
}

.color-picker-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.color-picker-button:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.color-picker-button.primary {
    background: var(--primary-color);
}

.color-picker-button.secondary {
    background: var(--secondary-color);
}

.color-picker-panel {
    position: absolute;
    bottom: 60px;
    left: 0;
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    min-width: 280px;
    z-index: 9999;
}

.color-picker-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.color-picker-panel h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

.color-picker-input {
    width: 100%;
    height: 180px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.color-presets {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.color-preset {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-preset:hover {
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Video Playlist Styles */
.playlist-item {
    transition: all 0.3s ease;
}

.playlist-item:hover {
    transform: translateX(4px);
}

.playlist-item.active {
    background: rgba(138, 43, 226, 0.2);
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}

.playlist-item.active .border {
    border-color: var(--primary-color);
}

.playlist-item img {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.playlist-item:hover img {
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.playlist-item.active img {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
}

h1, h2, h3, h4, h5, h6 {
text-shadow: 0px 0px 5px black !important;
background: rgba(0,0,0,0.9) !important;
padding: 4px !important;
border-radius: 10px !important;
color: var(--primary-color);
}

/* Dynamic Menu System Styles */

/* Auto-hide functionality */
.auto-hide-header,
.auto-hide-bottom {
    transition: transform 0.3s ease-in-out;
}

/* Sidebar Menu Styles */
#sidebar-menu {
    backdrop-filter: blur(20px);
    box-shadow: 
        0 0 40px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sidebar-collapsible {
    /* Add any specific styles for collapsible sidebars */
}

#sidebar-menu ul li a {
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

#sidebar-menu ul li a:hover {
    border-color: rgba(138, 43, 226, 0.5);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.2);
    transform: translateX(4px);
}

/* Bottom Menu Styles */
#bottom-menu {
    backdrop-filter: blur(20px);
    box-shadow: 
        0 -4px 20px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#bottom-menu ul li a {
    position: relative;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

#bottom-menu ul li a:hover {
    background: rgba(138, 43, 226, 0.2);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

/* Active menu item highlighting */
.active-menu-item {
    color: var(--primary-color) !important;
    background: rgba(138, 43, 226, 0.1) !important;
    border-color: rgba(138, 43, 226, 0.3) !important;
}

.active-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    border-radius: 0 2px 2px 0;
}

#bottom-menu .active-menu-item::before {
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 3px;
    border-radius: 0 0 2px 2px;
}

/* Mobile responsive adjustments */
@media (max-width: 1024px) {
    #sidebar-menu-spacer {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    #sidebar-menu {
        transform: translateX(-100%);
    }
    
    #sidebar-menu.right-0 {
        transform: translateX(100%);
    }
    
    #sidebar-overlay {
        /* Removed backdrop-filter to fix mobile blur bug */
        background-color: rgba(0, 0, 0, 0.7);
    }
}

/* Sidebar toggle button animations */
#sidebar-toggle svg {
    transition: all 0.3s ease;
}

#sidebar-toggle:hover svg {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Menu icon glow effect */
.favicon-glow {
    filter: drop-shadow(0 0 8px var(--primary-color));
    transition: filter 0.3s ease;
}

.favicon-glow:hover {
    filter: drop-shadow(0 0 12px var(--primary-color)) drop-shadow(0 0 20px var(--secondary-color));
}

/* Smooth transitions for all menu elements */
nav a,
nav button {
    transition: all 0.3s ease;
}

/* Focus states for accessibility */
nav a:focus,
nav button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Menu spacer adjustments */
#sidebar-menu-spacer {
    transition: all 0.3s ease;
}

#bottom-menu-spacer {
    transition: height 0.3s ease;
}

/* Loading states for menu */
.menu-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Menu section dividers */
#sidebar-menu ul li:not(:last-child) {
    margin-bottom: 4px;
}

#sidebar-menu ul li::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Enhanced hover effects */
#sidebar-menu ul li:hover::after {
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    box-shadow: 0 0 4px var(--primary-color);
}

/* Project Section Theme Gradients */

/* Progress Bar Styling */
.project-progress-bar {
    position: relative;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(138, 43, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.project-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced Audio Player Sliders */
.enhanced-slider {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    outline: none;
    transition: all 0.3s ease;
}

.enhanced-slider:hover {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 0 8px rgba(138, 43, 226, 0.3);
}

.enhanced-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary-color, #8a2be2), var(--secondary-color, #00ff41));
    border: 2px solid rgba(255,255,255,0.2);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1), inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.2s ease;
}

.enhanced-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4), 0 0 12px rgba(138, 43, 226, 0.6), inset 0 1px 0 rgba(255,255,255,0.4);
}

.enhanced-slider::-webkit-slider-thumb:active {
    transform: scale(0.95);
}

.enhanced-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary-color, #8a2be2), var(--secondary-color, #00ff41));
    border: 2px solid rgba(255,255,255,0.2);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1), inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.2s ease;
}

.enhanced-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4), 0 0 12px rgba(138, 43, 226, 0.6), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* Project Button Styling */
.project-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.project-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.project-btn-text {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

/* Primary Project Button */
.project-btn-primary {
    background: linear-gradient(135deg, 
        rgba(138, 43, 226, 0.8) 0%, 
        rgba(147, 51, 234, 0.9) 50%,
        rgba(168, 85, 247, 0.8) 100%);
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(138, 43, 226, 0.5);
}

.project-btn-primary::before {
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        var(--secondary-color) 100%);
}

.project-btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(138, 43, 226, 0.4),
        0 0 20px rgba(138, 43, 226, 0.3);
    border-color: var(--primary-color);
}

.project-btn-primary:hover::before {
    opacity: 0.3;
}

.project-btn-primary:hover .project-btn-text {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Secondary Project Button */
.project-btn-secondary {
    background: linear-gradient(135deg, 
        rgba(75, 85, 99, 0.8) 0%, 
        rgba(107, 114, 128, 0.9) 50%,
        rgba(156, 163, 175, 0.8) 100%);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(156, 163, 175, 0.5);
}

.project-btn-secondary::before {
    background: linear-gradient(135deg, 
        rgba(0, 255, 65, 0.3) 0%, 
        rgba(138, 43, 226, 0.3) 100%);
}

.project-btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(156, 163, 175, 0.4),
        0 0 20px rgba(0, 255, 65, 0.2);
    border-color: rgba(0, 255, 65, 0.6);
    background: linear-gradient(135deg, 
        rgba(107, 114, 128, 0.9) 0%, 
        rgba(156, 163, 175, 0.95) 50%,
        rgba(209, 213, 219, 0.9) 100%);
}

.project-btn-secondary:hover::before {
    opacity: 0.4;
}

.project-btn-secondary:hover .project-btn-text {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}

/* Active/Focus States */
.project-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.project-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Project Card Enhancements */
.project-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(138, 43, 226, 0.15);
}

.project-item:hover .project-progress-bar {
    box-shadow: 
        0 4px 12px rgba(138, 43, 226, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}