/* ================================================================ */
/* EMOTION APP - PRODUCTION SYSTEM STYLESHEET (css/style.css)       */
/* ================================================================ */

:root {
    --primary-color: #264653;
    --primary-hover: #1d3a44;
    --secondary-color: #2a9d8f;
    --accent-gold: #e9c46a;
    --danger-color: #e53935;
    --purple-accent: #8a2be2;
    --bg-main: #f0f2f5;
    --card-bg: #ffffff;
    --text-main: #1a1a2e;
    --text-muted: #65676b;
    --border-color: #e4e6eb;
    --radius-main: 14px;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Padauk', 'Pyidaungsu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    max-width: 100vw;
    overflow-x: hidden;
    writing-mode: horizontal-tb !important;
}

/* BADGE CHIPS & LABELS */
.badge-admin {
    background: var(--danger-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-fast);
}

.badge-chip:hover {
    transform: translateY(-1px);
}

.badge-chip.admin {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border: 1px solid rgba(229, 57, 53, 0.4);
}

/* TOAST NOTIFICATIONS */
#toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    width: 90%;
    max-width: 440px;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    padding: 12px 20px;
    margin-bottom: 8px;
    border-radius: 12px;
    color: #fff !important;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    animation: slideDown 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
    word-break: break-word;
    background: #2a9d8f !important;
}
    
.toast-item.info, .toast-item.success { background: var(--secondary-color) !important; }
.toast-item.warning { background: var(--accent-gold) !important; color: var(--text-main) !important; }
.toast-item.error { background: var(--danger-color) !important; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* HEADER */
.header {
    background: purple;
    color: gold;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    min-height: 60px;
    backdrop-filter: blur(8px);
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.header-user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 1;
    margin-left: 15px;
}

/* ============================================================
   ✅ FIX: Header User Info Layout
   - ဘယ်ဖက်: Display Name + Badge + Admin
   - ညာဖက်: Noti (ဘောင်မရှိ 🔔) + Logout
   ============================================================ */
.header-user-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-actions #btnLogout {
    background: #e53935;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.header-actions #btnLogout:hover {
    background: #c62828;
}

/* ✅ FIX: Noti ခလုတ် — ဘောင်မရှိ Plain Emoji */
.header-actions .btn-header-noti {
    background: transparent;
    color: white;
    border: none;
    border-radius: 0;
    font-size: 22px;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-actions .btn-header-noti:hover {
    transform: scale(1.15);
    opacity: 0.85;
}

.logo { display: flex; align-items: center; flex-shrink: 0; }
.e-box { width: 35px; height: 35px; position: relative; display: flex; justify-content: center; align-items: center; margin-right: 5px; }
.e-box::before { content: ""; position: absolute; inset: 0; border: 2px solid white; border-right: none; border-radius: 5px 10px 10px 5px; }
.e-letter { font-size: 22px; font-weight: 800; color: #f3b64d; }
.logo-text { font-size: 20px; font-weight: 700; color: white; margin-left: -10px;}

#userNameDisplay {
    font-size: 18px;
    font-weight: 500;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e6b800 !important;
    writing-mode: horizontal-tb !important;
}

#btnLogout {
    background: red;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-weight: 500;
    margin-left: auto;
    flex-shrink: 0;
}

/* MAIN CONTENT & CREATE POST CARD */
.main-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 12px 14px 20px;
    width: 100%;
    box-sizing: border-box;
}

.create-post-card {
    background: var(--card-bg);
    padding: 16px;
    border-radius: var(--radius-main);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    border: 1px solid rgba(0,0,0,0.03);
    width: 100%;
    box-sizing: border-box;
}

.create-post-card textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 16px;
    resize: vertical;
    min-height: 72px;
    outline: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    background: #f7f8fa;
    writing-mode: horizontal-tb !important;
}

.create-post-card textarea:focus {
    border-color: #264653;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(38, 70, 83, 0.1);
}

.video-warning-box {
    font-size: 12px;
    color: #d97706;
    margin-top: 6px;
    font-weight: 500;
}

