/* =====================
   SACHBOL v2.0 — GLOBAL STYLES
   Modern, responsive, mobile-first
===================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* =====================
   CSS VARIABLES — ORANGE THEME
===================== */
:root {
  /* Backgrounds */
  --bg-primary: #0f0f0f;
  --bg-secondary: #171717;
  --bg-card: #1f1f1f;
  --bg-card-hover: #262626;
  --bg-elevated: #2a2a2a;
  --bg-hover: #333333;
  
  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  
  /* Primary Colors - Orange Theme */
  --accent-primary: #f59e0b;
  --accent-secondary: #fbbf24;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #fb923c 100%);
  --accent-hover: #d97706;
  
  /* Borders */
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.2);
  
  /* Status Colors */
  --success: #22c55e;
  --danger: #ef4444;
  --info: #3b82f6;
  --warning: #f59e0b;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* Misc */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 60px;
  --bottom-nav-height: 60px;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-elevated: #f1f5f9;
  --bg-hover: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* =====================
   GLOBAL RESET
===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* =====================
   APP WRAPPER
===================== */
.app {
  width: 100%;
  min-height: 100vh;
  padding-top: var(--nav-height);
}

/* =====================
   NAVBAR
===================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.logo-img {
  height: 34px; width: 34px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.home-btn { display: none; }

/* Nav Right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

a.btn, .btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-create {
  background: var(--accent-gradient) !important;
  color: #000 !important;
  border: none !important;
  font-weight: 700 !important;
}

.btn-create:hover { box-shadow: var(--shadow-glow); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
  z-index: 2000;
  position: relative;
}

.hamburger span {
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  pointer-events: none;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile overlay + slide menu */
.mobile-menu-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.show { display: block; opacity: 1; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 0; right: -280px;
  width: 280px; height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  z-index: 1600;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 72px 16px 100px;
  pointer-events: auto;
}

.mobile-nav.show { right: 0; pointer-events: auto; }

.mobile-nav a, .mobile-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  font-family: inherit;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.mobile-nav a:hover, .mobile-nav button:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mobile-nav-divider { height: 1px; background: var(--border-color); margin: 10px 0; }

/* Profile btn */
.profile {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  background: var(--bg-elevated);
  transition: all var(--transition);
  overflow: hidden;
}

.profile:hover { border-color: var(--accent-primary); }
.profile img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* Dropdown */
.dropdown {
  position: absolute;
  top: 46px; right: 0;
  min-width: 190px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: none;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 1100;
}

.dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.dropdown a:hover { background: var(--accent-primary); color: #000; }

/* =====================
   CATEGORY FILTER
===================== */
.category-filter {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: none;
  position: sticky;
  top: var(--nav-height);
  z-index: 100;
}

.category-filter::-webkit-scrollbar { display: none; }

.category-btn {
  padding: 7px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition);
  font-family: inherit;
}

.category-btn:hover { background: var(--bg-hover); border-color: var(--border-hover); color: var(--text-primary); }

.category-btn.active {
  background: var(--accent-gradient);
  color: #000;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* =====================
   COMPOSER
===================== */
.composer { max-width: 680px; margin: 16px auto; padding: 0 16px; }

.composer input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
  cursor: pointer;
}

.composer input::placeholder { color: var(--text-muted); }
.composer input:hover { border-color: var(--border-hover); }
.composer input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }

/* =====================
   FEED
===================== */
.feed {
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 16px 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =====================
   POST CARD
===================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
  animation: slideUp 0.35s ease forwards;
  opacity: 0;
}

.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(245, 158, 11, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.time, .reply { font-size: 0.72rem; color: var(--text-muted); }

/* =====================
   POST ACTIONS
===================== */
.post-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  align-items: center;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  transition: all var(--transition);
  font-family: inherit;
}

.action-btn:hover { background: var(--bg-hover); border-color: var(--border-hover); color: var(--text-primary); }
.action-btn:active { transform: scale(0.95); }

