/* ============================================
   DeenNetwork — Quran Page Styles
   ============================================ */

/* ---------- App Layout ---------- */
.quran-app {
    display: flex;
    min-height: 100vh;
    padding-top: 60px;
}

/* ---------- Sidebar ---------- */
.quran-sidebar {
    width: 320px;
    min-width: 320px;
    height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
    background: #ffffff;
    border-right: 1px solid rgba(18, 17, 17, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
    border-bottom: 1px solid rgba(18, 17, 17, 0.06);
}

.sidebar-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    color: #121111;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.2s;
}

.sidebar-close:hover {
    background: rgba(18, 17, 17, 0.06);
    color: #121111;
}

.sidebar-search {
    padding: 12px 16px;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(18, 17, 17, 0.1);
    border-radius: 8px;
    background: #f7f7f7;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: #121111;
    outline: none;
    transition: 0.3s;
}

.sidebar-search input::placeholder {
    color: #999;
}

.sidebar-search input:focus {
    border-color: #121111;
    box-shadow: 0 0 0 3px rgba(18, 17, 17, 0.06);
    background: #fff;
}

/* ---------- Surah List ---------- */
.surah-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.surah-list::-webkit-scrollbar {
    width: 5px;
}

.surah-list::-webkit-scrollbar-track {
    background: transparent;
}

.surah-list::-webkit-scrollbar-thumb {
    background: rgba(18, 17, 17, 0.12);
    border-radius: 10px;
}

.surah-loading {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 0.9rem;
}

.surah-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    cursor: pointer;
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.surah-item:hover {
    background: #f7f7f7;
}

.surah-item.active {
    background: #f0f0f0;
    border-left-color: #121111;
}

.surah-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border: 1px solid rgba(18, 17, 17, 0.08);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    flex-shrink: 0;
}

.surah-item.active .surah-number {
    background: #121111;
    color: #fff;
    border-color: #121111;
}

.surah-info {
    flex: 1;
    min-width: 0;
}

.surah-info-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #121111;
    display: block;
}

.surah-info-detail {
    font-size: 0.75rem;
    color: #888;
    display: block;
    margin-top: 2px;
}

.surah-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.1rem;
    color: #555;
    flex-shrink: 0;
}

/* ---------- Main Content ---------- */
.quran-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ---------- Top Bar ---------- */
.quran-topbar {
    position: sticky;
    top: 60px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(18, 17, 17, 0.06);
}

.sidebar-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid rgba(18, 17, 17, 0.1);
    border-radius: 8px;
    padding: 8px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: #121111;
    cursor: pointer;
    transition: 0.2s;
}

.sidebar-toggle:hover {
    background: #f7f7f7;
}

.quran-topbar-info {
    flex: 1;
}

.topbar-surah-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    color: #121111;
    display: block;
}

.topbar-surah-meta {
    font-size: 0.75rem;
    color: #888;
}

.reciter-select {
    padding: 8px 12px;
    border: 1px solid rgba(18, 17, 17, 0.1);
    border-radius: 8px;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: #121111;
    outline: none;
    cursor: pointer;
    transition: 0.2s;
    max-width: 200px;
}

.reciter-select:focus {
    border-color: #121111;
}

/* ---------- Welcome Screen ---------- */
.quran-welcome {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.welcome-content {
    text-align: center;
    max-width: 520px;
}

.welcome-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.6rem;
    color: #888;
    margin-bottom: 20px;
}

.welcome-content h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.4rem;
    color: #121111;
    margin-bottom: 12px;
}

.welcome-content>p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.welcome-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.quick-surah {
    padding: 10px 20px;
    background: #121111;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.quick-surah:hover {
    background: #333;
    transform: translateY(-1px);
}

/* ---------- Loading ---------- */
.quran-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px;
    color: #888;
}

.loader {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(18, 17, 17, 0.08);
    border-top-color: #121111;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Surah Header ---------- */
.surah-header {
    text-align: center;
    padding: 48px 24px 32px;
    border-bottom: 1px solid rgba(18, 17, 17, 0.06);
}

.surah-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    color: #121111;
    margin-bottom: 6px;
}

.surah-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 24px;
}

.bismillah {
    font-family: 'Amiri', serif;
    font-size: 1.6rem;
    color: #121111;
    opacity: 0.6;
    padding: 16px 0;
}

/* ---------- Audio Player ---------- */
.audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: #f7f7f7;
    border-bottom: 1px solid rgba(18, 17, 17, 0.06);
    position: sticky;
    top: 108px;
    z-index: 4;
}

.audio-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #121111;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}

.audio-btn:hover {
    background: #333;
    transform: scale(1.05);
}

.audio-progress-wrap {
    flex: 1;
    min-width: 0;
}

.audio-progress {
    width: 100%;
    height: 4px;
    background: rgba(18, 17, 17, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    margin-bottom: 4px;
}

.audio-progress-bar {
    height: 100%;
    background: #121111;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #999;
}

.audio-ayah-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}

/* ---------- Verses ---------- */
.verses-list {
    padding: 16px 0;
}

.verse-item {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(18, 17, 17, 0.04);
    transition: 0.2s;
    cursor: default;
}

.verse-item:hover {
    background: rgba(18, 17, 17, 0.02);
}

.verse-item.playing {
    background: rgba(18, 17, 17, 0.04);
    border-left: 3px solid #121111;
}

.verse-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.verse-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f7f7f7;
    border: 1px solid rgba(18, 17, 17, 0.08);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
}

.verse-actions {
    display: flex;
    gap: 6px;
}

.verse-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid rgba(18, 17, 17, 0.08);
    border-radius: 6px;
    cursor: pointer;
    color: #888;
    font-size: 0.85rem;
    transition: 0.2s;
}

.verse-action-btn:hover {
    background: #f7f7f7;
    color: #121111;
    border-color: rgba(18, 17, 17, 0.15);
}

.verse-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.7rem;
    line-height: 2.2;
    color: #121111;
    text-align: right;
    direction: rtl;
    margin-bottom: 14px;
    word-spacing: 4px;
}

.verse-translation {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.8;
}

/* ---------- No Footer on Quran Page ---------- */

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .quran-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        min-width: 300px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }

    .quran-sidebar.open {
        left: 0;
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-toggle {
        display: flex;
    }

    .quran-topbar {
        padding: 10px 16px;
    }

    .verse-item {
        padding: 20px 16px;
    }

    .verse-arabic {
        font-size: 1.4rem;
    }

    .surah-header {
        padding: 36px 16px 24px;
    }

    .audio-player {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .audio-ayah-label {
        order: -1;
        width: 100%;
        text-align: left;
    }

    .reciter-select {
        max-width: 150px;
        font-size: 0.78rem;
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.sidebar-overlay.active {
    display: block;
}