﻿
@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 100% 50%;
    }

    50% {
        background-position: 100% 100%;
    }

    75% {
        background-position: 0% 100%;
    }
}



@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Advanced Glass Effects */
.glass-morphism {
    background: linear-gradient(135deg, var(--glass-light) 0%, var(--glass-medium) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.125);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.glass-premium {
    background: linear-gradient(135deg, var(--glass-medium) 0%, var(--glass-heavy) 100%);
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

/* Book Cover 3D Effect */
.book-cover {
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
}

    .book-cover:hover {
        transform: rotateY(-15deg) rotateX(5deg) scale(1.05);
    }

    .book-cover::before {
        content: '';
        position: absolute;
        top: 0;
        left: -10px;
        width: 10px;
        height: 100%;
        background: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
        transform: rotateY(90deg);
        transform-origin: right;
    }

    .book-cover::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 100%;
        height: 10px;
        background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
        transform: rotateX(-90deg);
        transform-origin: top;
    }


/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.star {
    font-size: 1.5rem;
    color: #fbbf24;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .star:hover {
        transform: scale(1.2);
        filter: drop-shadow(0 0 8px #fbbf24);
    }

    .star.empty {
        color: rgba(255, 255, 255, 0.3);
    }

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    position: relative;
}

    .progress-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        animation: shimmer 2s infinite;
    }

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Tab System */
.tab-button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 1rem 2rem;
    border-radius: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .tab-button.active {
        color: white;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(20px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    }

    .tab-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--primary-gradient);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .tab-button.active::before {
        opacity: 1;
    }

    .tab-button span {
        position: relative;
        z-index: 1;
    }

    .tab-button:hover {
        color: white;
        transform: translateY(-2px);
    }

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

    .tab-content.active {
        display: block;
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Comment System */
.comment-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

    .comment-item:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }

/* Advanced Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

    .modal.show {
        opacity: 1;
        visibility: visible;
    }

.modal-content {
    background: var(--glass-heavy);
    backdrop-filter: blur(60px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(50px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

/* Advanced Notification */
.notification {
    position: fixed;
    top: 120px;
    right: 30px;
    background: var(--glass-heavy);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    padding: 1.5rem 2rem;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(4000px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    min-width: 300px;
}

    .notification.show {
        transform: translateX(0);
    }

    .notification.success {
        border-left: 4px solid #10b981;
    }

    .notification.error {
        border-left: 4px solid #ef4444;
    }

    .notification.info {
        border-left: 4px solid #3b82f6;
    }

/* Responsive Design */
@media (max-width: 768px) {
    .book-cover {
        max-width: 200px;
    }

 
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Advanced Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--secondary-gradient);
    }

/* Advanced Selection */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}

/* Advanced Focus */
*:focus {
    outline: none;
}

/* Book Info Cards */
.info-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    position: relative;
    overflow: hidden;
}

    .info-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
        pointer-events: none;
    }

    .info-card:hover {
        transform: translateY(-5px) scale(1.02);
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.25);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    }

/* Price Display */
.price-display {
    background: var(--primary-gradient);
    color: white;
    border-radius: 2rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 50px;
}

    .price-display::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        animation: priceShimmer 3s infinite;
    }

@keyframes priceShimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Author Card */
.author-card {
    background: var(--glass-medium);
    backdrop-filter: blur(40px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    padding: 2rem;
    transition: all 0.4s ease;
}

    .author-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    }

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.reading-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.3s ease;
}