.action-btn.liked {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
}

.action-btn .icon { font-size: 0.95rem; }
.action-btn .count { font-size: 0.72rem; font-weight: 700; }

.report-btn { color: var(--danger) !important; margin-left: auto; }
.report-btn:hover { background: rgba(239,68,68,0.1) !important; border-color: rgba(239,68,68,0.3) !important; }

.view-btn {
  background: transparent; border: none;
  color: var(--accent-primary);
  cursor: pointer;
  font-size: 0.72rem; font-weight: 600;
  padding: 4px 6px;
  font-family: inherit;
  transition: color var(--transition);
}
.view-btn:hover { color: var(--accent-secondary); text-decoration: underline; }

/* =====================
   COMMENTS
===================== */
.comments-section {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: none;
}
.comments-section.show { display: block; }

.comment-input { display: flex; gap: 8px; margin-bottom: 12px; }

.comment-input input {
  flex: 1; padding: 9px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
  min-width: 0;
}
.comment-input input:focus { border-color: var(--accent-primary); }
.comment-input input::placeholder { color: var(--text-muted); }

.comment-input button {
  padding: 9px 16px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-full);
  color: #000; cursor: pointer;
  font-weight: 700; font-size: 0.8rem;
  font-family: inherit;
  transition: all var(--transition);
  flex-shrink: 0;
}
.comment-input button:hover { box-shadow: var(--shadow-glow); }
.comment-input button:disabled { opacity: 0.5; cursor: not-allowed; }

.comments-list { max-height: 400px; overflow-y: auto; }

.comment {
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  border-left: 3px solid var(--accent-primary);
  position: relative;
  transition: background var(--transition);
}
.comment:hover { background: var(--bg-hover); }
.comment p { font-size: 0.85rem; line-height: 1.5; }
.comment .comment-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

.comment-delete {
  position: absolute; top: 6px; right: 6px;
  background: var(--danger); border: none; color: white;
  width: 22px; height: 22px; border-radius: 50%;
  cursor: pointer; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: all var(--transition);
}
.comment:hover .comment-delete { opacity: 1; }

.no-comments {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 18px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

/* =====================
   SKELETON LOADING
===================== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px; margin-bottom: 12px;
}

.skeleton-tag { width: 80px; height: 22px; margin-bottom: 10px; }
.skeleton-title { width: 70%; height: 18px; margin-bottom: 8px; }
.skeleton-text { width: 100%; height: 14px; margin-bottom: 6px; }
.skeleton-text-short { width: 55%; height: 14px; margin-bottom: 12px; }
.skeleton-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-color); }
.skeleton-btn { width: 65px; height: 30px; border-radius: var(--radius-full); }

/* =====================
   ERROR / RETRY
===================== */
.error-state { text-align: center; padding: 50px 20px; max-width: 360px; margin: 0 auto; }
.error-state .error-icon { font-size: 2.5rem; margin-bottom: 14px; }
.error-state h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.error-state p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 18px; line-height: 1.5; }

.retry-btn {
  display: inline-flex;
  align-items: center; gap: 8px;
  padding: 11px 24px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-full);
  color: #000; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.retry-btn:hover { box-shadow: var(--shadow-glow); transform: translateY(-1px); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 2.5rem; margin-bottom: 14px; }

/* =====================
   TOASTS
===================== */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 10px);
  right: 12px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  backdrop-filter: blur(16px);
}

.toast.success { border-left: 3px solid var(--success); }
.toast.info { border-left: 3px solid var(--accent-primary); }
.toast.error { border-left: 3px solid var(--danger); }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-weight: 700; font-size: 0.8rem; }
.toast-message { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }

@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(100%); } }

