:root { --bg: #ffffff; --surface: #ffffff; --bg-hover: #f7f9f9; --border: #eff3f4; --text: #0f1419; --text-muted: #536471; --primary: #1d9bf0; --primary-hover: #1a8cd8; --danger: #f4212e; --love: #f91880; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
.container { max-width: 600px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); min-height: 100vh; }
/* Top Navigation Tabs */
        .top-nav { display: flex; justify-content: space-around; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); z-index: 100; }
.nav-item { flex: 1; text-align: center; padding: 15px 0; font-weight: bold; color: var(--text-muted); cursor: pointer; transition: background 0.2s; display:flex; justify-content:center; align-items:center; }
.nav-item:hover { background: var(--bg-hover); }
.nav-item.active { color: var(--text); position:relative; }
.nav-item.active::after { content:''; position:absolute; bottom:0; left:50%; transform:translateX(-50%); width: 50px; height: 4px; background: var(--primary); border-radius: 2px; }
/* Top Post Form */
        .post-form-area { padding: 15px; border-bottom: 1px solid var(--border); display: flex; gap: 15px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #ddd; display:flex; justify-content:center; align-items:center; color:white; font-size:20px; overflow:hidden; flex-shrink:0; }
.avatar img { width:100%; height:100%; object-fit:cover; }
.form-content { flex-grow: 1; }
.form-select { border: none; font-size: 14px; color: var(--primary); font-weight:bold; background: transparent; outline:none; margin-bottom:10px; cursor:pointer; }
.form-textarea { width: 100%; border: none; font-size: 20px; resize: none; outline: none; font-family: inherit; margin-bottom: 10px; }
.form-footer { display: flex; justify-content: flex-end; align-items: center; border-top: 1px solid var(--border); padding-top: 10px; }
.submit-btn { background: var(--primary); color: white; border: none; padding: 8px 18px; border-radius: 9999px; font-weight: bold; font-size: 15px; cursor: pointer; transition: background 0.2s; }
.submit-btn:hover { background: var(--primary-hover); }
/* Post Item */
        .post { padding: 15px; border-bottom: 1px solid var(--border); display: flex; gap: 15px; transition: background 0.2s; }
.post:hover { background: var(--bg-hover); }
.post-body { flex-grow: 1; }
.post-header { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; flex-wrap:wrap; }
.username { font-weight: bold; color: var(--text); }
.tribe-badge { font-size: 13px; color: var(--text-muted); display:flex; align-items:center; gap:3px; }
.tribe-badge:hover { color: var(--primary); text-decoration:underline; }
.post-text { font-size: 15px; line-height: 1.5; color: var(--text); margin: 0 0 10px 0; white-space: pre-wrap; word-break: break-word; }
.post-actions { display: flex; gap: 20px; align-items: center; justify-content: flex-start; color: var(--text-muted); }
.action { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; border: none; background: none; color: inherit; padding: 0; transition: color 0.2s; }
.action:hover { color: var(--primary); }
.action.love:hover { color: var(--love); }
.action.purify:hover { color: var(--primary); }
/* General / Guest */
        .guest-banner { background: var(--primary); color: white; padding: 15px; text-align: center; font-weight: bold; border-radius: 8px; margin: 15px; }
.guest-banner a { text-decoration: underline; }
:root { --bg: #ffffff; --surface: #ffffff; --bg-hover: #f7f9f9; --border: #eff3f4; --text: #0f1419; --text-muted: #536471; --primary: #1d9bf0; }
.top-nav { display: flex; justify-content: space-around; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); z-index: 100; }
.header-title { padding: 15px; font-size: 20px; font-weight: bold; border-bottom: 1px solid var(--border); }
.empty-state { padding: 40px 20px; text-align: center; color: var(--text-muted); line-height: 1.6; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; margin: 0; padding: 0; }
.container { max-width: 600px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); min-height: 100vh; position:relative; }
.search-area { padding: 15px; border-bottom: 1px solid var(--border); }
.search-box { display:flex; gap:10px; background: var(--bg-hover); border: 1px solid transparent; border-radius: 9999px; padding: 5px 20px; align-items:center; transition:border-color 0.2s, background 0.2s; }
.search-box:focus-within { background: var(--bg); border-color: var(--primary); }
.search-input { flex-grow:1; background: transparent; border: none; color: var(--text); padding: 10px 0; font-size: 15px; outline:none; }
.search-btn { background: transparent; color: var(--text-muted); border: none; cursor: pointer; font-size:18px; padding:0; }
.tabs { display:flex; border-bottom: 1px solid var(--border); }
.tab { flex:1; text-align:center; padding: 15px; color:var(--text-muted); cursor:pointer; font-weight:bold; transition: background 0.2s, color 0.2s; }
.tab:hover { background: var(--bg-hover); }
.tab.active { color: var(--text); border-bottom: 3px solid var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.create-btn-container { padding: 15px; border-bottom: 1px solid var(--border); text-align: right; }
.create-btn { display:inline-flex; align-items:center; gap:5px; background:var(--primary); color:white; padding:8px 15px; border-radius:9999px; font-weight:bold; font-size:14px; text-decoration:none; transition:background 0.2s; }
.create-btn:hover { background:var(--primary-hover); }
/* Tribe Card */
        .tribe-card { display:flex; gap:15px; align-items:center; padding: 15px; border-bottom: 1px solid var(--border); transition: background 0.2s; }
.tribe-card:hover { background: var(--bg-hover); }
.tribe-icon { width: 50px; height: 50px; border-radius: 12px; background:#ddd; object-fit:cover; display:flex; justify-content:center; align-items:center; font-size:24px; color:white; flex-shrink:0; }
.tribe-info { flex-grow:1; }
.tribe-name { font-size:15px; font-weight:bold; color:var(--text); margin:0 0 5px 0; }
.tribe-desc { font-size:14px; color:var(--text-muted); margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
/* Post Card */
        .post { padding: 15px; border-bottom: 1px solid var(--border); display: flex; gap: 15px; transition: background 0.2s; }
.post-header { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.header-top { display:flex; align-items:center; justify-content:space-between; padding:10px 15px; border-bottom:1px solid var(--border); position:sticky; top:0; background:rgba(255,255,255,0.85); backdrop-filter:blur(12px); z-index:10; }
.back-btn { font-size:20px; width:36px; height:36px; border-radius:50%; display:flex; justify-content:center; align-items:center; transition:background 0.2s; margin-right:15px; color:var(--text); }
.back-btn:hover { background: var(--bg-hover); }
.header-info { flex-grow:1; }
.header-info h2 { margin:0; font-size:18px; line-height:1.2; }
.header-info p { margin:0; font-size:13px; color:var(--text-muted); }
.cover { width: 100%; height: 200px; background-color: var(--border); background-size: cover; background-position: center; }
.profile-area { padding: 15px; border-bottom: 1px solid var(--border); position:relative; }
.profile-top { display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:15px; }
.tribe-header-avatar { width:120px; height:120px; border-radius:20px; background:#ddd; overflow:hidden; border:4px solid white; display:flex; justify-content:center; align-items:center; color:white; font-size:60px; }
.btn-outline { border: 1px solid var(--border); background:white; color:var(--text); font-weight:bold; padding:8px 15px; border-radius:9999px; cursor:pointer; transition:background 0.2s; }
.btn-outline:hover { background: var(--bg-hover); }
.btn-primary { border: none; background:var(--primary); color:white; font-weight:bold; padding:8px 15px; border-radius:9999px; cursor:pointer; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background:white; border: 1px solid var(--danger); color:var(--danger); font-weight:bold; padding:8px 15px; border-radius:9999px; cursor:pointer; }
.tribe-name { font-size:20px; font-weight:bold; margin:0; }
.tribe-bio { font-size:15px; margin:10px 0; white-space:pre-wrap; }
.tribe-date { color: var(--text-muted); font-size:14px; display:flex; align-items:center; gap:5px; }
.stats { display:flex; gap:20px; margin-top:15px; font-size:14px; color:var(--text-muted); }
.stats strong { color:var(--text); font-weight:bold; }
.tabs { display:flex; border-bottom:1px solid var(--border); margin-top:20px; }
.tab { flex:1; text-align:center; padding:15px 0; color:var(--text); font-weight:bold; position:relative; }
/* Unified Post View */
        .post { padding: 15px; border-bottom: 1px solid var(--border); display: flex; gap: 15px; transition: background 0.2s; }
.post:hover { background: var(--bg-hover); cursor: pointer; }
.post-text { font-size: 15px; line-height: 1.5; margin: 0 0 10px 0; white-space: pre-wrap; word-break:break-word; }
.post-actions { display: flex; gap: 20px; align-items: center; color: var(--text-muted); }
.action { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor:pointer; background:none; border:none; color:inherit; padding:0; }
:root { --bg: #ffffff; --border: #eff3f4; --text: #0f1419; --text-muted: #536471; --primary: #1d9bf0; --primary-hover: #1a8cd8; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; }
.header { display:flex; justify-content:space-between; align-items:center; padding:10px 15px; border-bottom:1px solid var(--border); position:sticky; top:0; background:rgba(255,255,255,0.9); backdrop-filter:blur(10px); z-index:10; }
.close-btn { font-size:24px; color:var(--text); text-decoration:none; display:flex; justify-content:center; align-items:center; width:36px; height:36px; border-radius:50%; transition:background 0.2s; }
.close-btn:hover { background: #eee; }
.title { flex-grow:1; margin-left:15px; font-size:18px; font-weight:bold; }
.save-btn { background: var(--primary); color: white; border: none; padding: 6px 16px; border-radius: 9999px; font-weight: bold; cursor: pointer; }
.save-btn:hover { background: var(--primary-hover); }
.form-area { padding: 20px; }
.input-group { border: 1px solid var(--border); border-radius: 4px; padding: 5px 10px; margin-bottom: 20px; }
.input-group:focus-within { border-color: var(--primary); }
.input-label { font-size: 13px; color: var(--text-muted); }
.input-group input[type="text"], .input-group textarea { width: 100%; border: none; outline: none; font-size: 15px; font-family: inherit; margin-top:5px; background:transparent; }
textarea { resize: none; height: 80px; }
.file-input-group { margin-bottom: 20px; color: var(--text-muted); font-size:14px; display:flex; flex-direction:column; gap:8px; }
.file-input-group input { font-size:13px; }
.header-top { display:flex; align-items:center; padding:10px 15px; border-bottom:1px solid var(--border); position:sticky; top:0; background:rgba(255,255,255,0.85); backdrop-filter:blur(12px); z-index:10; }
.profile-area { padding: 15px; border-bottom: 1px solid var(--border); }
.profile-top { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:15px; }
.user-header-avatar { width:100px; height:100px; border-radius:50%; background:#ddd; overflow:hidden; border:4px solid white; display:flex; justify-content:center; align-items:center; color:white; font-size:50px; }
.profile-name { font-size:20px; font-weight:bold; margin:0; }
.profile-bio { font-size:15px; margin:10px 0; white-space:pre-wrap; }
.profile-date { color: var(--text-muted); font-size:14px; display:flex; align-items:center; gap:5px; }
:root { --bg: #ffffff; --border: #eff3f4; --text: #0f1419; --text-muted: #536471; --primary: #1d9bf0; }
.save-btn { background: var(--text); color: white; border: none; padding: 6px 16px; border-radius: 9999px; font-weight: bold; cursor: pointer; }
.avatar-edit { width: 120px; height: 120px; border-radius: 50%; background: #ddd; margin: 0 auto 30px auto; position: relative; display:flex; justify-content:center; align-items:center; color:white; font-size:50px; overflow:hidden; border:4px solid white; box-shadow:0 0 10px rgba(0,0,0,0.1); }
.avatar-edit img { width:100%; height:100%; object-fit:cover; }
.camera-overlay { position:absolute; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.4); display:flex; justify-content:center; align-items:center; color:white; font-size:24px; cursor:pointer; }
.input-group input, .input-group textarea { width: 100%; border: none; outline: none; font-size: 15px; font-family: inherit; margin-top:5px; background:transparent; }
.user-header-avatar img, .tribe-header-avatar img { width:100%; height:100%; object-fit:cover; }