.post-actions-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.media-upload-label {
    background: #eef2f7;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: purple;
    cursor: pointer;
    transition: background var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.media-upload-label:hover {
    background: #dce3ec;
}

#btnPost {
    display: inline-block !important;
    visibility: visible !important;
    background: purple;
    color: #fff;
    border: none;
    padding: 9px 28px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), opacity var(--transition-fast);
    margin-left: auto;
    flex-shrink: 0;
}

#btnPost:hover:not(:disabled) {
    background: var(--primary-hover);
}

#btnPost:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* MEDIA PREVIEWS */
.media-preview-box-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}

.media-preview-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    width: 90px;
    height: 90px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.media-preview-item img,
.media-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-preview-item button {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(229, 57, 53, 0.9);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: transform 0.15s;
}

.media-preview-item button:hover {
    transform: scale(1.15);
}

/* NEWS FEED & POST CARDS */
.loading-status {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.post-card {
    background: var(--card-bg);
    padding: 16px;
    border-radius: var(--radius-main);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    transition: box-shadow var(--transition-fast);
    width: 100%;
    box-sizing: border-box;
}

.post-card.pinned-post {
    border: 2px solid #8a2be2 !important;
    background: #fdfaff;
    position: relative;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    cursor: pointer;
    flex-shrink: 0;
}

.post-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Username Row Styling - Badges နှင့် တတန်းတည်းယှဥ်စေရန် */
.post-author-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.post-user-name,
.comment-author {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 15px;   
    color: var(--text-main);
    background: transparent;
    border: none;
    padding: 0;
    writing-mode: horizontal-tb !important;
}

/* Badge ရော Crown ပါရှိသော Account ၏ Username ကို ခရမ်းရောင် သီးသန့်ပေးခြင်း */
.post-user-name.badge-account,
.comment-author.badge-account,
.post-user-name.badge-account .user-name-text,
.comment-author.badge-account .user-name-text {
    color: var(--purple-accent) !important;
    font-weight: 700;
}

.badge-emoji,
.badge-chip,
.badge-official {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    font-size: 11px;
    border-radius: 6px;
    line-height: 1.2;
}

.crown-bg,
.badge-clip.crown-bg,
.badge-emoji.crown-bg {
    background: linear-gradient(45deg, #a020f0, #ff00ff) !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

.badge-bg,
.badge-clip.badge-bg,
.badge-emoji.badge-bg {
    background: linear-gradient(45deg, #00c853, #b2ff59) !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

.gold-bg,
.badge-clip.gold-bg,
.badge-emoji.gold-bg {
    background: linear-gradient(45deg, #ff9800, #ffc107) !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

.admin-bg,
.badge-clip.admin-bg,
.badge-emoji.admin-bg {
    background: linear-gradient(45deg, #60a5fa, #2563eb) !important;
    color: #ffffff !important;
}

.post-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.post-content {
    font-size: 14px;
    word-break: break-word;
    white-space: pre-wrap;
    margin-bottom: 12px;
    color: #2b2b36;
    line-height: 1.55;
    writing-mode: horizontal-tb !important;
}

.post-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 6px;
    margin: 12px 0;
    border-radius: 10px;
    overflow: hidden;
}

.post-media-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.post-media-grid img:hover {
    opacity: 0.92;
}

.post-media-video {
    width: 100%;
    max-height: 420px;
    background: #000;
    border-radius: 10px;
    margin: 10px 0;
}

.post-stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.post-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-top: 4px;
    gap: 4px;
    width: 100%;
    flex-wrap: wrap;
}

.post-actions button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 4px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    border-radius: 8px;
    transition: background var(--transition-fast), color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    outline: none;
}

.post-actions button:hover {
    background: var(--bg-main);
}

.post-actions button.active-like { color: var(--purple-accent) !important; font-weight: bold; }
.post-actions button.active-haha { color: var(--purple-accent) !important; font-weight: bold; }

/* COMMENTS */
.comment-section {
    display: none;
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    width: 100%;
}

.comment-section.open,
.comment-section.show {
    display: block !important;
}

.comment-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
}

.comment-input-row input {
    flex: 1;
    padding: 9px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    background: #f7f8fa;
    color: var(--text-main);
    transition: border-color var(--transition-fast);
    writing-mode: horizontal-tb !important;
}

.comment-input-row input:focus {
    border-color: var(--primary-color);
    background: #fff;
}

.comment-input-row button {
    background: purple !important;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.comment-input-row button:hover {
    background: #7b2fbe !important;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-item {
    background: #f0f2f5;
    padding: 10px 14px;
    border-radius: 14px;
    margin-bottom: 8px;
    width: 100%;
}

.comment-item .comment-text {
    color: #333;
    margin-top: 2px;
    font-size: 13px;
    word-break: break-word;
    writing-mode: horizontal-tb !important;
}

/* AUTH SETUP MODAL FIX (ပုံစံပျက်နေသည်ကို ပြန်လည်ပြင်ထားပါသည်) */
#nameSetupModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
}

.auth-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    padding: 24px 20px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.auth-modal-content h3 {
    font-size: 18px;
    color: var(--text-main);
    text-align: center;
    font-weight: 700;
    writing-mode: horizontal-tb !important;
}

.auth-input-wrapper {
    position: relative;
    width: 100%;
}

.auth-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    background: #f8f9fa;
    transition: border-color 0.2s, background 0.2s;
    writing-mode: horizontal-tb !important;
}

.auth-input:focus {
    border-color: purple;
    background: #ffffff;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.auth-button-group {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.auth-button-group button {
    flex: 1;
    padding: 11px 0;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

#signInBtn {
    background: purple;
    color: #fff;
}

#signUpBtn {
    background: #eef2f7;
    color: var(--text-main);
}

.auth-button-group button:hover {
    opacity: 0.9;
}

.auth-warning-text {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    text-align: center;
    background: #fff8e1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ffe082;
    writing-mode: horizontal-tb !important;
}

/* BOTTOM NAVIGATION STYLES FIX (a tag များ ပုံစံပျက်နေသည်ကို ပြန်လည်ပြင်ထားပါသည်) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    flex: 1;
    height: 100%;
    transition: color 0.2s;
    writing-mode: horizontal-tb !important;
}

.bottom-nav .nav-item .nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.bottom-nav .nav-item.active,
.bottom-nav .nav-item:hover {
    color: purple;
    font-weight: 700;
    text-decoration: none !important;
}

/* PHOTO VIEWER MODAL */
#photoViewerModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#photoViewerModal img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.close-viewer {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 24px;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
}

.nav-btn.prev { left: 16px; }
.nav-btn.next { right: 16px; }

#photoCount {
    position: absolute;
    bottom: 20px;
    color: #fff;
    font-size: 14px;
    writing-mode: horizontal-tb !important;
}