/* =====================
   MODALS
===================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  justify-content: center; align-items: center;
  padding: 16px;
}
.modal-overlay.show { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 460px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
  border: 1px solid var(--border-color);
}

@keyframes modalIn { from { transform: translateY(-24px) scale(0.97); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  background: var(--accent-gradient); color: #000;
}

.modal-header h3 { font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }

.modal-close {
  background: rgba(0,0,0,0.15); border: none;
  font-size: 1.1rem; cursor: pointer; color: #000;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: rgba(0,0,0,0.25); }

.modal-tabs { display: flex; border-bottom: 1px solid var(--border-color); }

.modal-tab {
  flex: 1; padding: 10px;
  background: transparent; border: none;
  color: var(--text-muted); cursor: pointer;
  font-weight: 600; font-size: 0.8rem;
  font-family: inherit;
  transition: all var(--transition);
  position: relative;
}
.modal-tab.active { color: var(--accent-primary); }
.modal-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--accent-primary); }

.modal-body { padding: 14px 18px; max-height: 380px; overflow-y: auto; }

.user-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; background: var(--bg-elevated);
  border-radius: var(--radius-md); margin-bottom: 8px;
  transition: all var(--transition);
}
.user-item:hover { background: var(--bg-hover); }

.user-avatar-small {
  width: 34px; height: 34px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 0.85rem; }
.user-time { font-size: 0.72rem; color: var(--text-muted); }

/* =====================
   NOTIFICATIONS
===================== */
.notification-bar {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--accent-gradient);
  color: #000;
  padding: 8px 16px;
  display: none;
  justify-content: center; align-items: center; gap: 10px;
  z-index: 10001;
  font-size: 0.85rem; font-weight: 600;
}
.notification-bar.show { display: flex; }
.notif-content { flex: 1; text-align: center; }
.notif-title { font-weight: 700; }
.notif-message { font-size: 0.8rem; opacity: 0.85; }

.notif-close {
  background: rgba(0,0,0,0.15); border: none; color: #000;
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}

.notification-bell {
  position: relative; cursor: pointer;
  font-size: 1.1rem; padding: 7px;
  border-radius: 50%;
  transition: all var(--transition);
}
.notification-bell:hover { background: var(--bg-hover); }

.notification-badge {
  position: absolute; top: 1px; right: 1px;
  background: var(--danger); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  min-width: 15px; height: 15px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  animation: pulse 2s infinite;
}

.notification-dropdown {
  position: fixed;
  top: calc(var(--nav-height) + 6px);
  right: 12px; width: 300px; max-height: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden; display: none;
  box-shadow: var(--shadow-lg); z-index: 99999;
}
.notification-dropdown.show { display: block; }

.notification-dropdown-header {
  padding: 10px 14px;
  background: var(--accent-gradient);
  color: #000; font-weight: 700; font-size: 0.85rem;
  display: flex; justify-content: space-between; align-items: center;
}

.notification-dropdown-body { max-height: 280px; overflow-y: auto; }

.notification-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition);
}
.notification-item:hover { background: var(--bg-hover); }
.notification-item.unread { background: rgba(99, 102, 241, 0.06); border-left: 3px solid var(--accent-primary); }
.notification-item-title { font-weight: 600; font-size: 0.8rem; margin-bottom: 2px; }
.notification-item-message { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.4; }
.notification-item-time { font-size: 0.65rem; color: var(--text-muted); margin-top: 3px; }
.no-notifications { padding: 28px; text-align: center; color: var(--text-muted); font-size: 0.8rem; }

/* =====================
   THEME TOGGLE
===================== */
.theme-toggle {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.theme-toggle:hover { border-color: var(--border-hover); }
.theme-toggle-icon { font-size: 0.95rem; }
.theme-toggle-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }

/* =====================
   BADGES + EDIT
===================== */
.author-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 600; color: #000;
  margin-top: 6px;
}

.stats-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.72rem; color: var(--accent-primary); font-weight: 600;
}

.edit-section { padding: 14px; background: var(--bg-elevated); border-radius: var(--radius-md); margin-bottom: 10px; }

