:root {
    --bg: #fdfbf7;
    --txt: #333333;
    --card-bg: #ffffff;
    --primary: #2c3e50;
    --accent-red: #e74c3c;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background: var(--bg);
    margin: 0; 
    padding: 0; 
    color: var(--txt);
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* --- SPLASH SCREEN --- */
#splash {
    position: fixed; inset: 0; background: #fff; z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.8s ease-out;
}
.splash-logo {
    width: 140px; height: 140px; object-fit: contain;
    animation: PulseZoom 2s infinite ease-in-out alternate;
    display: none;
}
.loading-txt { 
    margin-top: 25px; 
    font-size: 0.75rem; 
    letter-spacing: 2px; 
    color: #999; 
    font-weight: 700; 
}
@keyframes PulseZoom { 
    0% { transform: scale(0.95); opacity: 0.8; } 
    100% { transform: scale(1.1); opacity: 1; } 
}

/* --- MAIN UI & TYPOGRAPHY --- */
.view { display: none; padding-bottom: 120px; opacity: 0; transition: opacity 0.6s; }
.view.is-active { display: block; opacity: 1; }

.ph { padding: 1.5rem; display: flex; justify-content: center; margin-bottom: 0.5rem; }
.top-logo { 
    height: 75px; width: 75px; 
    object-fit: contain; 
    background: #fff; padding: 5px; 
    border: 1px solid #eee; border-radius: 12px; 
}

.mh { text-align: center; padding: 0 1rem; }
.cw { 
    width: 160px; height: 160px; 
    margin: 0 auto; 
    border-radius: 50%;
    overflow: hidden; 
    background: #f4f4f4; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.1); 
}
.cw img { width: 100%; height: 100%; object-fit: cover; }

.leader-name { 
    font-size: 1.4rem; 
    font-weight: 800; 
    margin-top: 1.5rem; 
    color: var(--primary); 
}
.leader-title { 
    font-size: 0.75rem; 
    color: #999; 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-top: 5px; 
    letter-spacing: 1px; 
}

