/* General Page Transitions */
#content {
    opacity: 0;
    transition: opacity 0.3s ease;
}
#content.loaded {
    opacity: 1;
}

/* Blob Canvas and Glass Overlay */
#blob-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#glass-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    backdrop-filter: blur(80px) saturate(1.4);
    pointer-events: none;
}

/* Navbar & Responsive Dropdown */
nav {
    position: relative;
    z-index: 10;
}

#mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0d0f14;
    border-bottom: 1px solid #2a2f3d;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: top;
    pointer-events: none;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Content Positioning */
#content {
    position: relative;
    z-index: 2;
}

/* Mod Panel Animation */
#mod-panel {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0);
    align-items: center;
    justify-content: center;
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
    backdrop-filter: blur(0px);
}

#mod-panel.open {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

#mod-panel-inner {
    background: #11141b;
    border: 1px solid #2a2f3d;
    border-radius: 12px;
    width: 90%;
    max-width: 960px;
    height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 0;
    transform: scale(0.85) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#mod-panel.open #mod-panel-inner {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Mod Panel Elements */
#panel-main-img {
    transition: opacity 0.3s ease;
}

.panel-thumb {
    height: 70px;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.15s, opacity 0.15s;
    opacity: 0.7;
}
.panel-thumb:hover, .panel-thumb.active {
    border-color: var(--accent-color, #2596be); /* Use CSS variable for accent */
    opacity: 1;
}

.version-btn-primary {
    background: var(--accent-color, #2596be);
    color: #0d0f14;
    transition: background 0.2s;
}
.version-btn-primary:hover { background: #d4dfad; }

.version-btn-secondary {
    background: transparent;
    color: #9ca3af;
    border: 1px solid #2a2f3d;
    transition: all 0.2s;
}
.version-btn-secondary:hover {
    border-color: var(--accent-color, #2596be);
    color: white;
}

.close-btn {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(30, 35, 48, 0.8);
    border: 1px solid #2a2f3d;
    color: #6b7280;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 100;
}
.close-btn:hover { color: white; border-color: #6b7280; }

.filter-btn.active {
    border-color: var(--accent-color, #2596be);
    color: var(--accent-color, #2596be);
}

/* Custom Scrollbar */
.custom-scroll::-webkit-scrollbar { width: 4px; height: 4px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: #2a2f3d; border-radius: 2px; }

/* Lazy loading for images */
img[loading="lazy"] {
    transition: opacity 0.3s ease-in-out;
    background: #0d0f14; /* Show a dark background while loading */
}


img[loading="lazy"].loaded {
    background: transparent;
}

img[loading="lazy"]:not(.loaded) {
    opacity: 0.5;
}

@keyframes giggle {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2px, -2px) rotate(1deg); }
    50% { transform: translate(-2px, 2px) rotate(-1deg); }
    75% { transform: translate(2px, 2px) rotate(1deg); }
}
.giggle-hover:hover {
    animation: giggle 0.3s infinite;
}