/* UPLOAD PROGRESS OVERLAY */
#uploadProgressWrapper {
    position: fixed;
    bottom: calc(75px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    display: none;
    z-index: 10000;
    min-width: 290px;
    max-width: 90%;
    border: 1px solid var(--border-color);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.status-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    writing-mode: horizontal-tb !important;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: #e4e6eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--secondary-color);
    transition: width 0.2s ease;
}

.progress-detail {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
    font-weight: bold;
    writing-mode: horizontal-tb !important;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 480px) {
    .header { padding: 10px 14px; }
    .main-content { padding: 8px 10px 16px; }
    .post-card { padding: 12px; }
    .post-actions button { font-size: 12px; padding: 6px 2px; }
    .badge-chip { font-size: 10px; padding: 1px 6px; }
}
/* Progress Bar Floating Style */
#uploadProgressWrapper {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 10000;
    border: 1px solid #800080;
}
.progress-track {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 6px 0;
}
.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #800080, #f3b64d);
    transition: width 0.2s ease;
}
.progress-header { display: flex; justify- shadow: space-between; font-size: 12px; font-weight: bold; }

.comment-section { 
    margin-top: 10px; 
    background: #f0f2f5; 
    border-radius: 8px; 
    padding: 10px; 
    display: none; /* စတင်ချိန်တွင် ဖျောက်ထားမည် */
}
.comment-input-box {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.comment-input-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 18px;
    outline: none;
    font-size: 13px;
}
.comment-input-box button {
    background: var(--purple);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 18px;
    cursor: pointer;
    font-weight: bold;
}
.profile-shared-header {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 8px 12px;

    font-size: 13px;
    font-weight: 600;

    border-bottom: 1px solid rgba(128, 0, 128, 0.08);
}

