:root {
  --glass-dark: linear-gradient(135deg, rgba(0, 5, 15, 0.95), rgba(2, 8, 25, 0.98));
  --glass-border: 1px solid rgba(26, 93, 255, 0.15);
  --cosmic-shadow: 0 25px 100px rgba(1, 2, 8, 0.95);
  --neon-glow: 0 0 80px rgba(26, 93, 255, 0.4);
  --quantum-radius: 24px;
  --cosmic-accent: #1a5dff;
  --cosmic-accent-2: #00c3ff;
  --cosmic-accent-3: #8a2be2;
  --cosmic-text: #f0f8ff;
  --cosmic-muted: #6b8cae;
  --cosmic-success: #00ff88;
}

/* MORNING ORBIT for Notifications */
:root[data-theme="light"] {
  --notify-glass-dark: var(--glass-dark);
  --notify-glass-border: var(--glass-border);
  --notify-cosmic-shadow: var(--cosmic-shadow);
  --notify-neon-glow: var(--neon-glow);
  --notify-accent-glow: var(--accent-glow);
  --notify-quantum-radius: 24px;
  --notify-cosmic-accent: var(--cosmic-accent);
  --notify-cosmic-accent-2: var(--cosmic-accent-2);
  --notify-cosmic-accent-3: var(--cosmic-accent-3);
  --notify-cosmic-text: var(--cosmic-text);
  --notify-cosmic-muted: var(--cosmic-muted);
  --notify-cosmic-success: #10b981;
  --notify-cosmic-error: #ef4444;
  --notify-cosmic-warning: var(--cosmic-accent-3);
}

.notify {
    background: var(--glass-dark);
    backdrop-filter: blur(60px) saturate(200%);
    border: var(--glass-border);
    border-radius: var(--quantum-radius);
    padding: 1.5rem 2rem;
    box-shadow: var(--cosmic-shadow), var(--neon-glow);
    transform: translateX(500px) scale(0.9) rotateY(15deg);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-width: 380px;
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 10000;
    overflow: hidden;
    opacity: 0;
}

.notify::before {
    content: "";
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, transparent 0%, rgba(26, 93, 255, 0.08) 50%, transparent 100%),
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px);
    opacity: 0.3;
    animation: hologramScan 12s linear infinite;
    pointer-events: none;
    border-radius: inherit;
}

.notify::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--cosmic-accent), var(--cosmic-accent-2));
    border-radius: var(--quantum-radius) 0 0 var(--quantum-radius);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notify.show {
    transform: translateX(0) scale(1) rotateY(0);
    opacity: 1;
    animation: quantumNotificationEntrance 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes quantumNotificationEntrance {
    0% {
        transform: translateX(500px) scale(0.8) rotateY(25deg);
        opacity: 0;
        filter: blur(10px);
    }
    60% {
        transform: translateX(-20px) scale(1.02) rotateY(-5deg);
        opacity: 1;
        filter: blur(0);
    }
    100% {
        transform: translateX(0) scale(1) rotateY(0);
        opacity: 1;
        filter: blur(0);
    }
}

.notify.hide {
    transform: translateX(500px) scale(0.9) rotateY(-15deg);
    opacity: 0;
    filter: blur(8px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.notify-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: var(--cosmic-text);
    position: relative;
    z-index: 2;
}

.notify-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notify-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0.1;
    border-radius: inherit;
}

.notify-icon::after {
    content: "";
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg, currentColor, transparent, currentColor);
    border-radius: inherit;
    opacity: 0;
    animation: quantumSpin 3s linear infinite;
    transition: opacity 0.3s ease;
}

.notify-text {
    flex: 1;
    line-height: 1.5;
}

.notify-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.notify-message {
    color: var(--cosmic-muted);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

.notify-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cosmic-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: 0.5rem;
    position: relative;
    overflow: hidden;
}

.notify-close::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.notify-close:hover::before {
    transform: translateX(100%);
}

.notify-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--cosmic-text);
    transform: rotate(90deg) scale(1.1);
}

/* === COSMIC NOTIFICATION TYPES === */

/* SUCCESS - Quantum Harmony */
.notify.success {
    box-shadow: var(--cosmic-shadow), 0 0 50px rgba(0, 255, 136, 0.3);
}

