/* --- COLOR VARIABLES (LOCKED TO PREMIUM DARK MODE) --- */
:root {
    --bg-main: #0a0a0a;
    --bg-panel: #111111;
    --bg-hover: #18181b;
    --border: #27272a;
    --border-hover: #3f3f46;
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --btn-bg: #ffffff;
    --btn-text: #000000;
    --accent: #4ade80; /* The sleek green */
}

/* Core Page Setup */
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main); 
    margin: 0;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.app-wrapper { display: flex; min-height: 100vh; }

/* -------------------------------------
   RETRACTABLE SIDEBAR & SUB-MENUS
-------------------------------------- */
.sidebar {
    width: 280px; background-color: var(--bg-panel); border-right: 1px solid var(--border); 
    position: fixed; top: 0; bottom: 0; left: 0; display: flex; flex-direction: column; padding: 20px 0; z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); white-space: nowrap; overflow: visible;
}
.sidebar-toggle-btn {
    position: absolute; right: -14px; top: 40px; width: 28px; height: 28px; background: var(--bg-panel); color: var(--text-main);
    border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
    font-size: 12px; z-index: 101; transition: all 0.2s ease; box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.sidebar-toggle-btn:hover { background: var(--bg-hover); border-color: var(--text-muted); transform: scale(1.05); }
.hide-on-collapse { opacity: 1; transition: opacity 0.15s ease; display: inline-block; vertical-align: middle; }

.sidebar-profile-mini { display: flex; align-items: center; padding: 0 20px; margin-bottom: 10px; transition: padding 0.3s ease; }
.sidebar-avatar-mini { width: 45px; height: 45px; border-radius: 50%; margin-right: 12px; object-fit: cover; flex-shrink: 0; }
.sidebar-stats { padding: 0 20px; font-size: 13px; color: var(--text-muted); margin-bottom: 25px; border-bottom: 1px solid var(--border); padding-bottom: 25px; transition: opacity 0.2s ease; }

.sidebar-nav-group { padding: 0 10px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-link { display: flex; align-items: center; padding: 12px 15px; color: var(--text-main); text-decoration: none; font-size: 15px; font-weight: 500; border-radius: 8px; transition: background 0.2s ease, padding 0.3s ease; opacity: 0.85; }
.sidebar-link:hover { background-color: var(--bg-hover); opacity: 1; }
.sidebar-link.active { color: var(--accent); background-color: rgba(74, 222, 128, 0.08); font-weight: 600; opacity: 1; }
.sidebar-link span.icon { margin-right: 15px; font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; display: inline-block; }
.notification-dot { background: var(--accent); color: #000; border-radius: 50%; padding: 2px 7px; font-size: 11px; font-weight: 700; margin-left: auto; transition: opacity 0.2s ease; }

/* Submenu for Creator Tools */
.sidebar-subsubmenu { margin-top: 5px; margin-bottom: 10px; margin-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-sublink { display: flex; align-items: center; padding: 10px 15px; color: var(--text-muted); text-decoration: none; font-size: 14px; border-radius: 8px; transition: background 0.2s ease, padding 0.3s ease; }
.sidebar-sublink:hover { color: var(--text-main); background-color: var(--bg-hover); }
.sidebar-sublink.active { color: var(--accent); background-color: rgba(74, 222, 128, 0.08); font-weight: 600; }
.sidebar-sublink span.icon { margin-right: 10px; font-size: 16px; width: 16px; text-align: center; }

.sidebar-new-post-btn { background: var(--btn-bg); color: var(--btn-text); border: none; border-radius: 9999px; padding: 14px; margin: 20px 15px; font-weight: 600; font-size: 15px; cursor: pointer; text-align: center; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; border: 1px solid var(--border); }
.sidebar-new-post-btn:hover { opacity: 0.9; }
.sidebar-new-post-btn .icon-only { position: absolute; opacity: 0; font-size: 24px; transition: opacity 0.3s ease; }
.sidebar-new-post-btn .text-only { transition: opacity 0.3s ease; }

.sidebar-bottom-widget { padding: 0 15px; margin-top: auto; }
.widget-pill { background: var(--bg-hover); border: 1px solid var(--border); border-radius: 99px; padding: 12px; display: flex; justify-content: center; align-items: center;}

/* Collapsed State */
body.sidebar-collapsed .sidebar { width: 85px; }
body.sidebar-collapsed .hide-on-collapse { opacity: 0; width: 0; overflow: hidden; pointer-events: none; }
body.sidebar-collapsed .sidebar-profile-mini { padding-left: 20px; }
body.sidebar-collapsed .sidebar-link { padding-left: 20px; }
body.sidebar-collapsed .sidebar-subsubmenu { margin-left: 0; }
body.sidebar-collapsed .sidebar-sublink { padding-left: 10px; }
body.sidebar-collapsed .sidebar-new-post-btn { width: 55px; height: 55px; padding: 0; margin: 20px 15px; border-radius: 50%; }
body.sidebar-collapsed .sidebar-new-post-btn .text-only { opacity: 0; }
body.sidebar-collapsed .sidebar-new-post-btn .icon-only { opacity: 1; }
body.sidebar-collapsed .main-content { margin-left: 85px; }
body.sidebar-collapsed .sidebar-stats { opacity: 0; padding-bottom: 0; border: none; margin-bottom: 10px; pointer-events: none; height: 0; margin: 0; }


/* -------------------------------------
   MAIN CONTENT & CARDS (FANVUE STYLE)
-------------------------------------- */
.main-content { flex-grow: 1; margin-left: 280px; display: flex; justify-content: center; padding: 40px 20px; transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.main-content.no-sidebar { margin-left: 0; }
.feed-container { width: 100%; max-width: 650px; }

/* The new Profile Card */
.profile-card { background: var(--bg-main); border: none; margin-bottom: 25px; padding-bottom: 0; border-bottom: 1px solid var(--border); }
@media (min-width: 768px) { .profile-card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; } }

.banner-container { width: 100%; height: 220px; position: relative; background: var(--bg-hover); overflow: hidden; }
.banner-image { width: 100%; height: 100%; object-fit: cover; display: block; }

.profile-info { padding: 0 20px; position: relative; }
.profile-top-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: -55px; margin-bottom: 15px; }
.profile-avatar-wrapper { position: relative; }
.profile-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg-main); background-color: var(--bg-hover); overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }

.profile-actions-right { display: flex; gap: 15px; margin-bottom: 10px; }
.icon-btn { background: transparent; border: none; color: var(--text-main); font-size: 20px; cursor: pointer; transition: opacity 0.2s; padding: 0; }
.icon-btn:hover { opacity: 0.7; }

.profile-name { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -0.5px; }
.profile-handle { color: var(--text-muted); font-size: 15px; font-weight: 500; margin-top: 2px; margin-bottom: 15px; }

.profile-stats-row { display: flex; gap: 15px; font-size: 14px; color: var(--text-muted); font-weight: 600; margin-bottom: 20px; }
.profile-stats-row span { display: flex; align-items: center; gap: 6px; }

.profile-bio { font-size: 15px; line-height: 1.5; margin-bottom: 25px; color: var(--text-main); opacity: 0.9; }

/* The Massive Action Buttons */
.profile-cta-row { margin-bottom: 30px; width: 100%; display: flex; }
.fv-btn { display: flex; align-items: center; justify-content: center; padding: 16px 24px; border-radius: 999px; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; transition: transform 0.2s, opacity 0.2s; width: 100%; box-sizing: border-box; border: none; }
.fv-btn:active { transform: scale(0.98); }
.fv-btn:hover { opacity: 0.9; }
.fv-btn-primary { background: var(--accent); color: #000; box-shadow: 0 4px 15px rgba(74, 222, 128, 0.2); }
.fv-btn-white { background: #fff; color: #000; }
.fv-btn-admin { background: var(--bg-hover); color: var(--text-main); border: 1px solid var(--border); }
.fv-btn-subscribed { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* The Bottom Tabs */
.profile-tabs { display: flex; padding: 0 10px; }
.fv-tab { flex: 1; text-align: center; padding: 15px 0; color: var(--text-muted); font-weight: 600; font-size: 15px; cursor: pointer; transition: color 0.2s; position: relative; }
.fv-tab.active { color: var(--text-main); }
.fv-tab.active::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }

/* Feed Post Cards */
.post-card, .premium-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 25px; padding: 20px; }
.post-image, .post-video { width: 100%; aspect-ratio: 1 / 1; border-radius: 12px; margin-top: 15px; display: block; object-fit: cover; border: 1px solid var(--border); background: #000; }

.btn-outline { background: transparent; border: 1px solid var(--border-hover); border-radius: 9999px; padding: 10px 20px; font-weight: 600; font-size: 14px; color: var(--text-main); cursor: pointer; transition: background 0.2s; text-decoration: none;}
.btn-outline:hover { background: var(--bg-hover); }
.btn-primary { width: 100%; background: var(--btn-bg); color: var(--btn-text); border: none; padding: 15px; border-radius: 12px; font-weight: 600; font-size: 15px; cursor: pointer; transition: opacity 0.2s; margin-top: 10px;}
.btn-primary:hover { opacity: 0.9; }

/* Carousel UI */
.carousel-wrapper { position: relative; cursor: pointer; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.6); color: white; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.carousel-wrapper:hover .carousel-arrow { opacity: 1; pointer-events: auto; }
.carousel-arrow:hover { background: rgba(0,0,0,0.9); }
.left-arrow { left: 10px; }
.right-arrow { right: 10px; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-hover); transition: all 0.3s ease; }
.dot.active { background: var(--accent); }
.preview-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 15px; scrollbar-width: none; }
.preview-carousel::-webkit-scrollbar { display: none; }
.preview-img { min-width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); background: #000; }

.like-heart-anim { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); font-size: 80px; color: rgba(255, 255, 255, 0.9); text-shadow: 0 0 20px rgba(239, 68, 68, 0.8); opacity: 0; z-index: 20; pointer-events: none; }
@keyframes popHeart { 0% { transform: translate(-50%, -50%) scale(0); opacity: 1; } 50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; } }


