/* ========================================================================== */
/* ======================== Components CSS (Moved from JS) ================== */
/* ========================================================================== */

/* --- Notifications --- */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    z-index: 9999;
    max-width: 400px;
    animation: slideInRight 0.3s ease forwards;
}

.notification.notification-success {
    background: #34a853; /* Green */
}

.notification.notification-error {
    background: #ea4335; /* Red */
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
    padding: 0;
}
.notification-close:hover {
    opacity: 1;
}

.notification.slide-out {
    animation: slideOutRight 0.3s ease forwards;
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary); /* Assumes --primary CSS variable is defined */
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none; /* Prevents interaction when hidden */
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto; /* Allows interaction when visible */
}

/* --- Particles Canvas --- */
#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.45;
    z-index: -1;
}

body {
    position: relative;
}

/* --- Typewriter Effect --- */
.typewriter.typewriter-active {
    border-right: 3px solid var(--primary); /* Assumes --primary CSS variable is defined */
}
.typewriter.typewriter-typed {
    border-right: none;
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary)); /* Assumes CSS variables are defined */
    z-index: 9999;
    transition: width 0.1s ease;
}

/* --- Lazy Loading Images --- */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* --- Keyframe Animations (for notifications) --- */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