.notify.success::after {
    background: linear-gradient(180deg, var(--cosmic-success), #00cc66);
    opacity: 1;
}

.notify.success .notify-icon {
    color: var(--cosmic-success);
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.notify.success .notify-icon::after {
    opacity: 0.6;
}

.notify.success .notify-title {
    color: var(--cosmic-success);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

/* ERROR - Quantum Anomaly */
.notify.error {
    box-shadow: var(--cosmic-shadow), 0 0 50px rgba(255, 107, 107, 0.3);
}

.notify.error::after {
    background: linear-gradient(180deg, #ff6b6b, #ff4757);
    opacity: 1;
}

.notify.error .notify-icon {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.notify.error .notify-icon::after {
    opacity: 0.6;
}

.notify.error .notify-title {
    color: #ff6b6b;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.4);
}

/* WARNING - Quantum Fluctuation */
.notify.warning {
    box-shadow: var(--cosmic-shadow), 0 0 50px rgba(255, 159, 28, 0.3);
}

.notify.warning::after {
    background: linear-gradient(180deg, var(--cosmic-accent-3), #ff7b25);
    opacity: 1;
}

.notify.warning .notify-icon {
    color: var(--cosmic-accent-3);
    background: rgba(255, 159, 28, 0.1);
    box-shadow: 0 0 20px rgba(255, 159, 28, 0.3);
}

.notify.warning .notify-icon::after {
    opacity: 0.6;
}

.notify.warning .notify-title {
    color: var(--cosmic-accent-3);
    text-shadow: 0 0 20px rgba(255, 159, 28, 0.4);
}

/* INFO - Quantum Transmission */
.notify.info {
    box-shadow: var(--cosmic-shadow), var(--neon-glow);
}

.notify.info::after {
    background: linear-gradient(180deg, var(--cosmic-accent), var(--cosmic-accent-2));
    opacity: 1;
}

.notify.info .notify-icon {
    color: var(--cosmic-accent);
    background: rgba(26, 93, 255, 0.1);
    box-shadow: 0 0 20px rgba(26, 93, 255, 0.3);
}

.notify.info .notify-icon::after {
    opacity: 0.6;
}

.notify.info .notify-title {
    color: var(--cosmic-accent);
    text-shadow: 0 0 20px rgba(26, 93, 255, 0.4);
}

/* === COSMIC NOTIFICATION STATES === */

.notify.pulsing .notify-icon {
    animation: quantumPulse 1.5s ease-in-out infinite;
}

.notify.loading .notify-icon::after {
    opacity: 1;
    animation: quantumSpin 1s linear infinite;
}

.notify.auto-close::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, currentColor, transparent);
    border-radius: 0 0 var(--quantum-radius) var(--quantum-radius);
    animation: autoCloseProgress 5s linear forwards;
}

@keyframes autoCloseProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* === COSMIC NOTIFICATION STACK === */

.notify-stack {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notify-stack .notify {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.notify-stack .notify.show ~ .notify {
    transform: translateY(20px) scale(0.95);
    opacity: 0.8;
}

/* === COSMIC RESPONSIVE NOTIFICATIONS === */

@media (max-width: 768px) {
    .notify {
        max-width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        transform: translateY(100px) scale(0.95);
    }
    
    .notify.show {
        transform: translateY(0) scale(1);
        animation: quantumNotificationMobile 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    @keyframes quantumNotificationMobile {
        0% {
            transform: translateY(100px) scale(0.9);
            opacity: 0;
            filter: blur(10px);
        }
        100% {
            transform: translateY(0) scale(1);
            opacity: 1;
            filter: blur(0);
        }
    }
    
    .notify.hide {
        transform: translateY(100px) scale(0.9);
        opacity: 0;
        filter: blur(8px);
    }
    
    .notify-stack {
        right: 20px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .notify {
        padding: 1.25rem 1.5rem;
        border-radius: 20px;
    }
    
    .notify-content {
        gap: 0.875rem;
    }
    
    .notify-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .notify-title {
        font-size: 1rem;
    }
    
    .notify-message {
        font-size: 0.9rem;
    }
}

/* === COSMIC ACCESSIBILITY === */

@media (prefers-reduced-motion: reduce) {
    .notify {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .notify-icon::after,
    .notify.pulsing .notify-icon,
    .notify.auto-close::before {
        animation: none;
    }
}

/* === COSMIC INTERACTION ENHANCEMENTS === */

.notify.interactive {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notify.interactive:hover {
    transform: translateX(-8px) scale(1.02);
    box-shadow: var(--cosmic-shadow), 0 0 60px currentColor;
}

.notify.interactive:active {
    transform: translateX(-4px) scale(0.98);
}

/* === COSMIC NOTIFICATION UTILITIES === */

.notify-fade-in {
    animation: quantumFadeIn 0.5s ease-out;
}

.notify-slide-in {
    animation: quantumSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.notify-bounce-in {
    animation: quantumBounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes quantumBounceIn {
    0% {
        transform: translateX(500px) scale(0.3);
        opacity: 0;
    }
    50% {
        transform: translateX(-20px) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* === COSMIC MASTERPIECE COMPLETE === */