@keyframes pulse-soft {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.05); }
}

.animate-pulse-soft {
    animation: pulse-soft 8s infinite ease-in-out;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.glass {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-blue {
    background: rgba(30, 58, 138, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.window-shadow {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.taskbar-glass {
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
}

.taskbar-centered {
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 400px;
    max-width: 90vw;
    border-radius: 20px 20px 0 0;
    padding: 0 12px;
}

/* BIOS typing cursor */
.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    z-index: 10;
}

.resize-handle::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(59, 130, 246, 0.4);
    border-bottom: 2px solid rgba(59, 130, 246, 0.4);
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 72px) !important;
    border-radius: 0 !important;
}

.window.snap-tl {
    top: 0 !important;
    left: 0 !important;
    width: 50vw !important;
    height: calc((100vh - 72px)/2) !important;
    border-radius: 0 !important;
}

.window.snap-tr {
    top: 0 !important;
    left: 50vw !important;
    width: 50vw !important;
    height: calc((100vh - 72px)/2) !important;
    border-radius: 0 !important;
}

.window.snap-bl {
    top: calc((100vh - 72px)/2) !important;
    left: 0 !important;
    width: 50vw !important;
    height: calc((100vh - 72px)/2) !important;
    border-radius: 0 !important;
}

.window.snap-br {
    top: calc((100vh - 72px)/2) !important;
    left: 50vw !important;
    width: 50vw !important;
    height: calc((100vh - 72px)/2) !important;
    border-radius: 0 !important;
}

.window.snap-left {
    top: 0 !important;
    left: 0 !important;
    width: 50vw !important;
    height: calc(100vh - 72px) !important;
    border-radius: 0 !important;
}

.window.snap-right {
    top: 0 !important;
    left: 50vw !important;
    width: 50vw !important;
    height: calc(100vh - 72px) !important;
    border-radius: 0 !important;
}

.window.minimized {
    display: none;
}

.window.interacting {
    transition: none !important;
    border-color: rgba(59, 130, 246, 0.8) !important;
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.3) !important;
    opacity: 0.9 !important;
}

.context-menu {
    position: fixed;
    z-index: 1000;
    min-width: 220px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.context-menu-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
}

.context-menu-item:hover {
    background: rgba(59, 130, 246, 0.2);
    color: white;
}

/* Live Tiles & Animations */
.live-tile-medium {
    transition: transform 0.3s ease, filter 0.3s ease;
}
.live-tile-medium:hover {
    transform: scale(1.02);
    filter: brightness(1.2);
}

@keyframes slide-in-right {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-left {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-bottom {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-in {
    animation-duration: 0.3s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-from-bottom-4 { animation-name: slide-in-bottom; }
.slide-in-from-left-4 { animation-name: slide-in-left; }
.slide-in-from-right-4 { animation-name: slide-in-right; }

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fade-in 0.5s ease-out both;
}

/* Mica/Acrylic Refinement */
.glass-mica {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Widgets Board styles */
#widgets-board {
    z-index: 70;
}

/* Scrollbar refinement */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 16px;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification-toast.show {
    transform: translateX(0);
}

.snap-preview {
    position: fixed;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.5);
    z-index: 9999;
    pointer-events: none;
    transition: all 0.2s;
    opacity: 0;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.2);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.4);
}
