/* ============================================
   Assyrian4all Hymns (TARAT) - Light Blue Theme
   Same UI system as Holy Bible build
   ============================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: linear-gradient(135deg, #cfe9ff 0%, #a8d8f0 50%, #7fc2e8 100%);
    color: #0a3a5c;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow-x: hidden;
}

a { color: #0a3a5c; text-decoration: none; }

/* ===== Main outer frame (red border) ===== */
.outer-frame {
    margin: 14px auto;
    width: 96%;
    max-width: 1400px;
    border: 3px solid #d33;
    border-radius: 12px;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(2px);
    padding: 12px;
    box-shadow: 0 10px 30px rgba(10,58,92,0.18);
}

/* ===== Header (landing page) ===== */
.bible-head {
    text-align: center;
    padding: 8px 10px 14px;
}
.bible-head h1 {
    color: #1a5680;
    font-size: 1.5rem;
    margin-bottom: 6px;
}
.bible-head h2 {
    color: #0a3a5c;
    font-size: 1.05rem;
    font-weight: 600;
}
.bible-head .ar {
    font-family: "Segoe UI", Tahoma, "Traditional Arabic", serif;
    font-weight: 700;
    margin-right: 6px;
}

/* ===== Landing page: single combined "ALL ALBUMS" box ===== */
.album-table {
    display: block;
    margin: 0 auto;
    max-width: 1100px;
}
.album-group {
    border: 3px solid #2e8b3a;
    border-radius: 10px;
    background: #f5fbff;
    padding: 12px;
}
.album-group-head {
    text-align: center;
    background: #2e8b3a;
    color: #fff;
    padding: 6px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
}
.album-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
}
.album-tile {
    display: block;
    background: linear-gradient(180deg, #3a3a55, #1f1f33);
    color: #fff;
    border: 2px solid #1f4dbb;
    border-radius: 8px;
    padding: 14px 4px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.album-tile:hover {
    background: linear-gradient(180deg, #1f4dbb, #0d2c70);
    transform: scale(1.05);
    color: #fff;
}

/* ===== Player page layout =====
   One combined album index column on the left, player+tracks on the right. */
.layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 12px;
    align-items: start;
}

/* ===== LEFT INDEX (green box) ===== */
.book-index {
    border: 3px solid #2e8b3a;
    border-radius: 10px;
    background: #f5fbff;
    padding: 10px;
    max-height: 760px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #1a5680 #cfe9ff;
}
.book-index::-webkit-scrollbar { width: 10px; }
.book-index::-webkit-scrollbar-track { background: #cfe9ff; border-radius: 6px; }
.book-index::-webkit-scrollbar-thumb { background: #1a5680; border-radius: 6px; }

.testament-label {
    text-align: center;
    background: #2e8b3a;
    color: #fff;
    padding: 4px;
    border-radius: 5px;
    margin: 2px 0 8px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.book-card {
    display: block;
    background: #fff;
    border: 1px solid #9ec9e3;
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 9px 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.book-card:hover {
    transform: translateY(-2px);
    border-color: #1a5680;
    box-shadow: 0 4px 10px rgba(26,86,128,0.25);
}
.book-card.active {
    border-color: #d33;
    background: #fff5f5;
}
.book-card .card-title {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: #0a3a5c;
    line-height: 1.2;
}
.book-card .card-sub {
    display: block;
    margin-top: 3px;
    font-size: 0.72rem;
    color: #1a5680;
    opacity: 0.75;
}

/* ===== RIGHT SIDE: banner + player + chapter (track) grid ===== */
.right-pane {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;       /* FIX: prevents CSS grid column blowout so image fits */
    overflow: hidden;
}

.now-playing {
    background: #1a5680;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
}

/* ===== Holy Bible banner image (shows the FULL picture, no crop) ===== */
.bible-banner {
    width: 100%;
    border: 3px solid #1a5680;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 6px 18px rgba(10,58,92,0.25);
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: -10px; /* cancel .right-pane gap so banner+player touch */
}
.bible-banner img {
    display: block;
    width: 100%;
    height: auto;        /* show FULL image, no crop */
    object-fit: contain;
}

/* Player sits flush under the banner so they read as one box. */
.player-host {
    background: #3a2a45;
    border: 3px solid #180a1f;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.bible-banner + .player-host {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
}

/* ===== Track grid (blue box) ===== */
.chapter-grid-wrap {
    border: 3px solid #1f4dbb;
    border-radius: 10px;
    background: #eaf3fc;
    padding: 10px;
}
.chapter-grid-wrap h3 {
    text-align: center;
    color: #1f4dbb;
    margin-bottom: 8px;
    font-size: 1rem;
}
/* Tracks are usually named (not numbered) so use auto-fill so each one
   has room to show its title. */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding: 4px;
    scrollbar-width: thin;
    scrollbar-color: #1f4dbb #cfe9ff;
}
.chapter-grid::-webkit-scrollbar { width: 10px; }
.chapter-grid::-webkit-scrollbar-track { background: #cfe9ff; border-radius: 6px; }
.chapter-grid::-webkit-scrollbar-thumb { background: #1f4dbb; border-radius: 6px; }

.ch-btn {
    background: linear-gradient(180deg, #3a3a55, #1f1f33);
    color: #fff;
    border: 2px solid #1f4dbb;
    border-radius: 6px;
    padding: 10px 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.2;
    word-break: break-word;
    min-height: 50px;
}
.ch-btn:hover {
    background: linear-gradient(180deg, #1f4dbb, #0d2c70);
    transform: scale(1.04);
}
.ch-btn.active {
    background: linear-gradient(180deg, #d33, #8b1a1a);
    border-color: #fff;
    box-shadow: 0 0 8px rgba(211,51,51,0.7);
}

/* ===== jPlayer overrides (purple bar look) ===== */
.player-host #jp_container_1 {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    border: none !important;
    background: transparent !important;
    position: relative;
}
.player-host #jp_container_1 .jp-jplayer {
    width: 0 !important;
    height: 0 !important;
}
.player-host #jp_container_1 .jp-interface {
    background-color: #3a2a45 !important;
    border-color: #180a1f !important;
    color: #fff;
    position: relative !important;
    width: 100% !important;
    min-height: 50px;
    padding-bottom: 3px;
}
.player-host #jp_container_1 .jp-progress {
    width: 100% !important;
    height: 13px !important;
    margin: 0 !important;
}
.player-host .jp-current-time,
.player-host .jp-duration {
    color: #c9b9d6 !important;
    font-size: 0.78rem !important;
    padding-top: 2px !important;
}
.player-host .jp-audio .jp-current-time { padding-left: 12px !important; }
.player-host .jp-audio .jp-duration { padding-right: 12px !important; }

.player-host #jp_container_1 .jp-controls-holder {
    clear: both;
    width: auto !important;
    margin: 3px auto 3px !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    overflow: visible !important;
    position: relative !important;
}
.player-host #jp_container_1 .jp-controls {
    margin: 0 !important;
    float: none !important;
    display: inline-flex !important;
}
.player-host #jp_container_1 .jp-toggles {
    margin: 0 !important;
    float: none !important;
    display: inline-flex !important;
    width: auto !important;
}
.player-host #jp_container_1 .jp-volume-controls {
    position: relative !important;
    display: inline-flex !important;
    align-items: center;
    width: 120px;
    height: 24px;
}
.player-host #jp_container_1 .jp-volume-controls .jp-mute,
.player-host #jp_container_1 .jp-volume-controls .jp-unmute {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
}
.player-host #jp_container_1 .jp-volume-controls .jp-volume-max {
    position: relative !important;
    top: 0 !important;
    left: auto !important;
    right: 0 !important;
}
.player-host #jp_container_1 .jp-volume-bar {
    position: relative !important;
    top: 0 !important;
    margin: 0 4px !important;
    width: 80px !important;
    border-right: none !important;
}

.player-host .jp-playlist { display: none !important; }
.player-host .jp-title    { display: none !important; }
.player-host .jp-details  { display: none !important; }
.player-host .jp-video-play { display: none !important; }

/* ===== Footer ===== */
.foot {
    text-align: center;
    margin: 14px 0 22px;
    color: #0a3a5c;
    font-size: 0.85rem;
    opacity: 0.85;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .book-index { max-height: 360px; }
    .album-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 560px) {
    .book-index { max-height: 280px; }
    .album-grid { grid-template-columns: repeat(4, 1fr); }
    .bible-head h1 { font-size: 1.2rem; }
    .bible-head h2 { font-size: 0.9rem; }
}

a, .book-card, .ch-btn, .album-tile { -webkit-touch-callout: none; }
