/* ═══ Layout ═══ */
.page-container {
 max-width: 900px; margin: 0 auto; padding: 0 16px; 
}

.site-header {
 background: var(--bg-card); border-bottom: 1px solid var(--border-default); padding: 12px 16px; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-xs); 
}

.site-header-inner {
 max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; 
}

.site-logo {
 font-size: 1.4rem; font-weight: 800; color: var(--c-primary); text-decoration: none; 
}

.site-nav {
 display: flex; align-items: center; gap: 12px; 
}

/* ═══ Post Popup Layout ═══ */
.post-popup {
 display: none; position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.55); align-items: center; justify-content: center; 
}

.post-popup.show {
 display: flex; 
}

.post-popup-card {
 background: var(--bg-card); border-radius: 14px; width: 680px; max-width: 94vw; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 8px 40px rgba(0,0,0,0.25); animation: popIn .2s ease; 
}

@keyframes popIn {
 from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } 
}

.post-popup-close {
 position: absolute; top: 12px; left: 12px; background: var(--bg-secondary); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--text-secondary); z-index: 1; transition: background .15s; 
}

.post-popup-close:hover {
 background: var(--bg-tertiary); 
}

.post-popup-body {
 overflow-y: auto; flex: 1; padding: 20px; 
}

/* ═══ Edit Modal ═══ */
.edit-modal-card {
 background: var(--bg-card); border-radius: 14px; width: 600px; max-width: 94vw; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 8px 40px rgba(0,0,0,0.25); 
}

.edit-modal-header {
 display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border-default); 
}

.edit-modal-close {
 background: none; border: none; font-size: 1rem; color: var(--text-secondary); cursor: pointer; padding: 4px 8px; border-radius: 50%; transition: background .15s; 
}

.edit-modal-close:hover {
 background: var(--bg-hover); 
}

/* ═══════════════════════════════════════
   TOP NAVIGATION — Frosted Glass
   ═══════════════════════════════════════ */
.top-nav {

  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--t-normal), border-color var(--t-normal);

}

.nav-inner {

  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-lg);
  height: var(--nav-height);
  gap: var(--space-sm);

}

.nav-brand {

  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  overflow: hidden;
  transition: opacity var(--t-fast);
  letter-spacing: -0.01em;

}

.nav-brand span {
white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

.nav-brand i {
font-size:1.35rem;flex-shrink:0;
}

.nav-brand:hover {
 opacity: 0.8; 
}

.nav-actions {
 display: flex; align-items: center; gap: 6px; 
}

.nav-badge {

  background: var(--c-primary-light);
  color: var(--c-primary);
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--t-fast);
  letter-spacing: 0.01em;

}

.nav-badge:hover {
 background: var(--c-primary); color: #fff; 
}

.nav-link {

  color: var(--text-secondary);
  font-size: .9rem;
  cursor: pointer;
  transition: color var(--t-fast);
  display: flex;
  align-items: center;
  gap: 4px;

}

.nav-link:hover {
 color: var(--c-primary); 
}

.nav-icon-btn, .theme-toggle {

  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--r-full);
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;

}

.nav-icon-btn:hover, .theme-toggle:hover {

  background: var(--bg-secondary);
  color: var(--c-primary);

}

/* Nav Search */
.nav-search {

  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: var(--r-full);
  padding: 0 var(--space-md);
  border: 1.5px solid var(--border-default);
  transition: all var(--t-fast);

}

.nav-search:focus-within {

  border-color: var(--c-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);

}

.nav-search input {

  border: none;
  background: none;
  outline: none;
  padding: 8px 8px;
  font-size: .88rem;
  color: var(--text-primary);
  width: 180px;

}

.nav-search i {
 color: var(--text-tertiary); font-size: .85rem; 
}

/* ═══════════════════════════════════════
   CONTAINER / LAYOUT
   ═══════════════════════════════════════ */
.container {

  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) 60px;

}

.tab-content {
 display: none; 
}

.tab-content.active {
 display: block; animation: fadeUp .35s var(--ease-out); 
}

@keyframes fadeUp {

  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }

}

/* ═══════════════════════════════════════
   VISITOR NAV ELEMENTS
   ═══════════════════════════════════════ */
.visitor-nav-info {
 display: flex; align-items: center; gap: 6px; 
}

.visitor-nav-avatar {
 width: 30px; height: 30px; border-radius: var(--r-full); object-fit: cover; 
}

.visitor-nav-name {
 font-size: .85rem; font-weight: 600; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; 
}

.btn-visitor-login {

  background: var(--c-primary);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background var(--t-fast);

}

.btn-visitor-login:hover {
 background: var(--c-primary-hover); 
}