.profile-shared-icon {
    font-size: 16px;
}

.profile-shared-label {
    font-size: 13px;
}

.profile-shared-post {
    position: relative;
}

.profile-shared-original {
    display: flex;
    align-items: center;
    gap: 6px;

    margin: 8px 12px 10px;

    font-size: 12px;
}

.profile-shared-original-link {
    cursor: pointer;
    text-decoration: none;
}
/* ================================================================
 * EMOTION — SHARE DESTINATION PICKER
 * ================================================================ */

.emotion-share-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.55);
}

.emotion-share-picker {
    width: min(360px, 100%);

    padding: 20px;

    border-radius: 16px;

    background: #ffffff;
    color: #222222;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25);
}

.emotion-share-picker-title {
    font-size: 20px;
    font-weight: 700;

    margin-bottom: 6px;
}

.emotion-share-picker-subtitle {
    font-size: 14px;
    line-height: 1.5;

    margin-bottom: 18px;

    opacity: 0.72;
}

.emotion-share-picker-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.emotion-share-destination-btn,
.emotion-share-picker-cancel {
    width: 100%;
    min-height: 46px;

    border-radius: 10px;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
}

.emotion-share-destination-btn {
    border: 1px solid #800080;

    background: #800080;
    color: #ffffff;
}

.emotion-share-picker-cancel {
    margin-top: 10px;

    border: 1px solid #d0d0d0;

    background: transparent;
    color: #555555;
}

.emotion-share-destination-btn:focus-visible,
.emotion-share-picker-cancel:focus-visible {
    outline: 3px solid rgba(128, 0, 128, 0.25);
    outline-offset: 2px;
}

.feed-share-button.is-sharing {
    opacity: 0.6;
    cursor: wait;
}

.feed-share-button.is-shared {
    opacity: 0.75;
}


/* ================================================================
 * DARK MODE
 * ================================================================ */

@media (prefers-color-scheme: dark) {
    .emotion-share-picker {
        background: #202020;
        color: #ffffff;
    }

    .emotion-share-picker-cancel {
        border-color: #555555;
        color: #dddddd;
    }
}
/* ============================================================
   APPLY GRID — BADGE APPLICATION
   ============================================================ */

.apply-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
}

/* Tablet/Desktop: 3 columns */
@media (min-width: 500px) {
    .apply-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.apply-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 16px 14px;
    border-radius: 14px;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 160px;
    overflow: hidden;
    position: relative;
}

.apply-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.apply-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.apply-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.apply-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    overflow-wrap: anywhere;
}

