.mushaf-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fdf5e6; /* Warm paper color */
    overflow: hidden;
}

.mushaf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--primary);
    color: var(--secondary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.mushaf-header h3 {
    margin: 0;
    font-size: 18px;
    font-family: 'Amiri', serif;
}

.mushaf-header .page-number {
    font-size: 16px;
    font-weight: bold;
}

.mushaf-header .back-btn {
    color: var(--secondary);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 8px;
    margin: 0;
}

.mushaf-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.mushaf-page-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    background: white;
}

.mushaf-hit-area {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    z-index: 5;
    cursor: pointer;
    /* Invisible, only for detecting clicks */
}

.mushaf-hit-area.left {
    left: 0;
}

.mushaf-hit-area.right {
    right: 0;
}

.mushaf-footer {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.05);
    z-index: 10;
}

.mushaf-footer-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.mushaf-footer-btn i {
    font-size: 20px;
}

/* Audio bar at bottom of Mushaf - vertical stacking layout */
.mushaf-audio-bar {
    background: var(--primary);
    color: var(--secondary);
    flex-shrink: 0;
    overflow: hidden;
    padding-bottom: 6px;
}

.mushaf-audio-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    gap: 10px;
}

.mushaf-audio-surah {
    font-family: 'Amiri', serif;
    font-size: 15px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    color: var(--secondary);
}

.mushaf-audio-btn {
    background: var(--secondary);
    color: var(--primary);
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Player controls that expand below the audio row */
.mushaf-player-controls {
    display: flex;
    gap: 8px;
    padding: 0 14px 2px;
}

.mushaf-ctrl-btn {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mushaf-ctrl-play {
    background: var(--secondary);
    color: var(--primary);
    flex: 3;
}

.mushaf-ctrl-del {
    background: rgba(255,255,255,0.15);
    color: var(--secondary);
    flex: 1;
}

#mushafOfflinePlayerBar {
    padding: 0 14px 2px;
}
