/* CSS Khusus untuk Perpustakaan */

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.1;
}

/* Glass Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Book Cards */
.book-card {
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.book-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.book-card:hover .book-cover {
    transform: rotateY(10deg) scale(1.05);
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.3);
}

.book-cover {
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: left center;
}

/* Category Badges */
.category-badge {
    transition: all 0.3s ease;
}

.category-badge:hover {
    transform: translateY(-2px);
    background-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.category-badge.active {
    background-color: rgba(14, 165, 233, 0.4);
    border: 1px solid rgba(14, 165, 233, 0.6);
    transform: translateY(-2px);
}

/* Search Highlight */
.search-highlight {
    background-color: rgba(14, 165, 233, 0.3);
    padding: 0 2px;
    border-radius: 2px;
}

/* Floating Elements */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    animation-delay: 1s;
}

.floating-element:nth-child(3) {
    animation-delay: 2s;
}

/* Animations */
.page-turn {
    animation: bookOpen 1.2s ease-out forwards;
}

.stat-card {
    transition: all 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.hero-gradient {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(15, 23, 42, 0.9) 70%);
}

/* Pulse Glow Effect */
.pulse-glow {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(14, 165, 233, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
    }
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 3px solid #0ea5e9;
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #0ea5e9 }
}

/* Book Spine */
.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: linear-gradient(to right, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
    border-radius: 2px 0 0 2px;
}

/* Breathing Glow */
.breathing-glow {
    animation: breathing 4s ease-in-out infinite;
}

@keyframes breathing {
    0%, 100% { box-shadow: 0 0 10px rgba(14, 165, 233, 0.5); }
    50% { box-shadow: 0 0 20px rgba(14, 165, 233, 0.8), 0 0 30px rgba(14, 165, 233, 0.4); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .book-card {
        max-width: 100%;
    }
    
    .hero-gradient {
        background: linear-gradient(135deg, rgba(14, 165, 233, 0.3) 0%, rgba(15, 23, 42, 0.95) 100%);
    }
}

/* Line Clamp Utilities */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}