/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}

.dark ::-webkit-scrollbar-thumb {
    background: #064e3b;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #065f46;
}

/* Scrollbar hide utility */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

.fade-in-up {
    animation: fadeInUp 0.5s ease-out both;
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out both;
}

.slide-in-left {
    animation: slideInLeft 0.4s ease-out both;
}

/* Surah card hover effects */
.surah-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.surah-card:hover {
    transform: translateY(-2px);
}

.surah-card:active {
    transform: translateY(0) scale(0.98);
}

/* Ayah styling */
.ayah-block {
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

.ayah-block:hover {
    background: rgba(16, 185, 129, 0.08);
}

.dark .ayah-block:hover {
    background: rgba(16, 185, 129, 0.12);
}

.ayah-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Playing indicator */
@keyframes eq-bar {
    0%, 100% { height: 4px; }
    50% { height: 16px; }
}

.eq-bar {
    width: 3px;
    background: #10b981;
    border-radius: 2px;
    animation: eq-bar 0.8s ease-in-out infinite;
}

.eq-bar:nth-child(2) { animation-delay: 0.2s; }
.eq-bar:nth-child(3) { animation-delay: 0.4s; }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

/* Ornamental separator */
.ornament-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2rem 0;
}

.ornament-separator::before,
.ornament-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, transparent, #d1fae5, transparent);
}

.dark .ornament-separator::before,
.dark .ornament-separator::after {
    background: linear-gradient(to left, transparent, #065f46, transparent);
}

.ornament-separator .icon {
    color: #10b981;
    font-size: 1.2rem;
}

/* Active playing glow */
.now-playing-glow {
    animation: pulse-glow 2s infinite;
}

/* Responsive font sizes */
@media (max-width: 640px) {
    .ayah-text {
        font-size: 1.4rem !important;
        line-height: 2.4 !important;
    }
}

@media (min-width: 641px) {
    .ayah-text {
        font-size: 1.75rem;
        line-height: 2.6;
    }
}

/* Surah number badge */
.surah-number {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.surah-number::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    transform: rotate(45deg);
    border-radius: 6px;
}

.dark .surah-number::before {
    background: linear-gradient(135deg, #064e3b, #065f46);
}

.surah-number span {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 0.85rem;
    color: #059669;
}

.dark .surah-number span {
    color: #6ee7b7;
}

/* Filter button active state */
.active-filter {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Body transitions */
body {
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Selection */
::selection {
    background: #a7f3d0;
    color: #064e3b;
}

.dark ::selection {
    background: #065f46;
    color: #d1fae5;
}

/* Heart bookmark animation */
@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.heart-pop {
    animation: heartPop 0.3s ease;
}

/* Audio progress hover */
#progressBar:hover #progressFill {
    height: 6px;
}