/* ===== RESET & BLOG COMPATIBILITY ===== */
.post-title, .entry-title, .post-header, #sidebar, .sidebar, #sidebar-wrapper,
#aside-bottom, .breadcrumb, .breadcrumbs, .blog-pager, #blog-pager,
#share-container, .share-container, #share-btns, .share-buttons, 
.post-share-buttons, .post-footer, #footer, .footer, .comments, #comments, 
.date-header, .navbar, .navbar-blogger, .separator, .widget-content > .separator, 
.Attribution, .status-msg-wrap, .widget, #Blog1, .blog-posts, .post-outer { 
  display: none !important; 
}

* { 
  box-sizing: border-box; 
  margin: 0;
  padding: 0;
}

html { 
  -webkit-tap-highlight-color: transparent; 
  transition: background 0.3s; 
  scroll-behavior: smooth; 
}

body { 
  margin: 0 !important; 
  padding: 0 !important; 
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Pastikan overlay menutupi semua elemen blogger */
body.forum-active {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

:root {
  --primary: #FF6B35; 
  --primary-hover: #E85A2A;
  --upvote: #FF4500; 
  --downvote: #7193FF; 
  --award: #FFD700;
  --bg-body: #F8F9FA; 
  --card-bg: #FFFFFF; 
  --text: #1A1A1B; 
  --text-sec: #7C7C7C;
  --border: #EDEFF1; 
  --divider: #EDEFF1; 
  --input-bg: #F6F7F8; 
  --hover: #F6F7F8;
  --success: #46D160; 
  --danger: #EA0027; 
  --warning: #FFB000;
  --toast-bg: #1A1A1B; 
  --toast-text: #fff; 
  --base-size: 15px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
  --z-overlay: 2147483640;
  --z-backdrop: 2147483648;
  --z-sheet: 2147483649;
  --z-modal: 2147483650;
}

[data-theme="dark"] {
  --bg-body: #030303; 
  --card-bg: #1A1A1B; 
  --text: #D7DADC; 
  --text-sec: #818384;
  --border: #343536; 
  --divider: #343536; 
  --input-bg: #272729; 
  --hover: #272729;
  --toast-bg: #fff; 
  --toast-text: #000;
}

/* ===== APP OVERLAY ===== */
#app-overlay {
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh;
  background: var(--bg-body); 
  z-index: var(--z-overlay);
  overflow-y: auto;
  display: none;
  flex-direction: column; 
  font-size: var(--base-size);
  -webkit-overflow-scrolling: touch;
}

#app-overlay.active {
  display: flex;
}

/* ===== HEADER ===== */
.app-header {
  background: var(--card-bg); 
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px);
  padding: 0 16px; 
  position: sticky; 
  top: 0; 
  z-index: 100;
  border-bottom: 1px solid var(--border); 
  box-shadow: var(--shadow-sm);
}

.header-top {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  height: 56px; 
  gap: 12px;
}

.logo-section {
  display: flex; 
  align-items: center; 
  gap: 12px; 
  cursor: pointer;
  transition: opacity 0.2s;
  user-select: none;
}

.logo-section:active { 
  opacity: 0.7; 
}

.logo-icon {
  width: 36px; 
  height: 36px; 
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: white; 
  font-weight: 800; 
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}

.logo-text { 
  font-size: 20px; 
  font-weight: 800; 
  color: var(--text); 
}

.header-actions { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
}

.btn-icon-header {
  background: transparent; 
  border: none; 
  width: 40px; 
  height: 40px;
  border-radius: 50%; 
  color: var(--text); 
  display: flex; 
  align-items: center;
  justify-content: center; 
  cursor: pointer; 
  transition: 0.2s; 
  position: relative;
}

.btn-icon-header:active { 
  background: var(--hover); 
  transform: scale(0.95);
}

.badge-notif {
  position: absolute; 
  top: 8px; 
  right: 8px; 
  background: var(--danger);
  color: white; 
  font-size: 10px; 
  font-weight: 700; 
  padding: 2px 5px;
  border-radius: 10px; 
  min-width: 16px; 
  text-align: center;
}

.header-profile-img {
  width: 36px; 
  height: 36px; 
  border-radius: 50%; 
  object-fit: cover;
  cursor: pointer; 
  border: 2px solid var(--border); 
  transition: 0.2s;
}

