/* OurNextRead — Custom Styles */

/* Smooth transitions everywhere */
*, *::before, *::after {
    transition-property: color, background-color, border-color, box-shadow, transform, opacity;
    transition-duration: 150ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Remove transitions from layout properties that cause jank */
[class*="hidden"], [class*="block"] {
    transition: none;
}

/* Better focus rings */
:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

/* Card hover lift */
.card-hover {
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.08), 0 4px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e4e4e7;
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast animation */
.toast-enter {
    animation: slideIn 300ms ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Book cover placeholder */
.book-cover-placeholder {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Vote item interactive state */
.vote-item {
    cursor: pointer;
}
.vote-item:hover {
    border-color: #d8b4fe;
    background: #faf5ff;
}
.vote-item.selected {
    border-color: #a855f7;
    background: #faf5ff;
    box-shadow: 0 0 0 1px #a855f7;
}

/* Progress bar animation */
.progress-bar {
    transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle pulse for live elements */
.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Modal animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
