/* Quran Player & Reader Styles */
:root {
    --primary-color: #B1901F;
    --secondary-color: #C9A835;
    --accent-color: #B1901F;
    --gold-color: #B1901F;
    --text-dark: #000000;
    --text-light: #666;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation Styles */
.quran-navigation {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1001;
    box-shadow: var(--shadow-medium);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 2px solid transparent;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: var(--transition);
}

.nav-item:hover::before {
    left: 100%;
}

.nav-item:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-item.active {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
    box-shadow: var(--shadow-light);
}

.nav-item.active:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.nav-icon {
    flex-shrink: 0;
}

/* Section Management */
.read-quran-section,
.islamic-books-section {
    min-height: 100vh;
    padding-top: 2rem;
}

/* Tab Styles */
.selection-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 1rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(44, 85, 48, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    background: rgba(44, 85, 48, 0.1);
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

/* Parahs Grid */
.parahs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.parah-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.parah-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--gold-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.parah-card:hover::before {
    transform: scaleX(1);
}

.parah-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.parah-number {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0 auto 1rem auto;
}

.parah-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.parah-arabic {
    font-size: 1rem;
    color: var(--secondary-color);
    direction: rtl;
    text-align: center;
    font-weight: 500;
}

/* Page Viewer Styles */
.page-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.page-viewer-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-navigation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--background-light);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--accent-color);
}

.page-label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.page-input {
    width: 60px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    color: var(--text-dark);
    background: var(--white);
    transition: var(--transition);
}

.page-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.page-total {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.go-to-page-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--white);
}