.header-profile-img:hover { 
  border-color: var(--primary); 
}

.header-profile-img:active {
  transform: scale(0.95);
}

/* ===== SEARCH & FILTERS ===== */
.search-filter-section { 
  padding: 12px 0; 
}

.search-box { 
  position: relative; 
  margin-bottom: 12px; 
}

.search-input {
  width: 100%; 
  padding: 10px 16px 10px 44px; 
  border-radius: 20px;
  background: var(--input-bg); 
  border: 1px solid transparent;
  color: var(--text); 
  font-size: 14px; 
  outline: none; 
  transition: 0.2s;
  font-family: 'Inter', sans-serif;
}

.search-input:focus { 
  background: var(--card-bg); 
  border-color: var(--primary); 
}

.search-icon {
  position: absolute; 
  left: 14px; 
  top: 50%; 
  transform: translateY(-50%);
  color: var(--text-sec); 
  width: 18px; 
  pointer-events: none;
}

.sort-filter-row {
  display: flex; 
  gap: 8px; 
  overflow-x: auto; 
  padding-bottom: 4px;
  scrollbar-width: none; 
  -ms-overflow-style: none;
}

.sort-filter-row::-webkit-scrollbar { 
  display: none; 
}

.sort-chip {
  background: var(--input-bg); 
  color: var(--text-sec);
  padding: 8px 16px; 
  border-radius: 20px; 
  font-size: 13px;
  font-weight: 600; 
  white-space: nowrap; 
  cursor: pointer;
  transition: all 0.2s; 
  border: 1px solid transparent;
  display: flex; 
  align-items: center; 
  gap: 6px;
  user-select: none;
}

.sort-chip:active { 
  transform: scale(0.95); 
}

