:root {
    --brand-blue: #063970;
    --brand-red: #E63946; 
    --wa-green: #25D366;
    --fb-blue: #1877F2;
    --header-bg: #F8F9FA; 
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-light: #F0F2F5;
    --plyr-color-main: var(--brand-red);
    --plyr-video-background: #031e3a;
    --plyr-control-radius: 12px;
}

/* Custom Large Play Button Enhancement */
.plyr__control--overlaid {
    background: rgba(230, 57, 70, 0.9) !important;
    padding: 25px !important;
}
.plyr__control--overlaid svg {
    width: 40px !important;
    height: 40px !important;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body, html {
    height: 100%; background-color: var(--brand-blue);
    font-family: 'Inter', sans-serif; color: white; overflow: hidden;
}

#app-wrapper {
    max-width: 500px; margin: 0 auto; 
    height: 100vh; height: 100dvh; 
    position: relative; background: var(--brand-blue);
    box-shadow: 0 0 50px rgba(0,0,0,0.5); overflow: hidden;
}

.bottom-line {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 4px;
    background: var(--brand-red); z-index: 9999;
}

#initial-loader {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--brand-blue); z-index: 5000; display: flex;
    flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.5s ease;
}

.top-nav {
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 15px 20px; z-index: 200;
    background: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    display: flex; align-items: center; justify-content: space-between;
    transition: opacity 0.3s ease; pointer-events: none;
}

.logo { height: 36px; cursor: pointer; pointer-events: auto; }
.menu-trigger {
    background: #fff; border: 1px solid #ddd;
    padding: 10px; border-radius: 10px; cursor: pointer; display: flex; gap: 4px; flex-direction: column;
    pointer-events: auto; box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.menu-trigger span { width: 20px; height: 2px; background: var(--brand-blue); border-radius: 2px; }

.menu-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(6, 57, 112, 0.98); backdrop-filter: blur(8px); z-index: 900;
    display: none; flex-direction: column; align-items: center; justify-content: center;
    gap: 30px; animation: fadeIn 0.2s;
}
.menu-overlay.active { display: flex; }
.menu-link { font-size: 1.8rem; font-weight: 600; color: white; text-decoration: none; cursor: pointer; transition: color 0.2s; }
.menu-link:hover { color: var(--brand-red); }

#feed-container {
    height: 100vh; height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory; 
    scrollbar-width: none; background: var(--brand-blue);
}
#feed-container::-webkit-scrollbar { display: none; }

.post-card {
    height: 100vh; height: 100dvh; width: 100%; scroll-snap-align: start;
    position: relative; display: flex; align-items: center; overflow: hidden;
    background: var(--brand-blue);
}

.carousel-container { width: 100%; height: 100%; position: relative; z-index: 1; }
.carousel-track { display: flex; height: 100%; transition: transform 0.4s ease; }
.slide-media {
    flex: 0 0 100%; width: 100%; height: 100%;
    object-fit: contain !important; background: #031e3a; cursor: pointer;
}
.plyr { width: 100%; height: 100%; }
.plyr--video { height: 100% !important; }

.media-counter {
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
    padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
    display: inline-flex; align-items: center; gap: 5px; 
    border: 1px solid rgba(255,255,255,0.1); 
    margin-bottom: 8px; align-self: center;
    color: #fff; text-transform: uppercase; letter-spacing: 1px;
}
.media-counter svg { width: 14px; fill: white; opacity: 0.8; }

.post-card.focus-mode .post-overlay,
.post-card.focus-mode .action-bar {
    opacity: 0; pointer-events: none; transform: translateY(20px);
}

.post-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 120px 80px 30px 20px;
    background: linear-gradient(to top, rgba(6,57,112,1) 0%, rgba(6,57,112,0.85) 30%, rgba(6,57,112,0) 100%);
    z-index: 10; display: flex; flex-direction: column; 
    cursor: pointer; transition: all 0.3s ease;
}

.post-card.text-only-post .post-overlay {
    position: relative; height: 100%; justify-content: center; 
    background: var(--brand-blue); padding: 80px 80px 80px 20px; overflow-y: auto; 
}

.post-meta { font-size: 0.8rem; color: #a8bacc; letter-spacing: 0.5px; text-align: left; margin-bottom: 4px; }
.author-name { font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: 2px; text-align: left;}

.post-content-text { 
    font-size: 0.95rem; line-height: 1.5; color: var(--text-light); text-align: left;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.read-more-btn { color: var(--brand-red); font-weight: 600; margin-top: 2px; display: inline-block; font-size: 0.9rem;}

.action-bar {
    position: absolute; right: 15px; bottom: 40px;
    display: flex; flex-direction: column; gap: 16px; z-index: 25; transition: all 0.3s ease;
}
.btn-circle {
    width: 46px; height: 46px; border-radius: 23px;
    background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform 0.1s, background 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-circle:active { transform: scale(0.9); }
.btn-wa svg { fill: var(--wa-green); width: 24px; }
.btn-fb { background: var(--fb-blue); border: none; }
.btn-fb svg { fill: white; width: 20px; }
.btn-share svg { fill: white; width: 18px; }

.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(6, 57, 112, 0.95); backdrop-filter: blur(6px); z-index: 2000;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal.active { display: flex; animation: fadeIn 0.2s; }
.modal-card {
    background: #042850; width: 100%; max-width: 450px;
    border-radius: 20px; padding: 24px; position: relative;
    border: 1px solid var(--glass-border); max-height: 85vh; overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.modal-media-list { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; }
.modal-media-list img, .modal-media-list .plyr {
    width: 100%; border-radius: 10px; background: #02142a; object-fit: contain; max-height: 350px;
}
.modal-body { white-space: pre-wrap; line-height: 1.6; color: var(--text-light); font-size: 0.95rem; margin-bottom: 5px; }

.close-btn {
    position: absolute; top: 12px; right: 12px;
    background: rgba(255,255,255,0.1); color: #fff; border: none;
    width: 48px; height: 48px; border-radius: 24px; cursor: pointer; z-index: 10;
    transition: background 0.2s; font-size: 1.4rem; font-weight: bold;
    display: flex; align-items: center; justify-content: center;
}

.mini-spinner {
    width: 30px; height: 30px; border: 3px solid rgba(255,255,255,0.2); 
    border-top-color: var(--brand-red); border-radius: 50%; 
    animation: spin 0.8s linear infinite; margin: 0 auto;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { 100% { transform: rotate(360deg); } }