.edit-textarea {
  width: 100%; min-height: 90px;
  padding: 10px; background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem; resize: vertical;
  font-family: inherit; line-height: 1.5;
  outline: none;
}
.edit-textarea:focus { border-color: var(--accent-primary); }

.edit-actions { display: flex; gap: 8px; margin-top: 10px; }

.btn-save, .btn-cancel {
  flex: 1; padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  font-weight: 600; font-size: 0.8rem;
  font-family: inherit;
  transition: all var(--transition);
}

.btn-save { background: var(--accent-gradient); color: #000; }
.btn-save:hover { box-shadow: var(--shadow-glow); }
.btn-cancel { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border-color); }
.btn-cancel:hover { background: var(--bg-hover); }

.edit-btn {
  background: var(--accent-gradient);
  border: none; color: #000;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 600;
  width: 100%; margin-top: 10px;
  font-size: 0.8rem; font-family: inherit;
  transition: all var(--transition);
}
.edit-btn:hover { box-shadow: var(--shadow-glow); }

.summary-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex; justify-content: center; align-items: center;
  padding: 16px;
}

.summary-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px; max-width: 460px; width: 100%;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}
.summary-content h3 { color: var(--accent-primary); margin-bottom: 10px; font-size: 0.95rem; }
.summary-content p { line-height: 1.6; margin-bottom: 14px; font-size: 0.85rem; }
.summary-content button {
  background: var(--accent-gradient);
  color: #000; border: none;
  padding: 9px 20px; border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 600;
  font-family: inherit;
}

/* =====================
   FEEDBACK
===================== */
.feedback-section { position: fixed; bottom: 16px; right: 16px; z-index: 998; }

.feedback-toggle {
  background: var(--accent-gradient);
  color: #000; padding: 9px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 0.8rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}
.feedback-toggle:hover { box-shadow: var(--shadow-glow); transform: translateY(-2px); }

.feedback-form {
  position: absolute; bottom: 48px; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px; width: 260px;
  box-shadow: var(--shadow-lg);
}
.feedback-form h4 { color: var(--accent-primary); margin-bottom: 10px; font-size: 0.9rem; }
.rating-container { margin-bottom: 10px; }
.rating-container span { color: var(--text-muted); font-size: 0.8rem; }
.rating-stars { display: flex; gap: 4px; margin-top: 5px; }
.rating-stars span { font-size: 1.15rem; cursor: pointer; filter: grayscale(100%); transition: all var(--transition); }
.rating-stars span.active, .rating-stars span:hover { filter: grayscale(0%); transform: scale(1.15); }

.feedback-form textarea {
  width: 100%; height: 60px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px; color: var(--text-primary);
  resize: none; margin-bottom: 8px;
  font-family: inherit; font-size: 0.8rem;
  outline: none;
}
.feedback-form textarea:focus { border-color: var(--accent-primary); }

.feedback-form button {
  width: 100%; background: var(--accent-gradient);
  color: #000; border: none; padding: 9px;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.8rem;
  cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.feedback-form button:hover { box-shadow: var(--shadow-glow); }
.feedback-form button:disabled { opacity: 0.5; cursor: not-allowed; }

/* =====================
   BOTTOM NAVIGATION — MOBILE
===================== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  z-index: 1000;
  backdrop-filter: blur(16px);
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.6rem;
  font-weight: 600;
  transition: all var(--transition);
  border-radius: var(--radius-sm);
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item .bnav-icon { font-size: 1.2rem; }
.bottom-nav-item:hover, .bottom-nav-item.active { color: var(--accent-primary); }
.bottom-nav-item.active { background: rgba(99, 102, 241, 0.1); }

/* Floating Create Button */
.fab-create {
  display: none;
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 14px);
  right: 14px;
  width: 52px; height: 52px;
  background: var(--accent-gradient);
  border-radius: 50%;
  border: none;
  color: #000;
  font-size: 1.4rem; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
  z-index: 999;
  transition: all var(--transition);
  text-decoration: none;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.fab-create:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5); }
