/* Garuda-Style Theme Variables */
:root {
    /* Dark Garuda Theme */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141419;
    --bg-tertiary: #1e1e24;
    --bg-glass: rgba(10, 10, 10, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #b4b4b4;
    --text-muted: #888888;
    
    /* Navy-blue Accent Palette */
    --accent: #0b3d91; /* navy blue */
    --accent-secondary: #154a8a; /* slightly desaturated navy */
    --accent-tertiary: #0f6fbf; /* brighter blue for highlights */
    --accent-hover: #0e4fb2; /* hover state */
    /* Accent glow tuned for blue hues */
    --accent-glow: 0 0 18px rgba(11, 61, 145, 0.35);
    
    /* Enhanced Effects */
    --border: #2a2a35;
    --border-bright: #404040;
    --shadow: rgba(0, 0, 0, 0.8);
    --glow-shadow: 0 0 40px rgba(11, 61, 145, 0.28);
    
    /* Enhanced Glass morphism */
    --glass-bg: rgba(20, 20, 25, 0.75);
    --glass-border: rgba(255, 255, 255, 0.15);
    
    --taskbar-height: 50px;
    --border-radius: 15px;
    --border-radius-small: 8px;
    
    /* Enhanced Gradients */
    --gradient-primary: linear-gradient(135deg, #072a5f 0%, #0b3d91 35%, #0f6fbf 70%, #072a5f 100%);
    --gradient-dark: linear-gradient(135deg, #070914 0%, #0b1222 50%, #101827 100%);
    --gradient-glass: linear-gradient(135deg, rgba(11,61,145,0.12) 0%, rgba(15,111,191,0.08) 50%, rgba(11,61,145,0.12) 100%);
    --gradient-neon: linear-gradient(45deg, #072a5f, #0b3d91, #0f6fbf, #072a5f);
    
    /* Performance Variables */
    --blur-amount: 10px;
    --animation-speed: 0.3s;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Fira Sans', 'Inter', 'Ubuntu', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    user-select: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    /* Performance optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Add some global glow effects */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-primary);
}

#desktop {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: var(--gradient-primary);
    overflow: hidden;
    display: var(--desktop-display, none);
}

#wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Fallback background - should be overridden by wallpaper classes */
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

/* Dynamic Wallpapers - Enhanced Garuda Style */
#wallpaper.wallpaper-nebula {
    background: 
        radial-gradient(ellipse at top,
            rgba(10, 0, 24, 0.95) 0%,
            rgba(4, 0, 12, 0.9) 55%,
            rgba(0, 0, 0, 0.98) 100%),
        linear-gradient(135deg,
            rgba(120, 0, 80, 0.55) 0%,
            rgba(68, 24, 132, 0.5) 35%,
            rgba(0, 100, 160, 0.45) 70%,
            rgba(120, 0, 80, 0.55) 100%) !important;
    background-size: 100% 100%, 200% 200% !important;
    position: relative;
    animation: gradientShift 20s ease-in-out infinite;
}

/* Add Garuda-style geometric pattern */
#wallpaper.wallpaper-nebula::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background-image: 
        linear-gradient(45deg, transparent 45%, rgba(255, 0, 128, 0.06) 50%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, rgba(124, 58, 237, 0.06) 50%, transparent 55%),
        radial-gradient(circle at 25% 25%, rgba(0, 212, 255, 0.18) 0%, transparent 55%),
        radial-gradient(circle at 75% 75%, rgba(255, 0, 128, 0.15) 0%, transparent 55%),
        radial-gradient(circle at 32% 68%, rgba(124, 58, 237, 0.12) 0%, transparent 60%);
    background-size: 120px 120px, 120px 120px, 320px 320px, 420px 420px, 360px 360px;
    opacity: 0.45;
    animation: patternMove 30s linear infinite, nebulaPulse 20s ease-in-out infinite alternate;
}

/* Central geometric focus like Garuda */
#wallpaper.wallpaper-nebula::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: 
        radial-gradient(circle at center,
            rgba(255, 0, 128, 0.22) 0%,
            rgba(124, 58, 237, 0.16) 30%,
            rgba(0, 212, 255, 0.12) 60%,
            transparent 100%
        );
    border: 2px solid rgba(255, 0, 128, 0.25);
    border-radius: 50%;
    animation: centerPulse 8s ease-in-out infinite alternate;
    backdrop-filter: blur(3px);
    box-shadow: 
        0 0 40px rgba(255, 0, 128, 0.25),
        inset 0 0 40px rgba(124, 58, 237, 0.15);
}

