/* Basic reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Arial, sans-serif; padding-top: 56px; padding-bottom: 56px; }

/* Header layout */
header { position: fixed; top: 0; left: 0; width: 100%; height: 56px; background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); z-index: 10; }
header .icon { width: 24px; height: 24px; cursor: pointer; }

/* Slide-in menu overlay */
.menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #fff; transform: translateX(100%); transition: transform 0.3s ease; flex-direction: column; }
.menu-overlay.active { display: flex; transform: translateX(0); }
.menu-header { display: flex; align-items: center; padding: 0 16px; height: 56px; border-bottom: 1px solid #eee; }
.menu-header .icon { margin-right: 12px; }
.menu-overlay nav ul { list-style: none; padding: 0; margin: 0; }
.menu-overlay nav li { padding: 14px 16px; border-bottom: 1px solid #f4f4f4; font-size: 16px; }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid #ddd; background: white; position: sticky; top: 56px; z-index: 10; }
.tabs li { flex: 1; text-align: center; padding: 10px 0; list-style: none; font-size: 14px; cursor: pointer; color: #555; }
.tabs li.active { border-bottom: 2px solid black; font-weight: bold; color: black; }

/* Container and posts */
.container { padding: 16px; }
.post { border-bottom: 1px solid #ddd; padding-bottom: 16px; margin-bottom: 16px; }
.post-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.post-header img.avatar { width: 32px; height: 32px; border-radius: 50%; }
.post img, .post video, .post audio { width: 100%; margin-top: 8px; }

/* Profile info */
.profile-info { text-align: center; margin: 16px 0; }
.profile-info .avatar { width: 100px; height: 100px; margin-bottom: 8px; }

/* Thread page specific */
.header-thread { position: fixed; top: 0; left: 0; width: 100%; height: 56px; background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); z-index: 10; }
.header-thread h2 { flex: 1; margin: 0 8px; font-size: 18px; font-weight: bold; }
.header-thread .view-count { color: #888; font-size: 14px; margin-right: 4px; }

/* Bottom navigation */
.nav-bottom { display: flex; justify-content: space-around; padding: 8px 0; border-top: 1px solid #eee; position: sticky; bottom: 0; background: #fff; z-index: 10; }

/* Rate prompt */
.thread-rate { text-align: center; padding: 12px 16px; color: #888; font-size: 14px; }

/* Thread input */
.thread-input { display: flex; align-items: center; padding: 8px 16px; border-top: 1px solid #eee; background: #fff; gap: 8px; position: sticky; bottom: 56px; }
.thread-input .avatar-small { width: 32px; height: 32px; border-radius: 50%; }
.thread-input input { flex: 1; border: none; outline: none; font-size: 14px; color: #555; }
.thread-input .icon { width: 24px; height: 24px; cursor: pointer; }