.fab-create:active { transform: scale(0.95); }

/* =====================
   FOOTER
===================== */
.footer {
  padding: 32px 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  max-width: none; margin: 0;
}

.footer-col { min-width: 140px; }
.footer-col h3 { font-size: 0.95rem; color: var(--accent-primary); margin-bottom: 6px; }
.footer-col p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.footer-col a {
  display: block; color: var(--text-secondary);
  text-decoration: none; font-size: 0.8rem;
  margin-bottom: 5px; transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent-primary); }

/* =====================
   ANIMATIONS
===================== */
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.slide-up { animation: slideUp 0.35s ease forwards; }
.fade-in { animation: fadeIn 0.3s ease forwards; }

/* Post title */
.post-title {
  font-size: 0.95rem; font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  transition: color var(--transition);
}
.post-title:hover { color: var(--accent-primary); }
.expand-icon { font-size: 0.72rem; color: var(--accent-primary); transition: transform 0.3s ease; }
.post-content { animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 1000px; } }

/* MY POSTS */
.composer h2 { font-size: 1.15rem; font-weight: 700; }
.composer p { margin-top: 3px; color: var(--text-muted); font-size: 0.8rem; }

#myFeed .card { position: relative; }
#myFeed .card::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--accent-primary); }

.post-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }

.delete-btn {
  background: transparent;
  border: 1px solid rgba(239,68,68,0.4);
  color: var(--danger);
  font-size: 0.72rem; padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.delete-btn:hover { background: rgba(239,68,68,0.1); }

.spinner {
  display: inline-block;
  width: 28px; height: 28px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.glass { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* =====================
   RESPONSIVE — MOBILE
===================== */
@media (max-width: 768px) {
  :root { --nav-height: 52px; }

  .nav { padding: 0 12px; }
  .nav-right .btn, .nav-right .theme-toggle, .home-btn { display: none !important; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }
  .bottom-nav { display: block; }
  .fab-create { display: flex; }
  .feedback-section { bottom: calc(var(--bottom-nav-height) + 10px); }
  .feedback-toggle span:last-child { display: none; }
  .feedback-toggle { padding: 9px; border-radius: 50%; width: 40px; height: 40px; justify-content: center; }
  .feed { padding-bottom: calc(var(--bottom-nav-height) + 20px); }
  .category-filter { padding: 8px 10px; gap: 5px; }
  .category-btn { padding: 6px 12px; font-size: 0.72rem; }
  .composer { padding: 10px; margin: 10px auto; }
  .composer input { padding: 12px 14px; font-size: 0.85rem; }
  .card { padding: 14px; border-radius: var(--radius-md); }
  .post-actions { gap: 4px; }
  .action-btn { padding: 6px 8px; font-size: 0.72rem; gap: 4px; }
  .action-btn .icon { font-size: 0.85rem; }
  .comment-input button { padding: 7px 12px; font-size: 0.72rem; }
  .comment-input input { padding: 7px 10px; font-size: 0.8rem; }
  .toast-container { right: 8px; left: 8px; max-width: none; }
  .notification-dropdown { right: 8px; left: 8px; width: auto; }
  .footer { flex-direction: column; text-align: center; padding: 24px 14px calc(var(--bottom-nav-height) + 20px); }
  .dropdown { display: none !important; }
}

@media (max-width: 480px) {
  .logo-text { font-size: 1.05rem; }
  .logo-img { height: 28px; width: 28px; }
  .card { padding: 12px; }
  .action-btn { padding: 5px 7px; font-size: 0.65rem; }
}

/* =====================
   V2 PAGES — PROFESSIONAL NAVBAR
===================== */
.v2-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; z-index: 1000;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}

.v2-nav .nav-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.v2-nav .nav-brand img { height: 36px; border-radius: var(--radius-sm); }
.v2-nav .nav-brand span {
  font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary);
}

.v2-nav .nav-links { display: flex; gap: 8px; align-items: center; }

.v2-nav .nav-btn {
  padding: 8px 16px; font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.v2-nav .nav-btn:hover { 
  background: var(--bg-hover); 
  color: var(--text-primary); 
}
.v2-nav .nav-btn.active {
  background: var(--accent-primary); 
  color: white;
  font-weight: 600;
}

/* V2 Hamburger */
.v2-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; border: none; background: none; z-index: 1100;
}
.v2-hamburger span { width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.3s ease; }
.v2-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.v2-hamburger.active span:nth-child(2) { opacity: 0; }
.v2-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.v2-mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 1998;
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}
.v2-mobile-overlay.show { 
  display: block; 
  opacity: 1;
  pointer-events: auto;
}