.apply-subtitle {
    font-size: 10px;
    opacity: 0.92;
    margin: 4px 0 10px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.apply-btn {
    display: inline-block;
    padding: 7px 14px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.apply-btn:hover {
    background: #ffffff;
    transform: scale(1.05);
}

.apply-btn:active {
    transform: scale(0.97);
}

/* ------------------------------------------------------------
   GOLD CARD
   ------------------------------------------------------------ */
.gold-card {
    background: linear-gradient(135deg, #2ecc71 0%, #145a32 100%);
    border: 2px solid #1e8449;
}
    
.gold-card .apply-btn {
    color: #7a5800;
}

/* ------------------------------------------------------------
   CROWN CARD
   ------------------------------------------------------------ */
.crown-card {
    background: linear-gradient(135deg, #800080 0%, #4b0082 100%);
    border: 2px solid #6a006a;
}

.crown-card .apply-btn {
    color: #4b0082;
}

/* ------------------------------------------------------------
   SENIOR CARD (အသစ်)
   ------------------------------------------------------------ */
.senior-card {
    background: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 100%);
    border: 2px solid #1e40af;
}

.senior-card .apply-btn {
    color: #1e3a8a;
}

/* ------------------------------------------------------------
   SMALL MOBILE
   ------------------------------------------------------------ */
@media (max-width: 360px) {
    .apply-card {
        padding: 12px 10px;
        min-height: 140px;
    }

    .apply-title {
        font-size: 12px;
    }

    .apply-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
}
.avatar-box {
    position: relative;
    width: 90px;      /* 100 → 90 */
    height: 90px;     /* 100 → 90 */
    flex-shrink: 0!important;
}
/* Default (Desktop) */
.cover-photo {
    width: 100%;
    height: 180px;
    background: #ddd;
    position: relative;
    overflow: hidden;
}
@media (max-width: 768px) {
    .cover-photo {
        height: 140px;          /* ⬅️ Tablet */
    }
}

@media (max-width: 480px) {
    .cover-photo {
        height: 100px;          /* ⬅️ Mobile */
    }
}

@media (max-width: 360px) {
    .cover-photo {
        height: 80px;           /* ⬅️ Small Mobile */
    }
}
/* ============================================================
   ROOT & GLOBAL VARIABLES
   ============================================================ */
:root {
    --purple: #800080;
    --purple-dark: #6a006a;
    --bg: #f0f2f5;
    --glass: rgba(128, 0, 128, 0.08);
    --card-bg: #ffffff;
    --border: #e5e5e5;
    --text: #222;
    --muted: #777;
    --danger: #e53935;
    --safe-radius: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 65px 8px 100px;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.6;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Pyidaungsu", "Padauk", sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

button, input, textarea {
    font: inherit;
}

button, label, a {
    -webkit-tap-highlight-color: transparent;
}

img, video {
    max-width: 100%;
}

img {
    display: block;
}

button:disabled {
    cursor: not-allowed;
}

/* ============================================================
   GLOBAL HEADER
   ============================================================ */
.global-header {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    height: 55px;
    background-color: var(--purple);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.e-box {
    width: 35px;
    height: 35px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 5px;
}

.e-box::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid white;
    border-right: none;
    border-radius: 5px 10px 10px 5px;
}

.e-letter {
    font-size: 22px;
    font-weight: 800;
    color: #f3b64d;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.header-user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 1;
    min-width: 0;
    margin-left: 15px;
}

.header-user-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
}

#userNameDisplay {
    cursor: pointer;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
}

#btnLogout {
    background: var(--danger);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

#btnLogout:hover {
    background: #c62828;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-actions .btn-header-noti {
    background: transparent;
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 0;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-actions .btn-header-noti:hover {
    transform: scale(1.15);
    opacity: 0.85;
}

/* ============================================================
   GENERAL CARDS & LAYOUT
   ============================================================ */
.profile-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: var(--safe-radius);
    width: 100%;
    max-width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.info-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: var(--safe-radius);
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    font-size: 13px;
}

.main-content {
    width: 100%;
    max-width: 100%;
    padding: 0 5px;
}

.app-tab {
    width: 100%;
    contain: layout style;
}

/* ============================================================
   PROFILE / COVER
   ============================================================ */
.cover-photo {
    width: 100%;
    height: 160px;
    background: #ddd;
    position: relative;
    overflow: hidden;
}

.cover-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* ✅ FIX: Cover Edit ခလုတ်ကို အပေါ်ဆုံးမှာ ထားပါ */
.btn-cover {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    z-index: 10; /* ⬅️ ဒီအချက်ကို ထည့်ပါ */
    }


.avatar-box {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.avatar-box img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid white;
    background: #eee;
    object-fit: cover;
}

.btn-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--purple);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid white;
    cursor: pointer;
}