/* -------------------------------------
   PREMIUM ADMIN POST CREATOR
-------------------------------------- */
.premium-card { padding: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text-muted); }
.custom-dropdown-header { background: var(--bg-hover); border: 1px solid var(--border); padding: 15px; border-radius: 12px; font-size: 15px; font-weight: 500; color: var(--text-main); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.caption-area { width: 100%; box-sizing: border-box; background: var(--bg-hover); border: 1px solid var(--border); padding: 15px; border-radius: 12px; font-size: 15px; font-weight: 500; color: var(--text-main); resize: none; height: 140px; font-family: inherit; display: block; }
.caption-area:focus { outline: none; border-color: var(--accent); }
.custom-dropdown-options { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; margin-top: 8px; overflow: hidden; z-index: 20; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.custom-dropdown-options.active { display: block; }
.dropdown-option { padding: 15px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-weight: 500; }
.dropdown-option:hover { background: var(--bg-hover); }
.dropdown-option.selected { color: var(--accent); }
.upload-zone { background: var(--bg-hover); border: 1px dashed var(--border-hover); border-radius: 12px; padding: 40px 20px; text-align: center; cursor: pointer; display: block; transition: border-color 0.2s;}
.upload-zone:hover { border-color: var(--accent); }
.media-manager { background: var(--bg-hover); border: 1px solid var(--border); border-radius: 12px; padding: 15px; margin-top: 15px; display: none; }
.manager-title { font-size: 14px; font-weight: 700; color: var(--text-main); margin-bottom: 15px; display: flex; justify-content: space-between; }
.thumbnail-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
.thumb-box { min-width: 90px; width: 90px; background: var(--bg-panel); border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: grab; position: relative; transition: transform 0.2s;}
.thumb-box:active { cursor: grabbing; }
.thumb-box.active-thumb { border-color: var(--accent); }
.thumb-box.dragging { opacity: 0.5; transform: scale(0.95); border: 2px dashed var(--accent); }
.thumb-box.drag-over { border: 2px solid var(--accent); transform: scale(1.05); }
.thumb-img { width: 100%; height: 90px; object-fit: cover; display: block; pointer-events: none; }
.thumb-controls { display: flex; justify-content: center; background: rgba(0,0,0,0.7); padding: 5px; border-top: 1px solid rgba(255,255,255,0.1);}
.thumb-btn { background: none; border: none; color: #fff; cursor: pointer; font-size: 12px; transition: color 0.2s; }
.thumb-btn.delete:hover { color: #ef4444; }

/* -------------------------------------
   INBOX UI
-------------------------------------- */
.chat-layout { display: flex; width: 100%; max-width: 100%; height: 100vh; background: var(--bg-main); }
.chat-sidebar { width: 350px; border-right: 1px solid var(--border); background: var(--bg-panel); display: flex; flex-direction: column; flex-shrink: 0;}
.chat-sidebar-header { padding: 25px 20px 15px 30px; display: flex; flex-direction: column; gap: 15px;}
.chat-title-row { display: flex; justify-content: space-between; align-items: center; }
.chat-title-row h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.chat-actions-btn { color: var(--text-muted); cursor: pointer; font-size: 18px; transition: color 0.2s; }
.chat-actions-btn:hover { color: var(--text-main); }
.chat-search-container { position: relative; width: 100%; }
.chat-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-muted); pointer-events: none; }
.chat-search { width: 100%; background: var(--bg-main); border: 1px solid var(--border); border-radius: 999px; padding: 10px 15px 10px 38px; color: var(--text-main); font-size: 14px; outline: none; box-sizing: border-box; transition: border-color 0.2s;}
.chat-search:focus { border-color: var(--text-muted); }
.filter-pills { display: flex; gap: 5px; padding: 0 20px 15px 30px; border-bottom: 1px solid var(--border);}
.filter-pill { padding: 6px 16px; background: transparent; border-radius: 999px; color: var(--text-muted); font-size: 13px; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.filter-pill:hover { color: var(--text-main); }
.filter-pill.active { background: var(--bg-hover); color: var(--text-main); }
.empty-contacts { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }
.contact-list { overflow-y: auto; flex-grow: 1; }
.contact-item { display: flex; align-items: center; padding: 15px 20px 15px 30px; text-decoration: none; color: var(--text-main); transition: background 0.2s; border-bottom: 1px solid var(--border);}
.contact-item:hover, .contact-item.active { background: var(--bg-hover); }
.contact-avatar { width: 45px; height: 45px; border-radius: 50%; background: #333; margin-right: 15px; object-fit: cover; flex-shrink: 0;}
.contact-info { flex-grow: 1; overflow: hidden; }
.contact-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.contact-name { font-weight: 600; font-size: 14px; }
.contact-time { font-size: 12px; color: var(--text-muted); }
.contact-preview { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px;}
.unread-badge { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; display: inline-block; box-shadow: 0 0 5px rgba(74, 222, 128, 0.4);}
.chat-main { flex-grow: 1; display: flex; flex-direction: column; background: var(--bg-main); position: relative;}
.chat-header { padding: 15px 30px; border-bottom: 1px solid var(--border); display: flex; align-items: center; background: var(--bg-main); }
.chat-messages { flex-grow: 1; padding: 30px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }
.chat-bubble { max-width: 65%; padding: 14px 18px; border-radius: 20px; font-size: 15px; line-height: 1.5; word-wrap: break-word; }
.chat-bubble.received { background: var(--bg-panel); color: var(--text-main); align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid var(--border);}
.chat-bubble.sent { background: var(--text-main); color: var(--bg-main); align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 500; }
.chat-input-area { padding: 20px 30px; border-top: 1px solid var(--border); background: var(--bg-main); display: flex; gap: 15px; align-items: center;}
.chat-input { flex-grow: 1; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 999px; padding: 14px 25px; color: var(--text-main); font-size: 15px; font-family: inherit; outline: none; transition: border-color 0.2s;}
.chat-input:focus { border-color: var(--text-muted); }
.chat-send-btn { background: transparent; color: var(--accent); border: none; font-size: 24px; cursor: pointer; padding: 0; transition: transform 0.2s, opacity 0.2s; display: flex; align-items: center;}
.chat-send-btn:hover { opacity: 0.8; transform: scale(1.05); }
.chat-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-main); text-align: center; }

/* -------------------------------------
   AUTH PAGES (MODERN FULLSCREEN UI)
-------------------------------------- */
body.auth-page {
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, #1a1a1d 0%, var(--bg-main) 70%); padding: 20px;
}
.auth-card-modern {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 24px; 
    padding: 50px 40px; width: 100%; max-width: 420px; text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); position: relative; overflow: hidden; box-sizing: border-box;
}
.auth-card-modern::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--accent), #34d399);
}
.auth-logo {
    width: 64px; height: 64px; background: var(--bg-hover); border-radius: 16px;
    display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 25px auto;
    border: 1px solid var(--border);
}
.auth-input {
    width: 100%; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 12px; 
    padding: 15px; color: var(--text-main); font-size: 15px; margin-bottom: 20px; box-sizing: border-box; font-family: inherit;
    transition: all 0.2s ease;
}
.auth-input:focus {
    border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}