.v2-mobile-nav {
  display: none; position: fixed; top: 0; right: -280px;
  width: 280px; height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  z-index: 1999;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto; padding: 72px 16px 100px;
  pointer-events: auto;
}
.v2-mobile-nav.show { 
  display: block;
  right: 0;
  pointer-events: auto;
}

.v2-mobile-nav a,
.v2-mobile-nav button {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px;
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-secondary); text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.v2-mobile-nav a:hover,
.v2-mobile-nav button:hover { 
  background: var(--bg-hover); 
  color: var(--text-primary); 
}
.v2-mobile-nav a.active { color: var(--accent-primary); background: rgba(99, 102, 241, 0.1); }

/* V2 Page Container */
.page-container {
  max-width: 780px; margin: 0 auto;
  padding: calc(var(--nav-height) + 16px) 16px 100px;
}

.page-header { margin-bottom: 20px; }
.page-header h1 {
  font-size: 1.5rem; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.page-header p { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

/* V2 Cards & Containers */
.v2-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px; margin-bottom: 12px;
  transition: all var(--transition);
}
.v2-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }

.v2-input {
  width: 100%; padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary); font-size: 0.9rem;
  font-family: inherit; outline: none;
  transition: all var(--transition);
}
.v2-input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }

.v2-textarea { min-height: 100px; resize: vertical; }

.v2-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  background: var(--accent-gradient);
  border: none; border-radius: var(--radius-full);
  color: #000; font-weight: 700; font-size: 0.85rem;
  cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.v2-btn:hover { box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.v2-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.v2-btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.v2-btn-outline:hover { border-color: var(--border-hover); background: var(--bg-hover); color: var(--text-primary); box-shadow: none; }

@media (max-width: 768px) {
  .v2-nav .nav-links { display: none !important; }
  .v2-hamburger { display: flex; }
  .page-container { padding-top: calc(52px + 12px); padding-bottom: calc(var(--bottom-nav-height) + 20px); }
}

/* =====================
   GLOBAL LANGUAGE SELECTOR
===================== */
.global-lang-selector {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s;
}

.global-lang-selector:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.global-lang-selector select {
  background: #1a1a1a;
  border: 1px solid rgba(255, 153, 0, 0.3);
  border-radius: 8px;
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  min-width: 180px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff9900' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 35px;
}

.global-lang-selector select:hover {
  background-color: #252525;
  border-color: rgba(255, 153, 0, 0.5);
}

.global-lang-selector select:focus {
  border-color: var(--accent-primary);
}

.global-lang-selector select option {
  background: #1a1a1a;
  color: #fff;
  padding: 12px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .global-lang-selector {
    position: fixed;
    top: auto;
    bottom: calc(var(--bottom-nav-height) + 10px);
    right: 10px;
    padding: 4px;
  }
  
  .global-lang-selector select {
    min-width: 140px;
    font-size: 13px;
    padding: 8px 12px;
    padding-right: 30px;
  }
}