#wallpaper.wallpaper-edge {
    background: linear-gradient(135deg, #ff0080 0%, #ff4d6d 50%, #ff0080 100%) !important;
}

#wallpaper.wallpaper-horizon {
    background: linear-gradient(135deg, #7c3aed 0%, #00d4ff 50%, #7c3aed 100%) !important;
}

#wallpaper.wallpaper-circuit {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #ff0080 100%) !important;
}

/* Enhanced Animations */
@keyframes nebulaPulse {
    0%, 100% { 
        opacity: 0.7; 
        transform: scale(1);
    }
    33% { 
        opacity: 0.9; 
        transform: scale(1.05);
    }
    66% { 
        opacity: 1; 
        transform: scale(0.95);
    }
}

@keyframes gradientShift {
    0%, 100% { filter: brightness(0.9); }
    25% { filter: brightness(0.95); }
    50% { filter: brightness(0.85); }
    75% { filter: brightness(0.9); }
}

@keyframes patternMove {
    0% { background-position: 0 0, 0 0, 0 0, 0 0; }
    25% { background-position: 25px 25px, -25px 25px, 50px 50px, 100px 100px; }
    50% { background-position: 50px 0, 0 50px, 100px 0, 200px 200px; }
    75% { background-position: 25px -25px, 25px 25px, 150px 150px, 300px 100px; }
    100% { background-position: 0 0, 0 0, 0 0, 0 0; }
}

@keyframes centerPulse {
    0% { 
        transform: translate(-50%, -50%) rotate(45deg) scale(0.8);
        opacity: 0.3;
    }
    100% { 
        transform: translate(-50%, -50%) rotate(45deg) scale(1.2);
        opacity: 0.6;
    }
}

.hidden {
    display: none !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Welcome Notification */
.welcome-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 40px var(--shadow);
    z-index: 2000;
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
    transition: all 0.3s ease;
}

.welcome-content {
    padding: 30px;
    text-align: center;
}

.welcome-content h3 {
    color: var(--text-primary);
    font-size: 1.5em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.welcome-content h3 i {
    color: var(--accent);
}

.welcome-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 14px;
}

.welcome-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.welcome-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.welcome-btn:hover {
    background: var(--accent-hover);
}

.welcome-btn.secondary {
    background: var(--bg-secondary);
}

.welcome-btn.secondary:hover {
    background: var(--border);
}

/* System Notifications */
.system-notification, .error-notification {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--shadow);
    backdrop-filter: blur(10px);
    z-index: 1500;
    min-width: 320px;
    max-width: 420px;
    opacity: 0;
    transform: translateX(100%) scale(0.9);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.system-notification.show, .error-notification.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.system-notification.success {
    border-color: #4caf50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), var(--bg-primary));
}

.system-notification.warning {
    border-color: #ff9800;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), var(--bg-primary));
}

.system-notification.error {
    border-color: #f44336;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), var(--bg-primary));
}

.system-notification.info {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(255, 110, 199, 0.1), var(--bg-primary));
}

.notification-content, .error-content {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i, .error-content i {
    color: var(--accent);
    font-size: 18px;
    flex-shrink: 0;
}

.system-notification.success .notification-content i {
    color: #4caf50;
}

.system-notification.warning .notification-content i {
    color: #ff9800;
}

.system-notification.error .notification-content i {
    color: #f44336;
}

.error-notification .error-content i {
    color: #e74c3c;
}

.notification-content span, .error-content span {
    color: var(--text-primary);
    flex: 1;
    font-size: 14px;
}

.error-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.error-close:hover {
    background: var(--bg-secondary);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Selection styling */
::selection {
    background: var(--accent);
    color: white;
}

::-moz-selection {
    background: var(--accent);
    color: white;
}

/* Focus outline */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}