/* Animations for the NTA Mock Test Platform */

/* Spinning animation for loading */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin {
    animation: spin 1.5s linear infinite;
    display: inline-block;
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Scale up animation */
@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.scale-up {
    animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Slide in animation */
@keyframes slideInUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.slide-in-up {
    animation: slideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Ripple animation (improved) */
.ripple {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}

.ripple:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.6s, opacity 0.8s;
}

.ripple:active:after {
    transform: scale(0, 0);
    opacity: 0.4;
    transition: 0s;
}

/* Button hover effect */
.button-hover-effect {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.button-hover-effect:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.button-hover-effect:active {
    transform: scale(0.98);
}

/* Pulse animation for highlighting */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(26, 115, 232, 0); }
    100% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Screen transition animations - FIXED */
.screen {
    display: none;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    transition: none;
}

.screen.active {
    display: block;
    opacity: 1;
    position: fixed;
    z-index: 1;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Bounce effect */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.bounce {
    animation: bounce 1s;
}

/* Material You Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}