.name-box {
    min-width: 0;
}

.name-box h3 {
    overflow-wrap: anywhere;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 13px;
    background: #f9f9f9;
    padding: 8px 12px;
    border-radius: 30px;
    justify-content: center;
    align-items: center;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-weight: bold;
    color: var(--purple);
    font-size: 16px;
}

/* ============================================================
   FEED
   ============================================================ */
.feed-divider {
    width: 100%;
    max-width: 100%;
    height: 1px;
    background: #e0e0e0;
    margin: 25px 0;
    position: relative;
    text-align: center;
}

.feed-divider::after {
    content: "Latest Updates";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    padding: 0 15px;
    font-size: 12px;
    color: #888;
    font-weight: bold;
}

.post-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    position: relative;
    padding-right: 50px;
}

.post-author {
    font-weight: bold;
    color: purple;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.post-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-time {
    font-size: 11px;
    color: gray;
    margin-top: 2px;
}

.post-text {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.post-media-container {
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-action-btn {
    flex: 1;
    padding: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 4px;
    color: #65676b;
    transition: 0.2s;
}

.post-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.comment-section {
    margin-top: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    display: none;
    overflow: hidden;
}

.post-video {
    width: 100%;
    border-radius: 8px;
    background: #000;
    max-height: 400px;
}

.loading-status {
    text-align: center;
    padding: 20px;
    color: gray;
}

.skeleton {
    animation: pulse 1.5s ease-in-out infinite;
    background: #f0f0f0;
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 12px;
    height: 200px;
    width: 100%;
    max-width: 100%;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.media-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge-crown {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    margin-left: 4px;
    animation: crownGlow 2s ease-in-out infinite;
}

.badge-gold {
    background: linear-gradient(135deg, #e6b800, #cca300);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    margin-left: 4px;
}

.badge-basic {
    background: #6c5ce7;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    margin-left: 4px;
}

.badge-chip {
    background: #e53935;
    color: white;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
}

@keyframes crownGlow {
    0%, 100% { text-shadow: 0 0 2px gold; box-shadow: 0 0 2px gold; }
    50% { text-shadow: 0 0 8px gold; box-shadow: 0 0 8px gold; }
}

/* ============================================================
   PHOTO VIEWER
   ============================================================ */
.photo-viewer-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    user-select: none;
    padding: 10px;
}

.photo-viewer-content {
    max-width: 95%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 4px;
}

.photo-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 35px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
}

.photo-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.photo-viewer-prev { left: 20px; }
.photo-viewer-next { right: 20px; }

.photo-viewer-counter {
    position: absolute;
    bottom: 20px;
    color: white;
    font-size: 14px;
}

/* ============================================================
   AUTH MODAL
   ============================================================ */
.modal-auth {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.auth-modal-content {
    background: white;
    width: 100%;
    max-width: 380px;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
}

.auth-modal-content h3 {
    font-size: 18px;
    font-weight: bold;
    color: var(--purple);
    margin-bottom: 15px;
    text-align: center;
}

.auth-input-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.auth-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.auth-input:focus {
    border-color: var(--purple);
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.auth-button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.auth-button-group button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

#signInBtn {
    background: var(--purple);
    color: white;
}

#signUpBtn {
    background: #e0e0e0;
    color: #333;
}

.auth-warning-text {
    font-size: 11px;
    color: #666;
    margin-top: 12px;
    text-align: center;
    line-height: 1.4;
}

.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #888;
    cursor: pointer;
}

/* ============================================================
   LIVE
   ============================================================ */
.live-container,
.live-cTaber {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

.live-container video,
.live-cTaber video,
#liveVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.live-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 10;
}

.live-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

.live-badge {
    background: #ff4757;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    animation: blink 1.5s infinite;
    color: white;
}

.viewer-count {
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 14px;
    margin-left: 8px;
    color: white;
}

.magic-status-overlay {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    pointer-events: none;
    width: 100%;
}

.magic-box {
    text-align: center;
    padding: 30px;
    max-width: 320px;
    animation: magicShake 3s ease-in-out infinite;
}

.box-icon {
    font-size: 100px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 20px #800080);
}

.magic-text {
    color: white;
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.magic-subtext {
    color: #4f4;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 500;
}

.live-chat-section {
    width: 100%;
    max-width: 350px;
    height: 35%;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#liveChatMsgs {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 10px;
}

.live-chat-bubble {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.live-chat-user {
    font-weight: bold;
    color: #ffca2c;
    margin-right: 5px;
}

.live-input-group {
    display: flex;
    gap: 8px;
    margin-top: 5px;
    padding-bottom: 10px;
}

.live-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 12px 15px;
    color: white;
    outline: none;
    backdrop-filter: blur(5px);
}

.btn-send-live {
    background: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.btn-close-live {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
}

@keyframes blink {
    50% { opacity: 0.6; }
}

@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes magicShake {
    0%, 100% { transform: translateY(0) rotate(0); }
    15% { transform: translateY(-15px) rotate(-5deg); }
    30% { transform: translateY(0) rotate(5deg); }
    45% { transform: translateY(-10px) rotate(-3deg); }
    60% { transform: translateY(0) rotate(3deg); }
}

/* ============================================================
   PAGE
   ============================================================ */
.page-selection-box {
    margin-bottom: 12px;
    padding: 10px;
    background: #f3e5f5;
    border-radius: 8px;
    border: 1px solid #ba68c8;
    font-size: 13px;
}

.page-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: 0.2s;
}

.page-list-item:hover {
    background: #f0f0f0;
}

.page-list-item.selected {
    background: #e1bee7;
    font-weight: bold;
}

/* ============================================================
   CHAT
   ============================================================ */
#chatTab .chat-shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 165px);
    width: 100%;
    min-height: 300px;
}

#chatTab .chat-header {
    background: var(--purple);
    color: white;
    padding: 0 15px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    justify-content: space-between;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 10px;
}

#chatTab #chatBox {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 5px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f7f7f7;
    border-radius: 12px;
    overscroll-behavior: contain;
}