/* --- ACTION BUTTONS --- */
.acts { display: flex; justify-content: center; gap: 25px; margin-top: 25px; flex-wrap: wrap; }
.act-btn { 
    display: flex; flex-direction: column; align-items: center; 
    cursor: pointer; opacity: 0.8; transition: 0.2s; 
    width: 70px; /* Ensure wrapping on small screens */
}
.act-btn:hover { opacity: 1; transform: translateY(-2px); }
.act-btn i { font-size: 1.6rem; color: #333; margin-bottom: 8px; }
.act-btn span { font-size: 0.6rem; font-weight: 700; color: #666; letter-spacing: 1px; text-transform: uppercase; }

.sep-line { width: 100%; height: 1px; background: #eee; margin: 2rem 0; }

/* --- ASSOCIATE CARDS --- */
.card-base {
    background: var(--card-bg); 
    border-radius: 20px; 
    padding: 1.5rem 1rem;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    border: 1px solid #f0f0f0; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    height: 100%; 
    cursor: pointer; 
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.card-base:active { transform: scale(0.98); }
.card-base:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.06); transform: translateY(-3px); }

.aa { 
    width: 85px; height: 85px; 
    border-radius: 50%; 
    overflow: hidden; 
    background: #f8f8f8; 
    margin-bottom: 1rem; 
    object-fit: cover;
    border: 3px solid #fff; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.ln { font-size: 1rem; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; letter-spacing: -0.02em; line-height: 1.2; text-align: center; }
.leader-title { font-size: 0.65rem; color: #999; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.branch-info { text-align: center; margin-bottom: 15px; padding: 0 5px; }
.b-name { display: block; font-size: 0.75rem; font-weight: 600; color: #4a4a4a; margin-bottom: 2px; text-transform: capitalize; }
.b-loc { display: block; font-size: 0.7rem; color: #888; font-weight: 400; }
.sm-acts { display: flex; gap: 15px; margin-top: auto; justify-content: center; opacity: 0.4; transition: 0.2s; }
.card-base:hover .sm-acts { opacity: 0.8; }
.sm-acts i { font-size: 1.1rem; color: #333; }

/* --- DRAWERS (Modal Style) --- */
.oc { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(255,255,255,0.98); 
    z-index: 6000; 
    opacity: 0; pointer-events: none; transition: opacity .3s; 
    display: flex; align-items: flex-start; justify-content: center; /* Align top */
    overflow-y: auto;
}
.oc.is-open { opacity: 1; pointer-events: auto; }
.occ { width: 100%; max-width: 500px; padding: 2rem; position: relative; }
.c-btn-x { position: absolute; top: 20px; right: 20px; border: none; background: none; font-size: 1.5rem; cursor: pointer; }

/* --- BIBLE FORM --- */
.lbl { font-size: 0.7rem; font-weight: 700; color: #888; margin-left: 5px; margin-bottom: 5px; display: block; }
.custom-select { position: relative; width: 100%; height: 50px; background: #fff; border: 1px solid #ddd; border-radius: 12px; }
.custom-select select {
    width: 100%; height: 100%;
    padding: 0 15px; 
    background: transparent; border: none; outline: none; 
    border-radius: 12px; font-size: 1rem; color: #000; font-weight: 600;
    appearance: none; -webkit-appearance: none; font-family: 'Courier New', Courier, monospace;
}
.custom-select .caret { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #333; pointer-events: none; font-size: 0.8rem; z-index: 1; }
.custom-select:focus-within { border-color: #333; box-shadow: 0 0 0 2px rgba(0,0,0,0.05); }
.s-btn { width: 100%; padding: 16px; background: #222; color: #fff; font-weight: 700; border: none; border-radius: 14px; margin-top: 25px; cursor: pointer; font-size: 1rem; transition: 0.2s; }
.s-btn:active { transform: scale(0.98); background: #000; }

/* --- DEVOTIONAL DRAWER --- */
.devo-back-btn { background: none; border: none; color: #888; font-weight: 600; margin-bottom: 1.5rem; cursor: pointer; }
#devoReadContainer .title { font-family: serif; font-weight: 700; }
#devoReadContainer .content { font-family: serif; font-size: 1.1rem; line-height: 1.7; color: #333; }

/* List of devotionals */
.devo-item {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: 0.2s;
}
.devo-item:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.devo-item-title { font-weight: 700; font-size: 1.1rem; color: var(--primary); }
.devo-item-date { font-size: 0.7rem; color: #999; margin-bottom: 5px; }
.devo-item-summary { font-size: 0.8rem; color: #666; font-family: sans-serif; }

/* Red Bible Icon for Scripture References */
.ref-icon {
    color: var(--accent-red);
    cursor: pointer;
    font-size: 0.9em;
    margin: 0 2px;
    transition: 0.2s;
}
.ref-icon:hover { transform: scale(1.2); }

/* Reference Mini Player */
#refPlayer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    display: none; /* Hidden by default */
    align-items: center;
    padding: 0 1rem;
    z-index: 7000; /* Above drawer content */
}
#refPlayerTitle { flex: 1; font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#refPlayerBtn { background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 10px; }
#refPlayerProg { position: absolute; top: 0; left: 0; height: 3px; background: var(--accent-red); width: 0%; }


/* --- PLAYER OVERLAY & MINI PLAYER --- */
#pv { position: fixed; inset: 0; background: #fff; z-index: 5000; transform: translateY(100%); transition: transform .4s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; }
#pv.is-open { transform: translateY(0); }
.p-head { padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.ib { border: none; background: none; font-size: 1.5rem; color: #333; cursor: pointer; padding: 10px; }
.vl { flex: 1; overflow-y: auto; padding: 1.5rem; }
.vi { padding: 12px 0; border-bottom: 1px solid #f9f9f9; cursor: pointer; }
.vi.is-active { font-weight: 700; color: #000; }
.book-cover-large { width: 200px; height: 300px; object-fit: cover; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); }
#bookStage { display: none; flex: 1; align-items: center; justify-content: center; padding-bottom: 40px; }
#pv.mode-book #bookStage { display: flex; }
#pv.mode-bible .vl { display: block; }
.p-foot { position: absolute; bottom: 0; width: 100%; background: #fff; box-shadow: 0 -5px 30px rgba(0,0,0,0.05); }
.sc-wrap { position: relative; height: 4px; background: #eee; width: 100%; }
.sc-prog { height: 100%; background: #333; width: 0%; }
.sc-inp { position: absolute; top: -10px; left: 0; width: 100%; height: 30px; opacity: 0; cursor: pointer; }
.ctrl-row { display: flex; padding: 1rem 1.5rem; align-items: center; }
.foot-left { width: 100px; position: relative; }
.footer-art { width: 80px; height: 80px; border-radius: 16px; object-fit: cover; position: absolute; top: -40px; border: 4px solid #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.1); background:#eee; }
.foot-name { font-size: 0.65rem; font-weight: 700; margin-top: 45px; text-transform: uppercase; text-align: center; color: #888; }
.foot-right { flex: 1; padding-left: 15px; }
.track-ref { font-size: 0.9rem; font-weight: 800; text-align: center; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-deck { display: flex; justify-content: space-between; align-items: center; }
.c-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #444; padding: 10px; }
.play-btn { font-size: 1.8rem; color: #000; }
#mp { position: fixed; bottom: 0; width: 100%; height: 75px; background: rgba(255,255,255,0.98); backdrop-filter: blur(10px); border-top: 1px solid #eee; display: flex; align-items: center; padding: 0 1rem; z-index: 4000; transform: translateY(100%); transition: .3s; box-shadow: 0 -5px 15px rgba(0,0,0,0.05); }
#mp.is-visible { transform: translateY(0); }
.ma { width: 45px; height: 45px; border-radius: 10px; margin-right: 15px; background:#eee; object-fit: cover; }