/* -------------------------------------
   PREMIUM NOTIFICATIONS UI
-------------------------------------- */
.notif-feed { width: 100%; max-width: 650px; display: flex; flex-direction: column; gap: 12px; }
.notif-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; padding: 0 5px; }
.notif-page-header h1 { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -0.5px; color: var(--text-main); }
.mark-read-btn { background: var(--bg-hover); color: var(--text-main); border: 1px solid var(--border); padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.mark-read-btn:hover { background: var(--border); color: #fff; }
.notif-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 18px; text-decoration: none; transition: transform 0.2s, border-color 0.2s, background 0.2s; }
.notif-card:hover { border-color: var(--border-hover); transform: translateY(-2px); background: var(--bg-hover); }
.notif-card.unread { border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.03); }
.notif-avatar-wrapper { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.icon-sub { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #fff; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25); }
.icon-like { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%); color: #fff; box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25); }
.icon-comment { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: #fff; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25); }
.icon-account { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); color: #fff; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25); }
.notif-body { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.notif-message { margin: 0 0 6px 0; font-size: 15px; color: var(--text-main); line-height: 1.4; font-weight: 500;}
.notif-time { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.notif-unread-dot { width: 10px; height: 10px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px rgba(74, 222, 128, 0.5); flex-shrink: 0; }

/* -------------------------------------
   EDIT PROFILE & CENTERED MODAL CROPPER
-------------------------------------- */
.settings-container { width: 100%; max-width: 600px; padding-bottom: 50px;}
.settings-header { font-size: 26px; font-weight: 800; margin-bottom: 30px; letter-spacing: -0.5px; }
.setting-group { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px; padding: 25px; margin-bottom: 25px; }
.setting-title { font-size: 16px; font-weight: 700; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center;}

/* The Dimmed Background Overlay */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    background: rgba(0,0,0,0.85); z-index: 9999; 
    display: none; align-items: center; justify-content: center; 
    opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.modal-overlay.active { display: flex; opacity: 1; pointer-events: auto; }

/* The Centered Floating Box */
.cropper-modal { 
    background: var(--bg-panel); border: 1px solid var(--border); 
    border-radius: 12px; width: 90%; max-width: 600px; 
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.modal-header { 
    padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; 
    border-bottom: 1px solid var(--border);
}
.modal-header h2 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; }
.modal-close-btn { 
    background: transparent; border: none; color: var(--text-muted); 
    font-size: 24px; cursor: pointer; transition: color 0.2s; padding: 0;
}
.modal-close-btn:hover { color: #fff; }

.modal-cropper-container { 
    width: 100%; max-height: 60vh; background: #000; 
    display: flex; align-items: center; justify-content: center;
}
#cropper-image { display: block; max-width: 100%; max-height: 60vh; }

.modal-footer { 
    padding: 20px; text-align: center; background: var(--bg-panel); 
    border-top: 1px solid var(--border);
}

/* Specific White Pill Button */
.btn-pill-white {
    background: #ffffff; color: #000000; border: none; 
    padding: 10px 32px; border-radius: 9999px; font-weight: 700; 
    font-size: 15px; cursor: pointer; transition: transform 0.2s;
}
.btn-pill-white:hover { transform: scale(1.05); }

/* Mobile Optimization */
.mobile-bottom-nav { display: none; }
@media (max-width: 768px) {
    .sidebar { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 0 !important; }
    .feed-container { max-width: 100%; padding-bottom: 80px; }
    .carousel-arrow { display: none !important; }
    
    .profile-card { border: none; margin-bottom: 10px; border-radius: 0; border-bottom: 1px solid var(--border); }
    .post-card, .premium-card { border-radius: 0; border-left: none; border-right: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    .banner-container { height: 140px; }
    .profile-avatar { width: 90px; height: 90px; border-width: 3px; }
    .profile-top-row { margin-top: -45px; }
    
    .chat-layout { height: calc(100vh - 70px); flex-direction: column; border: none; }
    .chat-sidebar { width: 100%; max-height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
    .contact-list { display: flex; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
    .contact-item { flex-direction: column; padding: 10px; border-bottom: none; min-width: 80px; text-align: center; }
    .contact-top-row { justify-content: center; }
    .contact-avatar { margin-right: 0; margin-bottom: 5px; }
    .contact-time, .contact-preview { display: none; }
    .chat-input-area { padding-bottom: calc(15px + env(safe-area-inset-bottom)); }
    
    .notif-feed { padding-bottom: 80px; padding: 20px; }
    .settings-container { padding: 20px; }
    
    .mobile-bottom-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0;
        background: var(--bg-panel); border-top: 1px solid var(--border); justify-content: space-around; align-items: center;
        padding: 15px 0 calc(15px + env(safe-area-inset-bottom)); z-index: 1000;
    }
    .mobile-nav-item { color: var(--text-muted); font-size: 22px; text-decoration: none; position: relative;}
    .mobile-nav-item.active { color: var(--text-main); }
    .mobile-nav-item .notification-dot { position: absolute; top: -5px; right: -8px; background: #ef4444; width: 8px; height: 8px; padding: 0; color: transparent; }
}