#chatTab .msg {
    max-width: 80%;
    padding: 10px;
    border-radius: 15px;
    font-size: 14px;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#chatTab .msg.sent {
    align-self: flex-end;
    background: var(--purple);
    color: white;
    border-bottom-right-radius: 2px;
}

#chatTab .msg.received {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 2px;
}

#chatTab .msg img {
    width: 100%;
    max-width: 250px;
    border-radius: 10px;
    margin-top: 5px;
    display: block;
    object-fit: contain;
}

#chatTab .sender-name {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 3px;
    display: block;
    color: #888;
}

#chatTab .msg-time {
    font-size: 9px;
    display: block;
    margin-top: 4px;
    text-align: right;
    opacity: 0.7;
}

#chatTab .footer-wrapper {
    background: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #eee;
    border-radius: 12px;
    margin-top: 8px;
    flex-shrink: 0;
}

#chatTab .input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    height: 60px;
}

#chatTab .input-box {
    flex: 1;
    min-width: 0;
    background: #f1f1f1;
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    outline: none;
    font-size: 16px !important;
}

#chatTab .btn-send {
    background: var(--purple);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================================
   NOTIFICATION
   ============================================================ */
#notiTab {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#notiTab .header-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin-bottom: 20px;
    border-top: 4px solid var(--purple);
}

#notiTab h2 {
    color: var(--purple);
    margin: 10px 0;
    font-size: 22px;
}

#notiTab .btn-test {
    background: var(--purple);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.3s;
    opacity: 0.8;
}

#notiTab .btn-test:hover {
    opacity: 1;
}

#notiTab .notif-container {
    width: 100%;
    max-width: 400px;
}

#notiTab .notif-header {
    font-weight: bold;
    color: #555;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

#notiTab .notif-item {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border: 1px solid #efefef;
    transition: 0.3s;
    position: relative;
    cursor: pointer;
}

#notiTab .notif-item:active {
    transform: scale(0.98);
    background: #f9f9f9;
}

