/* GLOBAL STYLES */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body { font-family: 'Inter', sans-serif; background-color: #D9D9D9; margin: 0; padding: 0; display: flex; justify-content: center; min-height: 100vh; }
.mobile-container { width: 100%; max-width: 480px; background-color: #E5E5E5; min-height: 100vh; position: relative; overflow-x: hidden; }

/* AUTH */
.auth-container { display: flex; align-items: center; justify-content: center; height: 100vh; padding: 20px; box-sizing: border-box; }
.card { background: white; border-radius: 24px; padding: 40px 30px; width: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.05); text-align: center; }
.auth-header-icon { color: #5566FF; font-size: 40px; margin-bottom: 15px; }
h2 { margin: 10px 0 5px 0; color: #000; }
p.subtitle { color: #666; font-size: 14px; margin-bottom: 30px; }
.input-group { text-align: left; margin-bottom: 20px; }
.input-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.input-wrapper { position: relative; }
.input-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #888; }
.input-wrapper input, .input-wrapper select, .input-wrapper textarea { width: 100%; padding: 12px 12px 12px 45px; border: 1px solid #888; border-radius: 8px; box-sizing: border-box; font-size: 14px; }
.btn-primary { background-color: #DCE4FF; color: #000; border: none; width: 100%; padding: 15px; border-radius: 12px; font-size: 16px; cursor: pointer; font-weight: 500; margin-top: 10px; }

/* HOME HEADER */
.home-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 50; }
.logo-area { display: flex; align-items: center; color: #5566FF; font-weight: bold; font-size: 18px; }
.logo-area i { font-size: 24px; margin-right: 8px; }
.history-btn { background: white; border: 1px solid #ccc; padding: 6px 12px; border-radius: 20px; display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: #333; cursor: pointer; text-decoration: none; }

/* PROFILE */
.profile-container { position: relative; }
.profile-icon { width: 40px; height: 40px; background: #A89F80; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; cursor: pointer; user-select: none; }
.profile-dropdown { display: none; position: absolute; top: 50px; right: 0; width: 220px; background-color: #ffffff; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); border: 1px solid #eee; flex-direction: column; overflow: hidden; z-index: 1000; }
.profile-dropdown.active { display: flex; }
.dropdown-user-info { padding: 15px; background: #f9f9f9; border-bottom: 1px solid #eee; text-align: left; }
.dropdown-label { font-size: 10px; font-weight: 700; color: #888; text-transform: uppercase; }
.dropdown-email { font-size: 13px; font-weight: 600; color: #000; margin-top: 3px; word-break: break-all; }
.dropdown-link { padding: 12px 15px; display: flex; align-items: center; gap: 10px; font-size: 14px; color: #333; cursor: pointer; transition: background 0.1s; }
.dropdown-link:hover { background-color: #f0f0f0; }
.dropdown-link.logout { color: #d93025; border-top: 1px solid #eee; }

/* SEARCH & FILTER */
.search-bar { margin: 0 20px; position: relative; z-index: 1; }
.search-bar input { width: 100%; padding: 10px 10px 10px 35px; border-radius: 20px; border: none; box-sizing: border-box; }
.search-bar i { position: absolute; left: 12px; top: 10px; color: #888; }
.category-section { padding: 10px 20px; position: relative; z-index: 1; }
.category-btn { background: white; width: 100%; padding: 10px; border-radius: 20px; border: none; font-weight: 600; display: flex; justify-content: center; cursor: pointer; }
.dropdown-menu { display: none; background: white; padding: 10px; margin-top: 10px; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); position: absolute; width: 90%; z-index: 100; }
.dropdown-menu.active { display: block; }
.dropdown-item { padding: 10px; border-bottom: 1px solid #eee; cursor: pointer; }

/* TOGGLE & BUTTONS */
.toggle-container { margin: 10px 20px; background-color: #888888; display: inline-flex; padding: 3px; border-radius: 20px; }
.toggle-btn { border: none; background: transparent; padding: 6px 15px; border-radius: 16px; font-size: 12px; font-weight: 600; cursor: pointer; color: #fff; }
.toggle-btn.active { background-color: white; color: black; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.action-buttons { display: flex; gap: 10px; padding: 10px 20px; }
.btn-dark { background: black; color: white; border: none; padding: 10px 20px; border-radius: 8px; flex: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; }

/* FEED CARD */
.feed { padding: 20px; padding-bottom: 80px; }
.feed-card { background: white; border-radius: 15px; overflow: hidden; margin-bottom: 20px; padding: 15px; cursor: pointer; }
.item-image { width: 100%; min-height: 180px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; border-radius: 10px; margin-bottom: 10px; overflow: hidden; position: relative; }
.item-image img { width: 100%; height: auto; display: block; }
.text-image-placeholder { width: 100%; height: 200px; background-color: #CCCCCC; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: bold; color: #555; text-transform: uppercase; text-align: center; padding: 20px; box-sizing: border-box; }
.tag { background: black; color: white; padding: 4px 10px; border-radius: 4px; font-size: 12px; display: inline-block; margin-bottom: 5px; }
.tag.lost { background-color: #EE3939; }
.meta { font-size: 12px; color: #555; margin-top: 5px; display: flex; align-items: center; gap: 5px; }
.poster-info-box { background-color: #E0E0E0; padding: 8px 12px; border-radius: 8px; margin-top: 10px; display: flex; align-items: center; gap: 10px; width: fit-content; }
.poster-details { display: flex; flex-direction: column; }
.poster-name { font-size: 12px; font-weight: 600; color: #000; }
.poster-email { font-size: 11px; color: #555; }
.avatar { width: 30px; height: 30px; background: #DCE4FF; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; }
.my-post { border: 2px solid #5566FF; background-color: #F0F4FF; position: relative; }
.my-post::before { content: "My Post"; position: absolute; top: 10px; right: 10px; background: #5566FF; color: white; font-size: 10px; padding: 2px 8px; border-radius: 10px; z-index: 10; }
.closed-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(200, 200, 200, 0.9); padding: 10px 30px; border-radius: 10px; border: 2px solid #5566FF; color: black; font-weight: bold; font-size: 18px; z-index: 5; }

/* MY POSTS */
.back-btn { background: white; border: 1px solid black; padding: 8px 15px; border-radius: 8px; display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; cursor: pointer; margin: 20px; width: fit-content; }
.my-posts-header { padding: 0 20px; margin-bottom: 15px; }
.my-posts-title { font-size: 18px; font-weight: 700; color: #5566FF; margin: 0; }
.my-posts-sub { font-size: 12px; color: #666; margin: 5px 0 0 0; }
.empty-state { text-align: center; color: #666; font-size: 14px; padding: 40px 20px; line-height: 1.5; }

/* DETAIL MODAL */
.detail-modal { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: 100%; background: white; z-index: 2000; display: none; flex-direction: column; overflow: hidden; }
.detail-header { flex-shrink: 0; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
.detail-content { flex-grow: 1; padding: 20px; padding-bottom: 20px; overflow-y: auto; }
.detail-title { font-size: 22px; font-weight: bold; margin: 10px 0; }
.detail-desc { color: #333; line-height: 1.5; margin-bottom: 20px; }
.status-banner-green { background-color: #E0F8D1; color: #2D570C; padding: 15px; border-radius: 8px; display: flex; flex-direction: column; gap: 5px; margin-bottom: 20px; font-size: 14px; }
.comments-section { margin-top: 20px; border-top: 2px solid #000; padding-top: 20px; }
.comment-item { background: #E5E5E5; padding: 10px; border-radius: 8px; margin-bottom: 10px; font-size: 13px; }
.comment-input-area { flex-shrink: 0; position: static; width: 100%; background: white; padding: 15px; box-sizing: border-box; border-top: 1px solid #ddd; display: flex; gap: 10px; z-index: 2001; }
.comment-input { flex: 1; background: #D9D9D9; border: none; padding: 12px; border-radius: 8px; outline: none; }
.btn-send-comment { background: black; color: white; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* REPORT PAGE HELPERS */
.report-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: white; border-bottom: 1px solid #ddd; }
.report-header h2 { flex: 1; margin: 0; font-size: 18px; }
.privacy-box { border: 1px solid #ccc; padding: 15px; border-radius: 10px; background: white; margin-bottom: 20px; display: flex; gap: 10px; }
.upload-trigger { color: #5566FF; font-weight: 600; cursor: pointer; font-size: 14px; }

/* --- RED X BUTTON (FIXED) --- */
.remove-img-btn { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    background: rgba(255, 0, 0, 0.9); 
    color: white; 
    border: none; 
    border-radius: 50%; 
    width: 35px; 
    height: 35px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    font-weight: bold; 
    font-size: 16px; 
    z-index: 1000; /* Very high Z-Index to sit on top */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); 
}

/* TOOLS */
.editor-tools { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eee; }
.tools-row { display: flex; gap: 10px; margin-bottom: 15px; }
.tool-pill { background: #E0E0E0; border-radius: 20px; padding: 8px 15px; font-size: 13px; display: flex; align-items: center; gap: 6px; cursor: pointer; border: none; color: black; }
.brush-slider-area { margin-bottom: 20px; }
.save-cancel-row { display: flex; justify-content: flex-end; gap: 10px; }
.btn-tool-cancel { background: white; border: 1px solid black; color: black; padding: 8px 20px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.btn-tool-save { background: black; border: none; color: white; padding: 8px 20px; border-radius: 8px; cursor: pointer; font-weight: 500; }

/* MODALS */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 3000; }
.modal-box { background: white; padding: 25px; border-radius: 15px; width: 85%; text-align: center; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: center; }
.radio-option { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; font-size: 14px; cursor: pointer; text-align: left; }
.radio-option input { width: 18px; height: 18px; accent-color: black; }
.modal-alert { border: 1px solid #888; padding: 10px; border-radius: 8px; display: flex; gap: 10px; align-items: flex-start; text-align: left; margin-bottom: 20px; color: #555; font-size: 13px; }
.close-form-label { text-align: left; font-weight: 600; margin-bottom: 8px; display: block; margin-top: 15px; }
.close-input { width: 100%; padding: 12px; background: #ddd; border: none; border-radius: 8px; box-sizing: border-box; font-size: 14px; }
.btn-logout-confirm { background: black; color: white; border: none; width: 100%; padding: 12px; border-radius: 10px; font-size: 16px; cursor: pointer; font-weight: 600; }
.btn-logout-cancel { background: white; color: black; border: 1px solid black; width: 100%; padding: 12px; border-radius: 10px; font-size: 16px; cursor: pointer; font-weight: 600; }

/* HISTORY STYLES */
.history-header-btn { background: white; border: 1px solid #ccc; padding: 8px 15px; border-radius: 20px; display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; text-decoration: none; color: black; }
.resolution-banner { background: white; padding: 15px; text-align: center; margin-bottom: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.res-title { font-weight: 700; font-size: 16px; margin-bottom: 5px; }
.res-sub { font-size: 11px; color: #666; }
.filter-row { display: flex; gap: 10px; padding: 0 20px; margin-bottom: 20px; }
.filter-input { padding: 10px; border-radius: 10px; border: 1px solid #ccc; background: white; font-family: 'Inter', sans-serif; flex: 1; }
.month-heading { background: black; color: white; padding: 8px 20px; border-radius: 8px; font-size: 20px; font-weight: bold; display: inline-block; margin: 0 20px 10px 20px; }
.date-heading { border: 1px solid black; background: white; padding: 5px 15px; border-radius: 6px; font-weight: 600; font-size: 14px; display: inline-block; margin: 0 20px 15px 20px; }
.history-item-row { display: flex; align-items: flex-start; gap: 5px; padding: 0 20px; margin-bottom: 20px; overflow-x: auto; }
.check-icon { background: black; color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 10px; margin-top: 15px; }
.h-card { background: white; border: 1px solid black; border-radius: 8px; padding: 10px; min-width: 100px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.h-status { color: #00C040; font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.h-main-text { font-weight: 700; font-size: 14px; line-height: 1.2; color: black; }
.h-sub-text { font-size: 11px; color: black; margin-top: 2px; word-break: break-all; }