/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    text-align: center;
    position: relative;
}

.loader-circle {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top: 6px solid #ffffff;
    border-right: 6px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.loader-text {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke: #10b981;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #10b981;
    stroke-width: 3;
    fill: none;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

/* Confetti animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Modal animations */
.modal.fade .modal-dialog {
    transform: scale(0.8);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* Toast notification */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-notification {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Cursor trail effect */
.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    pointer-events: none;
    opacity: 0.6;
    animation: cursorFade 0.5s ease-out forwards;
}

@keyframes cursorFade {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* Scroll progress bar */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 9998;
    transition: width 0.1s ease;
}

/* Page transition */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 9997;
    transform: translateX(-100%);
}

.page-transition.active {
    animation: pageSlide 0.6s ease-in-out;
}

@keyframes pageSlide {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Text highlight animation */
.highlight-animation {
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    background-size: 200% 100%;
    animation: highlight 2s ease-in-out infinite;
}

@keyframes highlight {
    0%, 100% {
        background-position: 200% 0;
    }
    50% {
        background-position: -200% 0;
    }
}

/* Button group animation */
.btn-group-animated .btn {
    opacity: 0;
    transform: translateY(20px);
    animation: btnSlideUp 0.5s ease-out forwards;
}

.btn-group-animated .btn:nth-child(1) {
    animation-delay: 0.1s;
}

.btn-group-animated .btn:nth-child(2) {
    animation-delay: 0.2s;
}

.btn-group-animated .btn:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes btnSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card stack effect */
.card-stack {
    position: relative;
}

.card-stack::before,
.card-stack::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    z-index: -1;
}

.card-stack::before {
    top: 5px;
    left: 5px;
    opacity: 0.7;
}

.card-stack::after {
    top: 10px;
    left: 10px;
    opacity: 0.4;
}

/* Typewriter cursor */
.typing-cursor {
    display: inline-block;
    width: 3px;
    background: currentColor;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}