#notiTab .notif-item.unread {
    background: var(--glass);
    border-left: 5px solid var(--purple);
}

#notiTab .notif-icon {
    font-size: 24px;
    background: #eee;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

#notiTab .notif-content {
    text-align: left;
    flex: 1;
    min-width: 0;
}

#notiTab .notif-title {
    font-weight: bold;
    font-size: 15px;
    color: #222;
}

#notiTab .notif-body {
    font-size: 13px;
    color: #555;
    margin-top: 3px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

#notiTab .notif-time {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
    display: block;
}

#notiTab .unread-dot {
    width: 10px;
    height: 10px;
    background: #e74c3c;
    border-radius: 50%;
    position: absolute;
    right: 15px;
    top: 15px;
}

#notiTab .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* ============================================================
   ACTION STATE
   ============================================================ */
button[data-action-state="busy"] {
    opacity: 0.65;
    cursor: wait;
    pointer-events: none;
}

button[data-action-state="done"] {
    opacity: 1;
}

button[data-action-state="failed"] {
    opacity: 1;
}

.action-status {
    min-height: 0;
}

/* ============================================================
   INIT / AUTH READY
   ============================================================ */
button[data-init-pending="true"] {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* ============================================================
   INPUTS
   ============================================================ */
.auth-input,
textarea,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"] {
    font-size: 16px !important;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
label:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
}

[aria-busy="true"] {
    cursor: progress;
}

/* ============================================================
   GLOBAL UPLOAD
   ============================================================ */
#uploadProgressWrapper {
    max-width: min(400px, calc(100vw - 20px));
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   SMALL MOBILE
   ============================================================ */
@media (max-width: 420px) {
    body {
        padding-left: 5px;
        padding-right: 5px;
    }

    .global-header {
        padding-left: 10px;
        padding-right: 10px;
    }

    .logo-text {
        font-size: 18px;
    }

    #userNameDisplay {
        max-width: 30vw;
    }

    .header-actions {
        gap: 4px;
    }

    .header-actions #btnLogout {
        padding-left: 8px;
        padding-right: 8px;
    }

    .avatar-box {
        width: 88px;
        height: 88px;
    }

    .profile-info {
        padding-left: 10px;
        padding-right: 10px;
    }

    #chatTab .msg {
        max-width: 88%;
    }

    .photo-viewer-nav {
        width: 44px;
        height: 44px;
    }

    .photo-viewer-prev {
        left: 8px;
    }

    .photo-viewer-next {
        right: 8px;
    }
}

.profile-info {
    display: flex;
    align-items: flex-end;
    padding: 0 15px 15px;
    margin-top: -40px; 
    position: relative;
    z-index: 1; /* ⬅️ z-index ကို 2 မှ 1 သို့ ပြောင်းပါ */
}
    .name-box {
        margin-top: 8px; /* နာမည်ကို အောက်ကို နည်းနည်းချပေးခြင်း */
    }

    .name-box h3 {
        font-size: 16px; /* ဖုန်းပေါ်မှာ စာလုံးအရွယ်ကို နည်းနည်းလျှော့ */
        margin-bottom: 4px;
        line-height: 1.2;
    }
}
/* ============================================================
   FOLLOW BUTTON CENTERING FIX (- နှင့် + ကို အလယ်ကျစေရန်)
   ============================================================ */

/* Profile နှင့် Feed ထဲက Follow Button အားလုံးအတွက် */
#profileFollowBtn,
.follow-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    text-align: center;
    box-sizing: border-box;
    
    /* စာလုံးကို အနည်းငယ် အောက်ချပြီး အလယ်ကျစေရန် */
    padding-bottom: 2px !important; 
}

/* အကယ်၍ စာလုံးက အလွန်သေးနေရင် နည်းနည်းကြီးအောင် လုပ်နိုင်ပါတယ် */
#profileFollowBtn {
    font-size: 24px !important; /* မူလ 26px မှ ချိန်ညှိထားသည် */
}