.sort-chip.active {
  background: var(--primary); 
  color: white; 
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.sort-chip svg { 
  width: 16px; 
  height: 16px; 
}

/* ===== FEED CONTAINER ===== */
.main-container {
  width: 100%; 
  max-width: 680px; 
  margin: 0 auto;
  padding: 16px; 
  flex: 1;
}

/* ===== POST CARD ===== */
.post-card {
  background: var(--card-bg); 
  margin-bottom: 10px;
  border: 1px solid var(--border); 
  border-radius: 8px;
  overflow: hidden; 
  transition: all 0.2s; 
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.post-card:hover {
  border-color: var(--text-sec); 
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.post-layout {
  display: flex; 
  gap: 0;
}

/* Vote Section */
.vote-section {
  background: var(--input-bg); 
  padding: 8px;
  display: flex; 
  flex-direction: column; 
  align-items: center;
  gap: 4px; 
  min-width: 48px; 
  border-right: 1px solid var(--border);
}

.vote-btn {
  background: transparent; 
  border: none; 
  width: 32px; 
  height: 32px;
  border-radius: 4px; 
  color: var(--text-sec); 
  display: flex;
  align-items: center; 
  justify-content: center; 
  cursor: pointer;
  transition: all 0.2s;
}

.vote-btn:active { 
  transform: scale(1.15); 
}

.vote-btn.upvoted { 
  color: var(--upvote); 
  background: rgba(255, 69, 0, 0.1); 
}

.vote-btn.downvoted { 
  color: var(--downvote); 
  background: rgba(113, 147, 255, 0.1); 
}

.vote-count {
  font-size: 13px; 
  font-weight: 700; 
  color: var(--text);
  min-width: 32px; 
  text-align: center;
}

.vote-count.positive { 
  color: var(--upvote); 
}

.vote-count.negative { 
  color: var(--downvote); 
}

/* Post Content */
.post-content-area {
  flex: 1; 
  padding: 12px 16px; 
  min-width: 0;
}

.post-meta {
  display: flex; 
  align-items: center; 
  gap: 8px; 
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.post-author {
  display: flex; 
  align-items: center; 
  gap: 8px; 
  cursor: pointer;
  transition: opacity 0.2s;
}

.post-author:active { 
  opacity: 0.7; 
}

.author-avatar {
  width: 24px; 
  height: 24px; 
  border-radius: 50%;
  object-fit: cover; 
  border: 1px solid var(--border);
}

.author-name {
  font-size: 13px; 
  font-weight: 600; 
  color: var(--text);
  display: flex; 
  align-items: center; 
  gap: 4px;
}

.karma-badge {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000; 
  font-size: 10px; 
  font-weight: 700;
  padding: 2px 6px; 
  border-radius: 10px;
}

.meta-separator { 
  color: var(--text-sec); 
  font-size: 12px; 
}

.post-time {
  font-size: 12px; 
  color: var(--text-sec); 
  font-weight: 400;
}

.btn-post-menu {
  margin-left: auto; 
  background: transparent; 
  border: none;
  color: var(--text-sec); 
  padding: 4px 8px; 
  cursor: pointer;
  border-radius: 4px; 
  font-size: 18px; 
  transition: 0.2s;
}

.btn-post-menu:hover { 
  background: var(--hover); 
}

.btn-post-menu:active {
  transform: scale(0.9);
}

.post-body {
  font-size: 14px; 
  color: var(--text); 
  line-height: 1.6;
  margin: 8px 0; 
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-body img {
  width: 100%; 
  max-height: 400px; 
  object-fit: cover;
  border-radius: 8px; 
  margin: 12px 0; 
  border: 1px solid var(--border);
}

.post-body a { 
  color: var(--primary); 
  text-decoration: none; 
  font-weight: 500; 
}

.post-body a:hover { 
  text-decoration: underline; 
}

.post-body code {
  background: var(--input-bg); 
  padding: 2px 6px; 
  border-radius: 4px;
  font-family: 'Courier New', monospace; 
  font-size: 13px;
}

.post-body pre {
  background: var(--input-bg); 
  padding: 12px; 
  border-radius: 8px;
  overflow-x: auto; 
  border-left: 3px solid var(--primary);
}

.post-body blockquote {
  border-left: 4px solid var(--primary); 
  padding-left: 16px;
  margin: 12px 0; 
  color: var(--text-sec); 
  font-style: italic;
}

/* Tag List */
.tag-list {
  display: flex; 
  flex-wrap: wrap; 
  gap: 6px; 
  margin: 8px 0;
}

.tag-item {
  background: var(--input-bg); 
  color: var(--primary);
  padding: 4px 10px; 
  border-radius: 12px; 
  font-size: 12px;
  font-weight: 600; 
  cursor: pointer; 
  transition: 0.2s;
}

.tag-item:hover { 
  background: var(--primary); 
  color: white; 
}

.tag-item:active {
  transform: scale(0.95);
}

/* Post Actions */
.post-actions {
  display: flex; 
  gap: 4px; 
  margin-top: 12px; 
  padding-top: 8px;
  border-top: 1px solid var(--divider);
}

.action-btn {
  background: transparent; 
  border: none; 
  padding: 8px 12px;
  display: flex; 
  align-items: center; 
  gap: 6px; 
  color: var(--text-sec);
  font-size: 13px; 
  font-weight: 600; 
  cursor: pointer;
  border-radius: 6px; 
  transition: all 0.2s; 
  flex: 1;
  justify-content: center;
}

.action-btn:active { 
  transform: scale(0.95); 
}

.action-btn:hover { 
  background: var(--hover); 
}

.action-btn svg { 
  width: 18px; 
  height: 18px; 
}

.action-btn.saved { 
  color: var(--warning); 
}

/* Awards */
.awards-row {
  display: flex; 
  gap: 4px; 
  align-items: center; 
  margin: 8px 0;
}

.award-item {
  background: var(--input-bg); 
  padding: 4px 8px; 
  border-radius: 12px;
  display: flex; 
  align-items: center; 
  gap: 4px; 
  font-size: 12px;
  font-weight: 600;
}

/* Best Answer Badge */
.best-answer-badge {
  display: inline-flex; 
  align-items: center; 
  gap: 6px;
  background: linear-gradient(135deg, var(--success), #2EA043);
  color: white; 
  padding: 6px 12px; 
  border-radius: 20px;
  font-size: 12px; 
  font-weight: 700; 
  margin: 8px 0;
}

/* ===== FAB BUTTONS ===== */
.fab-create {
  position: fixed; 
  bottom: 80px; 
  right: 20px;
  width: 56px; 
  height: 56px; 
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  box-shadow: var(--shadow-lg); 
  color: white;
  display: flex; 
  align-items: center; 
  justify-content: center;
  cursor: pointer; 
  z-index: 999; 
  transition: all 0.3s;
  border: none;
}

.fab-create:active { 
  transform: scale(0.9); 
}

.fab-create svg { 
  width: 24px; 
  height: 24px; 
}

body.modal-open .fab-create { 
  transform: translateY(150px); 
  opacity: 0; 
}

.fab-settings {
  position: fixed; 
  bottom: 20px; 
  right: 20px;
  width: 48px; 
  height: 48px; 
  border-radius: 50%;
  background: var(--card-bg); 
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md); 
  color: var(--text);
  display: flex; 
  align-items: center; 
  justify-content: center;
  cursor: pointer; 
  z-index: 998; 
  transition: all 0.3s;
}

.fab-settings:active { 
  transform: scale(0.9); 
}

body.modal-open .fab-settings { 
  transform: translateY(150px); 
  opacity: 0; 
}

/* Settings Panel */
.settings-panel {
  position: fixed; 
  bottom: 78px; 
  right: 20px;
  background: var(--card-bg); 
  border: 1px solid var(--border);
  border-radius: 16px; 
  padding: 16px; 
  width: 240px;
  box-shadow: var(--shadow-lg); 
  z-index: 997;
  display: none; 
  animation: slideUp 0.2s;
}

.settings-panel.show { 
  display: block; 
}

.setting-row {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  margin-bottom: 16px;
}

.setting-row:last-child {
  margin-bottom: 0;
}

.setting-label { 
  font-size: 14px; 
  font-weight: 600; 
  color: var(--text); 
}

.toggle-switch {
  position: relative; 
  display: inline-block; 
  width: 48px; 
  height: 26px;
}

.toggle-switch input { 
  opacity: 0; 
  width: 0; 
  height: 0; 
}

.slider {
  position: absolute; 
  cursor: pointer; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background-color: #ccc; 
  transition: .3s; 
  border-radius: 34px;
}

.slider:before {
  position: absolute; 
  content: ""; 
  height: 20px; 
  width: 20px;
  left: 3px; 
  bottom: 3px; 
  background-color: white;
  transition: .3s; 
  border-radius: 50%;
}

input:checked + .slider { 
  background-color: var(--primary); 
}

input:checked + .slider:before { 
  transform: translateX(22px); 
}

input[type=range] {
  width: 100%; 
  accent-color: var(--primary); 
  cursor: pointer;
}

.btn-close-app {
  width: 100%;
  padding: 10px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-close-app:active {
  transform: scale(0.95);
}
/* ===== BOTTOM SHEETS & MODALS ===== */
.sheet-backdrop {
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background: rgba(0,0,0,0.5); 
  z-index: var(--z-backdrop);
  opacity: 0; 
  visibility: hidden; 
  transition: 0.3s;
  backdrop-filter: blur(4px); 
  -webkit-backdrop-filter: blur(4px);
}

.sheet-backdrop.active { 
  opacity: 1; 
  visibility: visible; 
}

.bottom-sheet {
  position: fixed; 
  bottom: 0; 
  left: 0; 
  right: 0;
  background: var(--card-bg); 
  z-index: var(--z-sheet);
  border-radius: 20px 20px 0 0; 
  max-height: 90vh;
  display: flex; 
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
}

.bottom-sheet.active { 
  transform: translateY(0); 
}

.sheet-header {
  display: grid; 
  grid-template-columns: 60px 1fr 60px;
  padding: 16px; 
  border-bottom: 1px solid var(--divider);
  align-items: center;
  flex-shrink: 0;
}

.sheet-title {
  font-weight: 800; 
  font-size: 17px; 
  color: var(--text);
  text-align: center;
}

.btn-sheet-cancel {
  background: none; 
  border: none; 
  color: var(--primary);
  font-size: 15px; 
  cursor: pointer; 
  font-weight: 600;
  padding: 0; 
  text-align: left;
}

.btn-sheet-cancel:active {
  opacity: 0.7;
}

.btn-sheet-action {
  background: var(--primary); 
  color: white; 
  border: none;
  padding: 8px 16px; 
  border-radius: 20px; 
  font-weight: 700;
  font-size: 14px; 
  cursor: pointer; 
  justify-self: end;
  transition: 0.2s;
}

.btn-sheet-action:disabled { 
  opacity: 0.5; 
  cursor: not-allowed; 
}

.btn-sheet-action:active:not(:disabled) { 
  transform: scale(0.95); 
}

.sheet-body {
  padding: 20px; 
  overflow-y: auto; 
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* ===== EDITOR ===== */
#editor-container {
  min-height: 200px; 
  background: var(--bg-body);
  color: var(--text); 
  border: none !important;
}

.ql-toolbar {
  background: var(--card-bg) !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 12px 16px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
}

.ql-container {
  border: none !important; 
  font-family: 'Inter', sans-serif;
  font-size: 15px;
}

.ql-editor { 
  padding: 16px; 
  min-height: 200px; 
}

.ql-editor.ql-blank::before {
  color: var(--text-sec); 
  font-style: normal; 
  left: 16px;
}

.ql-snow .ql-stroke {
  stroke: var(--text);
}

.ql-snow .ql-fill {
  fill: var(--text);
}

.ql-snow .ql-picker-label {
  color: var(--text);
}

.editor-toolbar {
  display: flex; 
  gap: 8px; 
  padding: 12px 16px;
  border-top: 1px solid var(--divider);
  background: var(--card-bg);
  position: sticky;
  bottom: 0;
}

.editor-tool-btn {
  background: transparent; 
  border: 1px solid var(--border);
  padding: 8px 12px; 
  border-radius: 8px; 
  color: var(--text);
  display: flex; 
  align-items: center; 
  gap: 6px; 
  cursor: pointer;
  transition: 0.2s; 
  font-size: 13px; 
  font-weight: 600;
}

.editor-tool-btn:hover { 
  background: var(--hover); 
}

.editor-tool-btn:active {
  transform: scale(0.95);
}

.editor-tool-btn svg { 
  width: 16px; 
  height: 16px; 
}

/* Draft Indicator */
.draft-saved {
  font-size: 12px; 
  color: var(--success); 
  font-weight: 600;
  padding: 8px 16px; 
  display: none; 
  text-align: center;
  background: rgba(70, 209, 96, 0.1);
}

.draft-saved.show { 
  display: block; 
}

/* ===== AUTH SHEET ===== */
.auth-tabs {
  display: flex; 
  gap: 6px; 
  background: var(--input-bg);
  padding: 4px; 
  border-radius: 12px; 
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1; 
  padding: 10px; 
  text-align: center; 
  font-size: 14px;
  font-weight: 600; 
  border-radius: 8px; 
  cursor: pointer;
  color: var(--text-sec); 
  transition: 0.2s;
}

.auth-tab.active {
  background: var(--card-bg); 
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.input-box {
  width: 100%; 
  padding: 14px 16px; 
  border: 1px solid var(--border);
  border-radius: 12px; 
  background: var(--input-bg); 
  color: var(--text);
  font-size: 15px; 
  margin-bottom: 12px; 
  outline: none;
  transition: 0.2s;
  font-family: 'Inter', sans-serif;
}

.input-box:focus { 
  border-color: var(--primary); 
  background: var(--card-bg); 
}

.btn-auth {
  width: 100%; 
  padding: 14px; 
  border-radius: 30px; 
  border: none;
  background: var(--primary); 
  color: white; 
  font-weight: 700;
  font-size: 16px; 
  cursor: pointer; 
  transition: 0.2s;
}

.btn-auth:active { 
  transform: scale(0.98); 
}

.btn-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-google {
  width: 100%; 
  padding: 14px; 
  border-radius: 30px;
  border: 1px solid var(--border); 
  background: var(--card-bg);
  color: var(--text); 
  font-weight: 600; 
  font-size: 15px;
  cursor: pointer; 
  display: flex; 
  align-items: center;
  justify-content: center; 
  gap: 10px; 
  transition: 0.2s;
  margin-bottom: 16px;
}

.btn-google:active { 
  transform: scale(0.98); 
}

/* ===== USER MENU ===== */
.user-menu {
  position: absolute; 
  top: 50px; 
  right: 0;
  background: var(--card-bg); 
  border: 1px solid var(--border);
  border-radius: 12px; 
  padding: 8px; 
  box-shadow: var(--shadow-lg);
  display: none; 
  z-index: 200; 
  min-width: 200px;
}

.user-menu.show { 
  display: block; 
  animation: fadeIn 0.2s; 
}

.menu-item {
  padding: 12px 16px; 
  font-size: 14px; 
  color: var(--text);
  cursor: pointer; 
  border-radius: 8px; 
  font-weight: 600;
  display: flex; 
  align-items: center; 
  gap: 10px;
  transition: 0.2s;
}

.menu-item:hover { 
  background: var(--input-bg); 
}

.menu-item:active {
  transform: scale(0.98);
}

.menu-item.logout { 
  color: var(--danger); 
}

.menu-item svg { 
  width: 18px; 
  height: 18px; 
}

.karma-display {
  padding: 12px 16px; 
  border-bottom: 1px solid var(--divider);
  margin-bottom: 4px;
}

.karma-count {
  font-size: 20px; 
  font-weight: 800;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== MODALS ===== */
.action-modal {
  position: fixed; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--card-bg); 
  width: 85%; 
  max-width: 400px;
  border-radius: 16px; 
  padding: 24px; 
  z-index: var(--z-modal);
  opacity: 0; 
  visibility: hidden; 
  transition: 0.2s;
  box-shadow: var(--shadow-lg);
}

.action-modal.active {
  opacity: 1; 
  visibility: visible; 
  transform: translate(-50%, -50%) scale(1);
}

.modal-title {
  font-size: 20px; 
  font-weight: 800; 
  color: var(--text);
  margin: 0 0 8px 0;
}

.modal-desc {
  font-size: 14px; 
  color: var(--text-sec); 
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.modal-btn-group { 
  display: flex; 
  gap: 10px; 
}

.modal-btn {
  flex: 1; 
  padding: 12px; 
  border-radius: 12px;
  font-weight: 700; 
  border: none; 
  cursor: pointer;
  font-size: 14px; 
  transition: 0.2s;
}

.btn-cancel { 
  background: var(--input-bg); 
  color: var(--text); 
}

.btn-danger { 
  background: var(--danger); 
  color: white; 
}

.btn-primary { 
  background: var(--primary); 
  color: white; 
}

.modal-btn:active { 
  transform: scale(0.95); 
}

/* Options Sheet */
.option-item {
  display: flex; 
  align-items: center; 
  gap: 16px;
  padding: 16px 20px; 
  font-size: 15px; 
  color: var(--text);
  font-weight: 600; 
  cursor: pointer; 
  transition: 0.2s;
  border-radius: 8px; 
  margin-bottom: 4px;
}

.option-item:hover { 
  background: var(--hover); 
}

.option-item:active {
  transform: scale(0.98);
}

.option-item.danger { 
  color: var(--danger); 
}

.option-item svg { 
  width: 22px; 
  height: 22px; 
}

/* ===== DISQUS COMMENTS ===== */
.comments-container {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid var(--border);
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--divider);
}

.comments-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.comments-count {
  font-size: 14px;
  color: var(--text-sec);
  font-weight: 600;
}

#disqus_thread {
  min-height: 400px;
}

/* ===== TOAST ===== */
#toast-container {
  position: fixed; 
  bottom: 90px; 
  left: 50%; 
  transform: translateX(-50%);
  z-index: calc(var(--z-modal) + 1); 
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.custom-toast {
  background: var(--toast-bg); 
  color: var(--toast-text);
  padding: 12px 24px; 
  border-radius: 50px; 
  font-size: 14px;
  font-weight: 600; 
  box-shadow: var(--shadow-lg);
  animation: toastUp 0.3s; 
  pointer-events: all;
  max-width: 90vw;
  text-align: center;
}

/* ===== SKELETON LOADER ===== */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--input-bg) 50%, var(--border) 75%);
  background-size: 200% 100%; 
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-card {
  background: var(--card-bg); 
  padding: 16px; 
  margin-bottom: 10px;
  border: 1px solid var(--border); 
  border-radius: 8px;
}

.sk-line {
  height: 12px; 
  margin-bottom: 8px; 
  border-radius: 4px;
}

.sk-avatar { 
  width: 40px; 
  height: 40px; 
  border-radius: 50%; 
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; 
  padding: 60px 20px; 
  color: var(--text-sec);
}

.empty-icon {
  width: 80px; 
  height: 80px; 
  margin: 0 auto 16px;
  opacity: 0.5;
}

.empty-title {
  font-size: 18px; 
  font-weight: 700; 
  color: var(--text);
  margin: 0 0 8px 0;
}

.empty-desc {
  font-size: 14px; 
  color: var(--text-sec); 
  margin: 0;
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 40px; 
  height: 40px; 
  margin: 40px auto;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%; 
  animation: spin 0.8s linear infinite;
}

.load-more-btn {
  display: block; 
  margin: 20px auto; 
  padding: 12px 32px;
  background: var(--primary); 
  color: white; 
  border: none;
  border-radius: 24px; 
  font-weight: 700; 
  cursor: pointer;
  transition: 0.2s; 
  font-size: 14px;
}

.load-more-btn:active { 
  transform: scale(0.95); 
}

.load-more-btn:disabled { 
  opacity: 0.5; 
  cursor: not-allowed; 
}

/* Spacer */
.spacer-bottom { 
  height: 100px; 
  width: 100%; 
  flex-shrink: 0; 
}

/* ===== ANIMATIONS ===== */
@keyframes toastUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes slideUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(-10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes shimmer {
  0% { 
    background-position: 200% 0; 
  }
  100% { 
    background-position: -200% 0; 
  }
}

@keyframes spin {
  to { 
    transform: rotate(360deg); 
  }
}

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
  .post-card {
    border-radius: 12px;
  }
  
  .main-container {
    padding: 20px 16px;
  }
  
  .bottom-sheet {
    left: 50%;
    transform: translate(-50%, 100%);
    max-width: 600px;
  }
  
  .bottom-sheet.active {
    transform: translate(-50%, 0);
  }
}

@media (max-width: 480px) {
  .header-top {
    padding: 0;
  }
  
  .logo-text {
    font-size: 18px;
  }
  
  .main-container {
    padding: 12px 8px;
  }
  
  .post-card {
    margin-left: -8px;
    margin-right: -8px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* Dark mode specific adjustments */
[data-theme="dark"] .ql-toolbar {
  background: var(--card-bg) !important;
}

[data-theme="dark"] .ql-snow .ql-stroke {
  stroke: var(--text);
}

[data-theme="dark"] .ql-snow .ql-fill {
  fill: var(--text);
}

[data-theme="dark"] .ql-snow .ql-picker-label {
  color: var(--text);
}

[data-theme="dark"] #disqus_thread {
  color-scheme: dark;
}
/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 100;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.bottom-nav.hidden {
  transform: translateY(100%);
}

.bottom-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 16px;
  position: relative;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-sec);
  text-decoration: none;
  position: relative;
  flex: 1;
  max-width: 80px;
}

.nav-item:active {
  transform: scale(0.9);
}

.nav-item.active {
  color: var(--primary);
  background: rgba(255, 107, 53, 0.1);
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.nav-item span {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-item-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

/* Center FAB in Nav */
.nav-item-fab {
  margin-top: -32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
  border: 4px solid var(--bg-body);
}

.nav-item-fab svg {
  width: 28px;
  height: 28px;
}

.nav-item-fab span {
  display: none;
}

/* Hide default FABs when bottom nav active */
body.has-bottom-nav .fab-create,
body.has-bottom-nav .fab-settings {
  display: none;
}

/* Adjust main container padding */
body.has-bottom-nav .main-container {
  padding-bottom: 80px;
}

body.has-bottom-nav .spacer-bottom {
  height: 80px;
}

/* Menu Panel */
.nav-menu-panel {
  position: fixed;
  bottom: 70px;
  right: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 99;
  display: none;
  min-width: 200px;
}

.nav-menu-panel.show {
  display: block;
  animation: slideUp 0.2s;
}

.nav-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.nav-menu-item:hover {
  background: var(--hover);
}

.nav-menu-item:active {
  transform: scale(0.98);
}

.nav-menu-item svg {
  width: 20px;
  height: 20px;
}

.nav-menu-divider {
  height: 1px;
  background: var(--divider);
  margin: 8px 0;
}
/* ===== REPOST STYLES ===== */
.repost-header {
  background: var(--input-bg);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.repost-header svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.repost-header span {
  color: var(--text-sec);
  font-size: 12px;
  font-weight: 600;
}

/* Repost animation */
@keyframes repostPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.action-btn:active svg {
  animation: repostPulse 0.3s;
}

/* Fade out animation for deleted posts */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}
