/* Modern UI Enhancements - Book Store Elite */

/* Glassmorphism Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Advanced Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(76, 175, 80, 0.5),
                    0 0 10px rgba(76, 175, 80, 0.3),
                    0 0 15px rgba(76, 175, 80, 0.1);
    }
    50% { 
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.8),
                    0 0 20px rgba(76, 175, 80, 0.5),
                    0 0 30px rgba(76, 175, 80, 0.3);
    }
}

@keyframes slide-in-bounce {
    0% { 
        transform: translateX(-100%) scale(0.5);
        opacity: 0;
    }
    60% { 
        transform: translateX(10%) scale(1.05);
        opacity: 1;
    }
    80% { 
        transform: translateX(-5%) scale(0.95);
    }
    100% { 
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Neumorphism Cards */
.neumorphic-card {
    background: #f0f0f0;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 20px 20px 60px #bebebe,
                -20px -20px 60px #ffffff;
    transition: all 0.3s ease;
}

.neumorphic-card:hover {
    box-shadow: inset 20px 20px 60px #bebebe,
                inset -20px -20px 60px #ffffff;
}

/* 3D Book Effect */
.book-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.book-3d:hover {
    transform: rotateY(10deg) rotateX(-5deg);
}

.book-spine {
    position: absolute;
    left: -20px;
    top: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, #333 0%, #555 100%);
    transform: rotateY(-90deg) translateZ(10px);
}

/* Liquid Button Effect */
.liquid-button {
    position: relative;
    padding: 20px 40px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
}

.liquid-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.liquid-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Particle Background */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--secondary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 20s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Morphing Search Bar */
.search-morph {
    position: relative;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 60px;
    transition: all 0.5s;
    box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.1);
}

.search-morph.active {
    width: 400px;
}

.search-morph input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    outline: none;
    padding: 0 20px;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.5s;
}

.search-morph.active input {
    opacity: 1;
}

/* Gradient Text Animation */
.gradient-text {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #667eea 100%);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 10s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Parallax Scroll Effects */
.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.parallax-layer-1 {
    transform: translateZ(-1px) scale(2);
}

.parallax-layer-2 {
    transform: translateZ(-2px) scale(3);
}

.parallax-layer-3 {
    transform: translateZ(-3px) scale(4);
}

/* Hover Card Tilt Effect */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.3s;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(-10deg);
}

/* Loading Skeleton */
.skeleton {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    animation: skeleton-wave 1.5s infinite;
}

@keyframes skeleton-wave {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Magnetic Button Effect */
.magnetic-button {
    position: relative;
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 30px;
    transition: all 0.3s;
    overflow: hidden;
}

.magnetic-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s;
}

.magnetic-button:hover::before {
    transform: translate(-50%, -50%) scale(2);
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    z-index: 9999;
    transition: width 0.1s;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}

/* Tooltip Effects */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Book Page Flip Animation */
.book-flip {
    position: relative;
    width: 200px;
    height: 300px;
    transform-style: preserve-3d;
    transition: transform 1s;
}

.book-flip:hover {
    transform: rotateY(180deg);
}

.book-front,
.book-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.book-back {
    transform: rotateY(180deg);
}

/* Neon Glow Effect */
.neon-glow {
    color: #fff;
    text-shadow: 0 0 10px currentColor,
                 0 0 20px currentColor,
                 0 0 30px currentColor,
                 0 0 40px currentColor;
    animation: neon-flicker 2s infinite;
}

@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Responsive Grid with Animation */
.animated-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

.grid-item {
    opacity: 0;
    transform: translateY(50px);
    animation: grid-appear 0.6s forwards;
}

.grid-item:nth-child(1) { animation-delay: 0.1s; }
.grid-item:nth-child(2) { animation-delay: 0.2s; }
.grid-item:nth-child(3) { animation-delay: 0.3s; }
.grid-item:nth-child(4) { animation-delay: 0.4s; }
.grid-item:nth-child(5) { animation-delay: 0.5s; }
.grid-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes grid-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Advanced Hover Effects */
.hover-lift {
    transition: all 0.3s;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hover-rotate {
    transition: all 0.3s;
}

.hover-rotate:hover {
    transform: rotate(5deg) scale(1.05);
}

/* Gradient Border Animation */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 15px;
    padding: 3px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff0080);
    background-size: 400% 400%;
    border-radius: 15px;
    z-index: -1;
    animation: gradient-border-animation 20s ease infinite;
}

@keyframes gradient-border-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
} 