.go-to-page-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Mobile responsiveness for page navigation */
@media (max-width: 768px) {
    .page-viewer-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .page-navigation {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .page-input {
        width: 50px;
    }

    .control-btn {
        width: 45px;
        height: 45px;
    }

    .keyboard-hint {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
}

/* Keyboard hint styling */
.keyboard-hint {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-info {
    font-weight: 500;
    color: var(--text-dark);
    min-width: 100px;
    text-align: center;
}

.page-viewer-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 2rem;
    text-align: center;
}

.page-image-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.quran-page-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.quran-page-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.page-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

/* Format Cards (Similar to Reciter Cards) */
.format-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.format-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--gold-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.format-card:hover::before {
    transform: scaleX(1);
}

.format-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.format-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.format-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.format-pages {
    background: var(--accent-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.8rem;
}

.format-ext {
    background: var(--gold-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.8rem;
}

.select-format-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.select-format-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Selected Format Info */
.selected-format-info {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    text-align: center;
}

.selected-format-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.format-details {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Coming Soon Styles */
.coming-soon-container {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin: 2rem 0;
}

.coming-soon-icon {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.coming-soon-container h3 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.coming-soon-container p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.features-list {
    list-style: none;
    padding: 0;
    max-width: 400px;
    margin: 0 auto 2rem auto;
}

.features-list li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

/* Additional responsive styles for new features */
/* Mobile Menu Toggle Button (Hidden on desktop) */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

/* Mobile Navbar Title (Hidden on desktop) */
.mobile-nav-title {
    display: none;
}

.mobile-nav-title .site-title {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Mobile Menu Close Button (Hidden on desktop) */
.mobile-menu-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    z-index: 1002;
}

.mobile-menu-close:hover {
    transform: scale(1.1);
}

/* Navigation Overlay (Hidden on desktop) */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {

    /* Show hamburger button on mobile */
    .mobile-menu-toggle {
        display: block;
    }

    /* Show mobile navbar title on mobile */
    .mobile-nav-title {
        display: block;
        flex: 1;
        text-align: center;
    }

    /* Show close button on mobile when menu is open */
    .nav-menu.active .mobile-menu-close {
        display: block;
    }

    /* Navigation container adjustments */
    .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Transform nav-menu into sidebar */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        flex-direction: column;
        gap: 0;
        padding: 4rem 0 2rem 0;
        overflow-y: auto;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        justify-content: flex-start;
        align-items: stretch;
    }

    /* Show sidebar when active */
    .nav-menu.active {
        left: 0;
    }

    /* Nav items in sidebar */
    .nav-item {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        border-radius: 0;
        border-left: 4px solid transparent;
        justify-content: flex-start;
        text-align: left;
        margin: 0;
        background: transparent;
        border: none;
        border-left: 4px solid transparent;
    }

    .nav-item:hover {
        border-left-color: var(--white);
        background: rgba(255, 255, 255, 0.1);
        transform: translateX(5px);
    }

    .nav-item.active {
        background: rgba(255, 255, 255, 0.2);
        border-left-color: var(--gold-color);
        color: var(--white);
    }

    .nav-item.active:hover {
        transform: translateX(5px);
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    .selection-tabs {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .tab-btn {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }

    .page-viewer-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .parahs-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

* {
    box-sizing: border-box;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: var(--text-light);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--background-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Main Container */
.quran-player-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header */
.quran-header {
    text-align: center;
    margin-bottom: 3rem;
}

.main-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 300;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb-item {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.breadcrumb-item.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--text-light);
}

/* Back Button */
.back-section {
    margin-bottom: 2rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.back-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Search Container */
.search-container {
    position: relative;
    margin-bottom: 2rem;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: var(--white);
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

/* Reciters Grid */
.reciters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.reciter-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.reciter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--gold-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.reciter-card:hover::before {
    transform: scaleX(1);
}

.reciter-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.reciter-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.reciter-arabic {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-weight: 500;
    direction: rtl;
    text-align: right;
}

.reciter-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.reciter-letter {
    background: var(--accent-color);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.play-preview-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.play-preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Selected Reciter Info */
.selected-reciter-info {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff !important;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    text-align: center;
}

.selected-reciter-info h2,
.selected-reciter-info #selected-reciter-name {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.reciter-details,
.reciter-details *,
#selected-reciter-arabic,
#selected-reciter-count {
    font-size: 1.1rem;
    opacity: 0.9;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.divider {
    margin: 0 1rem;
}

/* Surahs Controls */
.surahs-controls {
    margin-bottom: 2rem;
}

/* Surahs Grid */
.surahs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.surah-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.surah-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.surah-number {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.surah-info {
    flex: 1;
}

.surah-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.surah-arabic {
    font-size: 1rem;
    color: var(--secondary-color);
    direction: rtl;
    text-align: right;
    font-weight: 500;
}

/* Audio Player */
.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid #e0e0e0;
    padding: 1.5rem;
    box-shadow: var(--shadow-heavy);
    z-index: 1000;
}

.player-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.player-info h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.player-info p {
    color: var(--text-light);
    margin: 0;
    font-size: 1rem;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.control-btn {
    background: var(--background-light);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dark);
}

.control-btn:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: scale(1.1);
}

.control-btn:disabled,
.control-btn.disabled {
    background-color: #e0e0e0;
    color: #bbb;
    cursor: not-allowed;
    opacity: 0.5;
}

.control-btn:disabled:hover,
.control-btn.disabled:hover {
    background-color: #e0e0e0;
    color: #bbb;
    transform: none;
}

.play-pause-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
}

.play-pause-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-heavy);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--gold-color));
    border-radius: 3px;
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 12px;
    height: 12px;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(50%, -50%);
    opacity: 0;
    transition: var(--transition);
}

.progress-bar:hover .progress-fill::after {
    opacity: 1;
}

.progress-container span {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    min-width: 40px;
}

.volume-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.volume-icon {
    color: var(--text-light);
}

.volume-slider {
    width: 100px;
    height: 4px;
    border-radius: 2px;
    background: #e0e0e0;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-light);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .quran-player-container {
        padding: 1rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .reciters-grid,
    .surahs-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .audio-player {
        padding: 1rem;
    }

    .player-controls {
        gap: 0.75rem;
    }

    .control-btn {
        width: 45px;
        height: 45px;
    }

    .play-pause-btn {
        width: 60px;
        height: 60px;
    }

    .progress-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .volume-container {
        margin-top: 0.5rem;
    }

    .volume-slider {
        width: 150px;
    }

    .search-container {
        max-width: 100%;
    }

    .selected-reciter-info {
        padding: 1.5rem;
    }

    .selected-reciter-info h2 {
        font-size: 1.5rem;
    }

    .breadcrumb {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .reciter-card {
        padding: 1rem;
    }

    .surah-card {
        padding: 1rem;
    }

    .reciter-name {
        font-size: 1.1rem;
    }

    .surah-name {
        font-size: 1rem;
    }

    .player-info h3 {
        font-size: 1.1rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

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

.slide-up {
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.5s ease-out forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Accessibility */
.control-btn:focus,
.play-pause-btn:focus,
.reciter-card:focus,
.surah-card:focus,
.back-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Islamic Books Styles */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.book-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.book-cover {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.book-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.book-card:hover .book-cover-image {
    transform: scale(1.05);
}

.book-pages-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.book-details {
    padding: 1rem;
}

.book-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.book-type {
    font-size: 0.8rem;
    color: var(--text-light);
    background: var(--background-light);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.book-format {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-color);
    background: rgba(212, 175, 55, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.select-book-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.select-book-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-1px);
}

/* Book Pages Grid */
.selected-book-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

/* Override for hadith section - green background */
#hadith-chapters-section .selected-book-info,
#hadith-app .selected-book-info,
.hadith-section .selected-book-info {
    background: linear-gradient(135deg, #2c5530, #4a7c4e) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.selected-book-info h2 {
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

/* White text for hadith section headers */
#hadith-chapters-section .selected-book-info h2,
#hadith-app .selected-book-info h2,
.hadith-section .selected-book-info h2,
#selected-hadith-book-name {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* White text for all hadith section book info elements */
#hadith-chapters-section .selected-book-info *,
#hadith-app .selected-book-info *,
.hadith-section .selected-book-info *,
#selected-hadith-book-arabic,
#selected-hadith-book-author,
.book-details {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Apply same styling to chapter and sub-chapter info sections */
.selected-chapter-info,
.selected-sub-chapter-info {
    background: linear-gradient(135deg, #2c5530, #4a7c4e) !important;
    color: #ffffff !important;
    padding: 1.5rem !important;
    border-radius: 8px !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    text-align: center !important;
}

.selected-chapter-info *,
.selected-sub-chapter-info * {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.book-meta-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pages-count {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.book-type {
    background: var(--gold-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.book-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.page-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
}

.page-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.page-thumbnail {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.page-thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.page-card:hover .page-thumb-image {
    transform: scale(1.05);
}

.page-number-overlay {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.page-info {
    padding: 0.75rem;
    text-align: center;
}

.page-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Responsive adjustments for books */
@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }

    .book-pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .selected-book-info {
        padding: 1rem;
    }

    .selected-book-info h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .book-pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .book-meta-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Print Styles */
@media print {

    .audio-player,
    .player-controls,
    .back-btn {
        display: none !important;
    }
}

/* Specific White Text Override ONLY for Green Background Elements */
.quran-navigation,
.nav-item:not(.active),
.nav-item:not(.active) *,
.selected-reciter-info,
.selected-reciter-info *,
.selected-reciter-info h2,
.selected-reciter-info p,
.selected-reciter-info span,
#selected-reciter-name,
#selected-reciter-arabic,
#selected-reciter-count,
.reciter-details,
.reciter-details * {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Reset main content text to dark colors - Override white text */
.quran-header .main-title {
    color: var(--primary-color) !important;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: none !important;
}

.quran-header .subtitle {
    color: var(--text-light) !important;
    text-shadow: none !important;
}

.breadcrumb .breadcrumb-item {
    color: var(--text-light) !important;
    text-shadow: none !important;
}

.breadcrumb-item.active {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    text-shadow: none !important;
}

.section h2,
.section p,
.book-grid .book-item h3,
.book-grid .book-item p,
.book-meta-info h3,
.book-meta-info p,
.book-count,
.read-format-description,
.tab-btn,
.tab-btn *,
.selection-tabs .tab-btn,
.format-grid .format-item h3,
.format-grid .format-item p {
    color: var(--text-dark) !important;
    text-shadow: none !important;
}

/* Specific fix for tab buttons */
.tab-btn.active {
    color: var(--white) !important;
    background: var(--primary-color) !important;
}

.tab-btn.active * {
    color: var(--white) !important;
}

/* Fix for active navigation items - dark text on white background */
.nav-item.active,
.nav-item.active *,
.nav-item.active svg {
    color: var(--primary-color) !important;
    text-shadow: none !important;
    background: var(--white) !important;
}

.nav-item.active svg {
    stroke: var(--primary-color) !important;
}

/* Universal Fix: Any element with white background should have dark text */
*[style*="background: var(--white)"],
*[style*="background-color: white"],
*[style*="background-color: #ffffff"],
*[style*="background: white"],
*[style*="background: #ffffff"],
.back-btn,
.search-input,
.card,
.modal,
.popup,
.reciter-card,
.surah-item,
.book-item,
.format-item {
    color: var(--text-dark) !important;
    text-shadow: none !important;
}

/* Exception: Hadith headers should maintain white text on green background */
.individual-hadith-header,
.individual-hadith-header *,
#individual-hadith-book-title {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

*[style*="background: var(--white)"] *,
*[style*="background-color: white"] *,
*[style*="background-color: #ffffff"] *,
*[style*="background: white"] *,
*[style*="background: #ffffff"] * {
    color: var(--text-dark) !important;
    text-shadow: none !important;
}

/* Specific Override for Critical Elements */
.selected-reciter-info h2#selected-reciter-name,
.selected-reciter-info span#selected-reciter-arabic,
.selected-reciter-info span#selected-reciter-count {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
}

/* Fix Reciter Grid Items - Black text for count + Surahs */
.reciter-card .reciter-details,
.reciter-card .reciter-details *,
.reciter-card .reciter-details span,
.reciters-grid .reciter-card .reciter-details,
.reciters-grid .reciter-details,
.reciter-card .reciter-count,
.reciter-card .surah-count,
.reciter-count,
span.reciter-count,
.reciters-grid .reciter-count,
.reciters-grid span.reciter-count {
    color: #000000 !important;
    text-shadow: none !important;
}

/* Ensure reciter card backgrounds stay white */
.reciter-card {
    background: var(--white) !important;
}

/* Fix for Read Quran selected format info - White text on green background */
.selected-format-info,
.selected-format-info *,
.selected-format-info h2,
.selected-format-info p,
.selected-format-info span,
#selected-format-name,
#selected-format-count,
#selected-format-type,
.format-details,
.format-details * {
    color: var(--white) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Format pages badge with dark green background */
.format-pages {
    background-color: #B1901F !important;
    /* Dark green background */
    color: var(--white) !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 12px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    display: inline-block !important;
}

/* ===== HADITH SYSTEM STYLES ===== */

/* Hadith App Section */
.hadith-app {
    min-height: 100vh;
    padding: 2rem 0;
    background: var(--background-light);
}

/* Hadith Books Grid */
.hadith-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Hadith Book Card - Ultra Eye-Catching Design */
.hadith-book-card {
    background: linear-gradient(145deg,
            #ffffff 0%,
            #f8fffe 30%,
            #f0fdf4 60%,
            #ecfdf5 100%);
    border-radius: 25px;
    padding: 3rem;
    box-shadow:
        0 20px 60px rgba(44, 85, 48, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 0 1px rgba(44, 85, 48, 0.05);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    border: 2px solid transparent;
}

/* Stunning Islamic Pattern Background */
.hadith-book-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 30%, rgba(44, 85, 48, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(196, 167, 71, 0.06) 0%, transparent 40%),
        conic-gradient(from 0deg at 50% 50%,
            rgba(44, 85, 48, 0.02) 0deg,
            transparent 60deg,
            rgba(196, 167, 71, 0.02) 120deg,
            transparent 180deg,
            rgba(44, 85, 48, 0.02) 240deg,
            transparent 300deg,
            rgba(196, 167, 71, 0.02) 360deg);
    background-size: 80px 80px, 60px 60px, 120px 120px;
    opacity: 0;
    transition: all 0.6s ease;
    animation: rotate 20s linear infinite;
    z-index: 0;
}

/* Glowing Border Animation */
.hadith-book-card::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg,
            var(--primary-color) 0%,
            var(--gold-color) 25%,
            var(--primary-color) 50%,
            var(--gold-color) 75%,
            var(--primary-color) 100%);
    background-size: 300% 300%;
    border-radius: 28px;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientRotate 3s ease-in-out infinite;
    z-index: -1;
}

.hadith-book-card:hover::before {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
}

.hadith-book-card:hover::after {
    opacity: 1;
}

.hadith-book-card:hover {
    transform: translateY(-20px) scale(1.03) rotateX(8deg);
    box-shadow:
        0 35px 80px rgba(44, 85, 48, 0.3),
        0 15px 40px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 0 3px rgba(44, 85, 48, 0.1);
    border-color: rgba(44, 85, 48, 0.2);
}

.hadith-book-card:active {
    transform: translateY(-15px) scale(1.02) rotateX(5deg);
    transition: all 0.2s ease;
}

/* Content positioning */
.hadith-book-card>* {
    position: relative;
    z-index: 1;
}

.hadith-book-title {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg,
            var(--primary-color) 0%,
            #10b981 25%,
            var(--gold-color) 50%,
            #f59e0b 75%,
            var(--secondary-color) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    position: relative;
    animation: gradientText 4s ease-in-out infinite;
}

.hadith-book-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--primary-color) 0%,
            var(--gold-color) 50%,
            var(--primary-color) 100%);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hadith-book-card:hover .hadith-book-title::after {
    width: 100%;
}

.hadith-book-arabic {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-weight: 800;
    direction: rtl;
    text-align: right;
    line-height: 1.4;
    font-family: 'Amiri', 'Scheherazade New', serif;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.hadith-book-arabic::before {
    content: '✦';
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--gold-color);
    opacity: 0;
    transition: all 0.4s ease;
}

.hadith-book-card:hover .hadith-book-arabic::before {
    opacity: 1;
    transform: translateY(-50%) rotate(180deg);
}

.hadith-book-description {
    font-size: 1.1rem;
    color: rgba(44, 85, 48, 0.8);
    margin-bottom: 2rem;
    line-height: 1.8;
    font-weight: 500;
    position: relative;
    padding-left: 1rem;
}

.hadith-book-description::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color), var(--gold-color));
    border-radius: 2px;
    transform: scaleY(0);
    transition: transform 0.5s ease;
}

.hadith-book-card:hover .hadith-book-description::before {
    transform: scaleY(1);
}

.hadith-book-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0 0 0;
    border-top: 3px solid transparent;
    background: linear-gradient(90deg,
            rgba(44, 85, 48, 0.1) 0%,
            rgba(196, 167, 71, 0.1) 50%,
            rgba(44, 85, 48, 0.1) 100%);
    border-image: linear-gradient(90deg,
            transparent 0%,
            var(--primary-color) 20%,
            var(--gold-color) 50%,
            var(--primary-color) 80%,
            transparent 100%) 1;
    position: relative;
    border-radius: 15px;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.hadith-book-stats::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--gold-color), var(--primary-color));
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 2px;
}

.hadith-book-card:hover .hadith-book-stats::before {
    width: 100%;
}

.hadith-stats-item {
    text-align: center;
    position: relative;
    padding: 1.2rem;
    border-radius: 20px;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(44, 85, 48, 0.05) 100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex: 1;
    margin: 0 0.8rem;
    border: 2px solid rgba(44, 85, 48, 0.08);
    backdrop-filter: blur(10px);
}

.hadith-book-card:hover .hadith-stats-item {
    background: linear-gradient(145deg,
            rgba(44, 85, 48, 0.1) 0%,
            rgba(196, 167, 71, 0.08) 100%);
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(44, 85, 48, 0.2);
    box-shadow: 0 10px 25px rgba(44, 85, 48, 0.15);
}

.hadith-stats-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg,
            var(--primary-color) 0%,
            var(--gold-color) 50%,
            var(--secondary-color) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
    line-height: 1;
    animation: gradientText 3s ease-in-out infinite;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hadith-stats-label {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.hadith-stats-label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gold-color);
    transition: width 0.4s ease;
}

.hadith-book-card:hover .hadith-stats-label::after {
    width: 60%;
}

/* Hadith Chapters Grid */
.hadith-chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Hadith Chapter Card - Ultra Eye-Catching Design */
.hadith-chapter-card {
    background: linear-gradient(145deg,
            #ffffff 0%,
            #f8fffe 40%,
            #f0fdf4 70%,
            #ecfdf5 100%);
    border-radius: 22px;
    padding: 2.5rem;
    box-shadow:
        0 15px 40px rgba(44, 85, 48, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border: 2px solid rgba(44, 85, 48, 0.08);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(2px);
    transform: translateZ(0);
}

/* Spectacular Islamic Pattern Background */
.hadith-chapter-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background:
        radial-gradient(circle at 25% 25%, rgba(44, 85, 48, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(196, 167, 71, 0.06) 0%, transparent 50%),
        conic-gradient(from 45deg at 50% 50%,
            rgba(44, 85, 48, 0.03) 0deg,
            transparent 90deg,
            rgba(196, 167, 71, 0.03) 180deg,
            transparent 270deg);
    background-size: 100px 100px, 80px 80px, 150px 150px;
    transform: rotate(0deg) scale(0.8);
    transition: all 0.8s ease;
    opacity: 0;
    z-index: 0;
}

/* Dynamic Border Glow */
.hadith-chapter-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            var(--primary-color) 0%,
            var(--gold-color) 25%,
            var(--primary-color) 50%,
            var(--gold-color) 75%,
            var(--primary-color) 100%);
    background-size: 400% 400%;
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientBorder 4s ease-in-out infinite;
    z-index: -1;
}

.hadith-chapter-card:hover::before {
    transform: rotate(10deg) scale(1);
    opacity: 1;
}

.hadith-chapter-card:hover::after {
    opacity: 1;
}

.hadith-chapter-card:hover {
    transform: translateY(-15px) scale(1.02) rotateX(10deg) rotateY(2deg);
    box-shadow:
        0 30px 60px rgba(44, 85, 48, 0.25),
        0 12px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(44, 85, 48, 0.2);
}

.hadith-chapter-card>* {
    position: relative;
    z-index: 1;
}

.hadith-chapter-number {
    background: linear-gradient(135deg,
            var(--primary-color) 0%,
            #10b981 25%,
            var(--gold-color) 75%,
            var(--secondary-color) 100%);
    background-size: 200% 200%;
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.4rem;
    margin-bottom: 2rem;
    box-shadow:
        0 12px 25px rgba(44, 85, 48, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        0 0 0 3px rgba(44, 85, 48, 0.1);
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: gradientNumber 3s ease-in-out infinite;
}

.hadith-chapter-number::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg,
            var(--gold-color) 0%,
            transparent 25%,
            var(--primary-color) 75%,
            var(--gold-color) 100%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    animation: rotate 4s linear infinite;
}

.hadith-chapter-card:hover .hadith-chapter-number {
    transform: scale(1.2) rotate(-10deg);
    box-shadow:
        0 20px 40px rgba(44, 85, 48, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        0 0 0 5px rgba(196, 167, 71, 0.2);
}

.hadith-chapter-card:hover .hadith-chapter-number::before {
    opacity: 0.8;
}

.hadith-chapter-title {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg,
            var(--primary-color) 0%,
            var(--secondary-color) 50%,
            var(--gold-color) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    transition: all 0.4s ease;
    animation: gradientText 3s ease-in-out infinite;
    position: relative;
}

.hadith-chapter-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--gold-color));
    transition: width 0.6s ease;
    border-radius: 2px;
}

.hadith-chapter-card:hover .hadith-chapter-title::after {
    width: 80%;
}

.hadith-chapter-arabic {
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-weight: 700;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    font-family: 'Amiri', 'Scheherazade New', serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.hadith-chapter-arabic::before {
    content: '⟐';
    position: absolute;
    right: -2.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--gold-color);
    opacity: 0;
    transition: all 0.5s ease;
}

.hadith-chapter-card:hover .hadith-chapter-arabic::before {
    opacity: 1;
    transform: translateY(-50%) rotate(360deg);
}

.hadith-chapter-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
    color: rgba(44, 85, 48, 0.8);
    padding: 1.5rem 0 0 0;
    border-top: 2px solid transparent;
    background: linear-gradient(90deg,
            rgba(44, 85, 48, 0.08) 0%,
            rgba(196, 167, 71, 0.06) 50%,
            rgba(44, 85, 48, 0.08) 100%);
    border-image: linear-gradient(90deg,
            transparent 0%,
            var(--primary-color) 30%,
            var(--gold-color) 70%,
            transparent 100%) 1;
    font-weight: 600;
    border-radius: 12px;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.hadith-chapter-badge {
    background: linear-gradient(135deg,
            var(--primary-color) 0%,
            var(--gold-color) 50%,
            var(--secondary-color) 100%);
    background-size: 200% 200%;
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 6px 20px rgba(44, 85, 48, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: gradientBadge 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.hadith-chapter-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.hadith-chapter-card:hover .hadith-chapter-badge {
    transform: scale(1.1) translateY(-2px);
    box-shadow:
        0 10px 30px rgba(44, 85, 48, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hadith-chapter-card:hover .hadith-chapter-badge::before {
    left: 100%;
}

/* Hadith Sub-chapters Grid */
.hadith-sub-chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* Hadith Sub-chapter Card - Premium Enhancement */
.hadith-sub-chapter-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow:
        0 6px 20px rgba(44, 85, 48, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border: 1px solid rgba(44, 85, 48, 0.05);
    position: relative;
    overflow: hidden;
    border-left: 5px solid var(--accent-color);
    background-clip: padding-box;
}

/* Subtle Pattern Background */
.hadith-sub-chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background:
        radial-gradient(circle at center, rgba(44, 85, 48, 0.03) 0%, transparent 70%);
    border-radius: 0 16px 0 60px;
    transition: all 0.3s ease;
}

.hadith-sub-chapter-card:hover::before {
    width: 120px;
    height: 120px;
    background:
        radial-gradient(circle at center, rgba(196, 167, 71, 0.05) 0%, transparent 70%);
}

.hadith-sub-chapter-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 15px 35px rgba(44, 85, 48, 0.12),
        0 5px 15px rgba(0, 0, 0, 0.05);
    border-left-color: var(--gold-color);
    border-left-width: 6px;
}

.hadith-sub-chapter-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    position: relative;
    transition: color 0.3s ease;
}

.hadith-sub-chapter-card:hover .hadith-sub-chapter-title {
    color: var(--primary-color);
}

.hadith-sub-chapter-arabic {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    font-family: 'Amiri', 'Scheherazade New', serif;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.hadith-sub-chapter-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
    padding-top: 1rem;
    border-top: 1px solid rgba(44, 85, 48, 0.06);
    font-weight: 500;
}

/* Enhanced hover effect for sub-chapter number */
.hadith-sub-chapter-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #d4a574 100%);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    box-shadow: 0 3px 10px rgba(196, 167, 71, 0.3);
    transition: all 0.3s ease;
}

.hadith-sub-chapter-card:hover .hadith-sub-chapter-number {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 15px rgba(196, 167, 71, 0.4);
}

/* Hadith Content Display */
.hadith-content-display {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.hadith-content-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 1.5rem 2rem;
    text-align: center;
}

.hadith-content-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hadith-content-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Hadith Card in Content Display - Premium Enhancement */
.hadith-content-card {
    background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
    padding: 3rem;
    border: none;
    border-radius: 25px;
    margin-bottom: 3rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    direction: rtl;
    text-align: right;
    box-shadow:
        0 15px 35px rgba(44, 85, 48, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
    border-left: 6px solid transparent;
    background-clip: padding-box;
}

/* Islamic Geometric Pattern */
.hadith-content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 15% 15%, rgba(44, 85, 48, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 85% 85%, rgba(196, 167, 71, 0.02) 0%, transparent 50%),
        repeating-linear-gradient(60deg,
            transparent 0px,
            rgba(44, 85, 48, 0.008) 1px,
            transparent 2px,
            transparent 40px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

/* Elegant Side Border */
.hadith-content-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 6px;
    background: linear-gradient(180deg,
            transparent 0%,
            var(--primary-color) 25%,
            var(--gold-color) 50%,
            var(--primary-color) 75%,
            transparent 100%);
    border-radius: 0 5px 5px 0;
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

.hadith-content-card:hover::before {
    opacity: 1;
}

.hadith-content-card:hover::after {
    transform: scaleY(1);
}

.hadith-content-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 25px 50px rgba(44, 85, 48, 0.15),
        0 10px 25px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-left-color: var(--primary-color);
}

.hadith-content-card>* {
    position: relative;
    z-index: 1;
}

/* Hadith Header Enhancement */
.hadith-content-card .hadith-header {
    background: linear-gradient(135deg, rgba(44, 85, 48, 0.05) 0%, rgba(196, 167, 71, 0.05) 100%);
    padding: 2rem;
    border-radius: 20px;
    margin: -1rem -1rem 2rem -1rem;
    border: 1px solid rgba(44, 85, 48, 0.08);
}

.hadith-reference h3 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: left;
    direction: ltr;
}

.hadith-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start;
    direction: ltr;
    text-align: left;
}

.hadith-number {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0;
    margin-left: 0;
    direction: ltr;
    box-shadow:
        0 6px 20px rgba(44, 85, 48, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.hadith-content-card:hover .hadith-number {
    transform: scale(1.05);
    box-shadow:
        0 8px 25px rgba(44, 85, 48, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.chapter-info {
    background: rgba(44, 85, 48, 0.1);
    color: var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid rgba(44, 85, 48, 0.15);
}

.hadith-grade {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 0;
    direction: ltr;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hadith-grade.sahih {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.hadith-text-arabic {
    font-size: 1.6rem;
    line-height: 2.2;
    color: var(--text-dark);
    margin: 2.5rem 0;
    font-family: 'Amiri', 'Scheherazade New', serif;
    text-align: right;
    direction: rtl;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    padding: 2rem;
    background: rgba(44, 85, 48, 0.02);
    border-radius: 18px;
    border: 1px solid rgba(44, 85, 48, 0.05);
}

.hadith-number {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    margin-left: 1rem;
    direction: ltr;
}

.hadith-text-arabic {
    font-size: 1.4rem;
    line-height: 2;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-family: 'Amiri', 'Scheherazade New', serif;
    text-align: right;
    direction: rtl;
}

.hadith-text-translation {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(44, 85, 48, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    direction: ltr;
    text-align: left;
}

.hadith-narrator {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-align: right;
    direction: rtl;
}

.hadith-grade {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 1rem;
    direction: ltr;
}

.hadith-grade.sahih {
    background: #28a745;
    color: var(--white);
}

.hadith-grade.hasan {
    background: #ffc107;
    color: var(--text-dark);
}

.hadith-grade.daif {
    background: #dc3545;
    color: var(--white);
}

/* Hadith Pagination */
.hadith-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--background-light);
    border-top: 1px solid #e0e0e0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Hadith Filters */
.hadith-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

/* Loading States */
.hadith-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--text-light);
}

.hadith-loading::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hadith-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.hadith-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Premium Card Animations and Interactive Effects */

/* Smooth entrance animations for cards */
@keyframes slideUpFadeIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(196, 167, 71, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(196, 167, 71, 0.6);
    }
}

/* Apply animations to hadith cards */
.hadith-book-card.slide-up {
    animation: slideUpFadeIn 0.6s ease-out forwards;
}

.hadith-chapter-card.slide-up {
    animation: slideUpFadeIn 0.5s ease-out forwards;
}

.hadith-sub-chapter-card.slide-up {
    animation: slideUpFadeIn 0.4s ease-out forwards;
}

/* Shimmer effect for loading states */
.hadith-book-card:hover::before,
.hadith-chapter-card:hover::before {
    animation: shimmer 2s infinite;
}

/* Pulse effect for important elements */
.hadith-grade.sahih {
    animation: glow 2s ease-in-out infinite;
}

/* Interactive hover effects */
.hadith-book-card,
.hadith-chapter-card,
.hadith-sub-chapter-card {
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Staggered animation delays */
.hadith-book-card:nth-child(1) {
    animation-delay: 0s;
}

.hadith-book-card:nth-child(2) {
    animation-delay: 0.1s;
}

.hadith-book-card:nth-child(3) {
    animation-delay: 0.2s;
}

.hadith-book-card:nth-child(4) {
    animation-delay: 0.3s;
}

.hadith-book-card:nth-child(5) {
    animation-delay: 0.4s;
}

.hadith-book-card:nth-child(6) {
    animation-delay: 0.5s;
}

.hadith-chapter-card:nth-child(odd) {
    animation-delay: 0s;
}

.hadith-chapter-card:nth-child(even) {
    animation-delay: 0.15s;
}

/* Enhanced focus states for accessibility */
.hadith-book-card:focus,
.hadith-chapter-card:focus,
.hadith-sub-chapter-card:focus {
    outline: none;
    box-shadow:
        0 0 0 4px rgba(44, 85, 48, 0.3),
        0 15px 35px rgba(44, 85, 48, 0.2);
    transform: translateY(-5px) scale(1.02);
}

/* Loading skeleton animation */
@keyframes skeleton {
    0% {
        background-color: rgba(44, 85, 48, 0.1);
    }

    50% {
        background-color: rgba(44, 85, 48, 0.05);
    }

    100% {
        background-color: rgba(44, 85, 48, 0.1);
    }
}

.hadith-loading-skeleton {
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: 8px;
}

/* Micro-interactions for buttons */
.go-btn,
.pagination-btn,
.hadith-chapter-number,
.hadith-number {
    position: relative;
    overflow: hidden;
}

.go-btn::before,
.pagination-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.go-btn:hover::before,
.pagination-btn:hover::before {
    left: 100%;
}

/* Enhanced ripple effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.hadith-book-card::after,
.hadith-chapter-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(44, 85, 48, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* Smooth height transitions */
.hadith-content-display {
    transition: height 0.3s ease-in-out;
}

/* Text reveal animation */
@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hadith-text-arabic,
.hadith-text-translation {
    animation: textReveal 0.8s ease-out 0.2s both;
}

/* Floating animation for decorative elements */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hadith-chapter-number {
    animation: float 3s ease-in-out infinite;
}

/* Gradient movement animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.individual-hadith-header {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

@media (max-width: 768px) {
    .hadith-books-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hadith-chapters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hadith-sub-chapters-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .hadith-book-card,
    .hadith-chapter-card,
    .hadith-sub-chapter-card {
        padding: 1rem;
    }

    .hadith-content-card {
        padding: 1rem;
    }

    .hadith-text-arabic {
        font-size: 1.2rem;
        line-height: 1.8;
    }

    .hadith-text-translation {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hadith-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .hadith-pagination {
        flex-direction: column;
        gap: 0.5rem;
    }

    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hadith-app {
        padding: 1rem 0;
    }

    .hadith-content-header {
        padding: 1rem;
    }

    .hadith-content-title {
        font-size: 1.1rem;
    }

    .hadith-book-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .hadith-stats-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
        background: rgba(44, 85, 48, 0.05);
        border-radius: 8px;
    }
}

/* RTL Support Enhancement */
[dir="rtl"] .hadith-book-card,
[dir="rtl"] .hadith-chapter-card,
[dir="rtl"] .hadith-sub-chapter-card {
    text-align: right;
}

[dir="rtl"] .hadith-text-translation {
    border-left: none;
    border-right: 4px solid var(--accent-color);
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .hadith-number {
    margin-left: 0;
    margin-right: 1rem;
}

/* Individual Hadith Navigation Styles - Premium Enhancement */
.individual-hadith-header,
.container .individual-hadith-header,
#hadith-content-display .individual-hadith-header,
#individual-hadith-display .individual-hadith-header,
.hadith-content .individual-hadith-header {
    background: linear-gradient(135deg,
            #1a4a3a 0%,
            #2c5530 25%,
            #4a7c4e 75%,
            #5d8c61 100%) !important;
    color: #ffffff !important;
    padding: 3rem 0;
    border-radius: 25px;
    margin-bottom: 3rem;
    box-shadow:
        0 20px 40px rgba(44, 85, 48, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Islamic Pattern Overlay */
.individual-hadith-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 25% 25%, rgba(196, 167, 71, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        repeating-linear-gradient(45deg,
            transparent 0px,
            rgba(255, 255, 255, 0.02) 1px,
            transparent 2px,
            transparent 30px);
    z-index: 0;
}

/* Decorative Border */
.individual-hadith-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--gold-color) 10%,
            #f4e4bc 50%,
            var(--gold-color) 90%,
            transparent 100%);
    box-shadow: 0 2px 10px rgba(196, 167, 71, 0.4);
}

.individual-hadith-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    background: transparent !important;
    color: #ffffff !important;
    position: relative;
    z-index: 1;
}

.individual-hadith-header h2 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    background: transparent !important;
    letter-spacing: -0.02em;
    position: relative;
}

.individual-hadith-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-color), transparent);
    border-radius: 2px;
}

/* Ensure all text elements in hadith header are white with proper shadows */
html body .individual-hadith-header h2,
html body .individual-hadith-header *,
html body #individual-hadith-book-title {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4) !important;
    background: transparent !important;
}

.hadith-navigation-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1.2rem 2rem;
    border-radius: 60px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 8px 25px rgba(0, 0, 0, 0.15);
}

.hadith-page-navigation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
    max-width: 350px;
}

.page-input-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: 35px;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.page-input {
    width: 90px;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    background: rgba(44, 85, 48, 0.05);
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s ease;
}

.page-input:focus {
    background: rgba(44, 85, 48, 0.1);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.2);
    transform: scale(1.05);
}

.go-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow:
        0 4px 15px rgba(44, 85, 48, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.go-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 8px 25px rgba(44, 85, 48, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.go-btn:active {
    transform: translateY(0) scale(1.02);
}

.go-btn svg {
    transition: transform 0.3s ease;
}

.go-btn:hover svg {
    transform: translateX(3px);
}

/* Enhanced Navigation Controls and Buttons */

/* Premium Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border: 2px solid rgba(44, 85, 48, 0.15);
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    box-shadow:
        0 6px 20px rgba(44, 85, 48, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.back-btn:hover::before {
    opacity: 1;
}

.back-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 12px 30px rgba(44, 85, 48, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: var(--white);
    border-color: var(--primary-color);
}

.back-btn:active {
    transform: translateY(0) scale(1);
}

.back-btn svg {
    transition: transform 0.3s ease;
}

.back-btn:hover svg {
    transform: translateX(-3px);
}

/* Enhanced Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0 2.5rem 0;
    flex-wrap: wrap;
}

.breadcrumb-item {
    position: relative;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(44, 85, 48, 0.1);
    color: var(--text-light);
    text-decoration: none;
    backdrop-filter: blur(5px);
}

.breadcrumb-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    font-weight: 700;
    border-color: var(--primary-color);
    box-shadow:
        0 4px 15px rgba(44, 85, 48, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.breadcrumb-item:not(.active):hover {
    background: rgba(44, 85, 48, 0.05);
    color: var(--primary-color);
    transform: translateY(-1px);
    border-color: rgba(44, 85, 48, 0.2);
}

.breadcrumb-separator {
    color: var(--text-light);
    font-weight: 300;
    font-size: 1.2rem;
    margin: 0 0.2rem;
    opacity: 0.6;
}

/* Enhanced Search Input */
.search-container {
    position: relative;
    margin-bottom: 2.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 4rem;
    border: 2px solid rgba(44, 85, 48, 0.12);
    border-radius: 30px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(44, 85, 48, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 1);
    box-shadow:
        0 8px 25px rgba(44, 85, 48, 0.15),
        0 0 0 4px rgba(44, 85, 48, 0.1);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    transition: color 0.3s ease;
    pointer-events: none;
}

.search-container:focus-within .search-icon {
    color: var(--primary-color);
}

/* Enhanced Control Buttons */
.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border: 2px solid rgba(44, 85, 48, 0.15);
    color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow:
        0 4px 15px rgba(44, 85, 48, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.control-btn:hover::before {
    opacity: 1;
}

.control-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 8px 25px rgba(44, 85, 48, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: var(--white);
    border-color: var(--primary-color);
}

.control-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.control-btn svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.control-btn:hover svg {
    transform: scale(1.1);
}

.control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(44, 85, 48, 0.05);
}

/* Enhanced Pagination Info */
.pagination-info {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border: 2px solid rgba(44, 85, 48, 0.1);
    color: var(--text-dark);
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    box-shadow:
        0 4px 15px rgba(44, 85, 48, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    letter-spacing: 0.2px;
}

.hadith-count {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Responsive Design for Hadith Navigation */
@media (max-width: 768px) {
    .hadith-navigation-controls {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .hadith-page-navigation {
        order: -1;
        max-width: 100%;
        width: 100%;
    }

    .page-input-group {
        justify-content: center;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .nav-btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }

    .hadith-bottom-navigation {
        padding: 1rem;
    }

    .pagination-info {
        font-size: 0.85rem;
    }

    .hadith-count {
        display: block;
        margin-top: 0.25rem;
    }
}

@media (max-width: 480px) {
    .hadith-navigation-controls {
        gap: 0.8rem;
        padding: 0.8rem;
    }

    .nav-btn {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
        min-width: 100px;
    }

    .nav-btn svg {
        width: 18px;
        height: 18px;
    }

    .page-input {
        width: 60px;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .go-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .go-btn svg {
        width: 14px;
        height: 14px;
    }

    .pagination-info {
        font-size: 0.8rem;
    }

    .hadith-count {
        font-size: 0.75rem;
    }
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-btn:disabled {
    background: rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.5);
    cursor: not-allowed;
    transform: none;
}

.nav-btn svg {
    transition: transform var(--transition);
}

.nav-btn:hover:not(:disabled) svg {
    transform: translateX(2px);
}

.prev-btn:hover:not(:disabled) svg {
    transform: translateX(-2px);
}

.position-indicator {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--white);
    min-width: 80px;
    text-align: center;
}

.individual-hadith-display {
    max-width: none;
    margin: 0;
}

.individual-hadith-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.individual-hadith-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.individual-hadith-card .hadith-header {
    border-bottom: 2px solid var(--background-light);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.individual-hadith-card .section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.individual-hadith-card .section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 2px;
}

.individual-hadith-card .hadith-text-arabic {
    background: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border-right: 4px solid var(--accent-color);
}

.individual-hadith-card .hadith-arabic {
    font-size: 1.6rem;
    line-height: 2.2;
    color: var(--text-dark);
    margin: 0;
}

.individual-hadith-card .hadith-text-english,
.individual-hadith-card .hadith-text-urdu {
    background: rgba(var(--primary-color-rgb), 0.03);
    padding: 1.8rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.individual-hadith-card .english-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-medium);
    margin: 0;
}

.individual-hadith-card .urdu-text {
    font-size: 1.3rem;
    line-height: 2;
    color: var(--text-dark);
    margin: 0;
}

/* Responsive Design for Individual Hadith */
@media (max-width: 768px) {
    .individual-hadith-header .header-content {
        flex-direction: column;
        text-align: center;
    }

    .hadith-navigation-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .individual-hadith-card {
        padding: 1.5rem;
    }

    .individual-hadith-card .hadith-arabic {
        font-size: 1.4rem;
        line-height: 2;
    }

    .individual-hadith-card .urdu-text {
        font-size: 1.2rem;
    }
}

/* Chapter Titles List Styles */
.chapter-titles-list {
    padding: 2rem 0;
}

.chapter-titles-list .section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.titles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.chapter-title-item {
    background: var(--white);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.chapter-title-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.chapter-title-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.chapter-title-item:hover::before {
    transform: scaleX(1);
}

.chapter-title-item:active {
    transform: translateY(0);
}

.chapter-title-item .title-content {
    font-size: 1.1rem;
}

/* FINAL HADITH HEADER GREEN BACKGROUND FIX - MAXIMUM PRIORITY */
html body .individual-hadith-header,
html body div.individual-hadith-header,
html body * .individual-hadith-header,
html body *[class="individual-hadith-header"],
body .individual-hadith-header,
.individual-hadith-header {
    background: #2c5530 !important;
    background-color: #2c5530 !important;
    background-image: linear-gradient(135deg, #2c5530, #4a7c4e) !important;
    color: #ffffff !important;
    padding: 2rem 0 !important;
    border-radius: 8px !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

html body .individual-hadith-header *,
html body .individual-hadith-header h2,
html body #individual-hadith-book-title,
.individual-hadith-header *,
.individual-hadith-header h2,
#individual-hadith-book-title {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
    background: transparent !important;
}

/* Ensure parent containers don't override */
#individual-hadith-section,
#hadith-content-display,
#individual-hadith-display,
.hadith-content,
.container {
    background: transparent !important;
}

/* Absolutely force green background - nuclear option */
.individual-hadith-header,
div.individual-hadith-header,
[class="individual-hadith-header"],
[class*="individual-hadith-header"] {
    background: #2c5530 !important;
    background-color: #2c5530 !important;
    background-image: linear-gradient(135deg, #2c5530, #4a7c4e) !important;
}

/* Override any possible inline styles or WordPress admin CSS */
body.wp-admin .individual-hadith-header,
body .individual-hadith-header[style*="background"],
.individual-hadith-header[style*="white"],
.individual-hadith-header[style*="transparent"] {
    background: #2c5530 !important;
    background-color: #2c5530 !important;
    background-image: linear-gradient(135deg, #2c5530, #4a7c4e) !important;
}

/* Ultimate fallback for dynamically created elements */

.individual-hadith-header {
    background: linear-gradient(135deg, #2c5530, #4a7c4e) !important;
    position: relative !important;
}

/* Add a pseudo-element as backup background */
.individual-hadith-header::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, #2c5530, #4a7c4e) !important;
    z-index: -1 !important;
}

.chapter-title-item .title-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    text-align: left;
    direction: ltr;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .titles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .chapter-title-item {
        padding: 1rem;
    }

    .chapter-title-item .title-content {
        font-size: 1rem;
    }
}