* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; }
body { background: #e5e7eb; }

.app { max-width: 480px; margin: auto; height: 100vh; overflow-y: auto; scroll-snap-type: y mandatory; background: #fff; box-shadow: 0 0 25px rgba(0,0,0,.15); }
.app::-webkit-scrollbar { display: none; }

.header { position: fixed; top: 0; width: 100%; max-width: 480px; height: 60px; background: #111827; color: #fff;
  display: flex; justify-content: space-between; align-items: center; padding: 0 20px; z-index: 999; }
.logo { font-size: 24px; font-weight: bold; }
.header-right { display: flex; gap: 16px; align-items: center; }
.menu-btn, .search-btn { font-size: 24px; cursor: pointer; }

.searchbar { position: fixed; top: 60px; width: 100%; max-width: 480px; background: #1f2937; padding: 0 16px;
  max-height: 0; overflow: hidden; transition: .25s; z-index: 998; }
.searchbar.active { max-height: 64px; padding: 12px 16px; }
.searchbar input { width: 100%; padding: 10px 14px; border: none; border-radius: 8px; font-size: 15px; }

.sidebar { position: fixed; top: 0; right: -300px; width: 280px; height: 100%; background: #fff; z-index: 2000; transition: .3s; overflow-y: auto; }
.sidebar.active { right: 0; }
.sidebar-header { background: #111827; color: #fff; padding: 20px; font-size: 20px; font-weight: bold; }
.sidebar a { display: block; padding: 15px 20px; color: #333; text-decoration: none; border-bottom: 1px solid #eee; cursor: pointer; }
.sidebar a:hover, .sidebar a.active { background: #f5f5f5; }
.close { float: right; cursor: pointer; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; z-index: 1500; }
.overlay.active { display: block; }

.post { height: 100vh; scroll-snap-align: start; position: relative; display: flex; flex-direction: column; padding-top: 60px; }
.image-section { height: 38%; position: relative; }
.image-section img { width: 100%; height: 100%; object-fit: cover; background: #d1d5db; }
.category { position: absolute; left: 15px; bottom: 15px; background: rgba(0,0,0,.75); color: #fff; padding: 8px 14px; border-radius: 20px; font-size: 13px; }

.content { flex: 1; padding: 20px; padding-right: 80px; overflow: hidden; }
.headline { font-size: 26px; font-weight: bold; color: #111827; margin-bottom: 8px; line-height: 1.2; }
.meta { font-size: 13px; color: #6b7280; margin-bottom: 14px; }
.text { font-size: 16px; color: #4b5563; line-height: 1.6; }
.read-more { display: inline-block; margin-top: 18px; color: #2563eb; font-weight: bold; text-decoration: none; }

/* vertical action rail: like / dislike / view / share / copy / whatsapp */
.actions { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; z-index: 5; }
.action { width: 52px; height: 52px; border-radius: 50%; background: #111827; color: #fff; border: none;
  display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.action:hover { background: #2563eb; }
.action.on { background: #2563eb; }
.action.wa { background: #16a34a; }
.action.wa:hover { background: #15803d; }
.icon { font-size: 17px; }
.count { font-size: 10px; margin-top: 2px; }

.empty { padding: 100px 24px; text-align: center; color: #6b7280; scroll-snap-align: start; }

@media (max-width: 480px) {
  .headline { font-size: 22px; }
  .text { font-size: 15px; }
  .action { width: 48px; height: 48px; }
  .actions { gap: 10px; }
  .content { padding-right: 74px; }
}

/* ── Single post page (post.php) ──────────────────────────── */
.single { max-width: 480px; margin: auto; background: #fff; min-height: 100vh; box-shadow: 0 0 25px rgba(0,0,0,.15); }
.single .topbar { height: 56px; background: #111827; color: #fff; display: flex; align-items: center; gap: 12px; padding: 0 18px; }
.single .topbar a { color: #fff; text-decoration: none; font-size: 20px; }
.single .topbar .logo { font-size: 20px; font-weight: bold; }
.single img.hero { width: 100%; height: 230px; object-fit: cover; background: #d1d5db; }
.single .body { padding: 20px; }
.single .rail { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
