@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #06070a;
  --card-bg: rgba(15, 17, 23, 0.7);
  --card-hover: rgba(22, 26, 36, 0.85);
  --text-main: #f8fafc;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Symmetrical Ambient Mesh Background */
.bg-mesh-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.12;
  animation: pulseGlow 12s infinite alternate ease-in-out;
}

.glow-top-left { top: -100px; left: -100px; background: #ffffff; }
.glow-top-right { top: -100px; right: -100px; background: #ffffff; }
.glow-bottom-right { bottom: -100px; right: -100px; background: #3b82f6; opacity: 0.06; }

.perspective-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 80%);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 7, 10, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.nav-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  cursor: pointer;
}

.site-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.brand-name {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.nav-menu { display: flex; align-items: center; gap: 1.5rem; }
.nav-link { color: var(--text-muted); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.nav-link.active, .nav-link:hover { color: var(--text-main); }

.admin-status-indicator {
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Hero Section */
.hero-banner { padding: 4rem 1.5rem 2rem 1.5rem; }
.hero-content { max-width: 760px; margin: 0 auto; text-align: center; }

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1.2rem;
}

.hero-title { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1rem; }
.hero-description { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; max-width: 620px; margin: 0 auto; }

/* Main Section & Feed Cards */
.writing-container { max-width: 760px; width: 100%; margin: 2rem auto; padding: 0 1.5rem; flex: 1; }
.feed-tabs-wrapper { border-bottom: 1px solid var(--border-color); margin-bottom: 2rem; }
.feed-tabs { display: flex; gap: 2rem; }

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.9rem 0;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn.active { color: var(--text-main); border-bottom-color: #ffffff; }

.posts-feed { display: flex; flex-direction: column; gap: 1.5rem; }

.post-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.post-header { display: flex; justify-content: space-between; align-items: center; }

.author-info {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.header-right-meta { display: flex; align-items: center; gap: 0.8rem; }
.post-date-stamp { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.edited-tag { font-size: 0.78rem; color: var(--text-muted); font-style: italic; margin-left: 2px; }

/* Verified Badge Icon */
.verified-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background-color: #ffffff;
  color: #000000;
  border-radius: 50%;
  font-size: 0.6rem;
  margin-left: 2px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.post-content { font-size: 1rem; line-height: 1.7; color: #e2e8f0; white-space: pre-wrap; user-select: text; }

.post-actions {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
}

.action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.action-btn:hover { color: var(--text-main); }
.action-btn.liked { color: #ef4444 !important; }

.post-controls { display: flex; gap: 0.6rem; }
.control-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; }
.control-btn:hover { color: var(--text-main); }

/* Comments */
.comments-container { margin-top: 0.8rem; padding-top: 1rem; border-top: 1px dashed var(--border-color); display: flex; flex-direction: column; gap: 0.8rem; }
.comment-card { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border-color); padding: 0.8rem 1rem; border-radius: 10px; font-size: 0.88rem; }
.comment-author { font-weight: 700; color: var(--text-main); margin-bottom: 0.2rem; display: flex; align-items: center; gap: 0.3rem; }
.comment-text { color: var(--text-muted); user-select: text; }

.add-comment-box { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.comment-input { flex: 1; background: rgba(0,0,0,0.4); border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6rem 0.9rem; color: var(--text-main); font-family: inherit; user-select: text; }
.comment-submit-btn { background: #ffffff; color: #000000; border: none; border-radius: 8px; padding: 0 1.1rem; cursor: pointer; font-weight: 700; }

/* Floating Action Trigger */
.fab-btn {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  color: #000000;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 90;
}

.fab-btn:hover { transform: scale(1.08); box-shadow: 0 12px 35px rgba(255, 255, 255, 0.35); }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-card {
  background: #0f1117;
  border: 1px solid var(--border-hover);
  border-radius: 20px;
  width: 90%;
  max-width: 480px;
  padding: 2rem;
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.close-btn { background: none; border: none; color: var(--text-muted); font-size: 1.6rem; cursor: pointer; }

.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; }
.form-input { width: 100%; background: #06070a; border: 1px solid var(--border-color); border-radius: 10px; padding: 0.9rem; color: var(--text-main); font-family: inherit; font-size: 0.95rem; user-select: text; }
.form-input:focus { outline: none; border-color: #ffffff; }

.form-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }
.btn-cancel { flex: 1; padding: 0.9rem; border-radius: 10px; border: 1px solid var(--border-color); background: transparent; color: var(--text-muted); font-weight: 700; cursor: pointer; }
.submit-btn { flex: 2; padding: 0.9rem; border-radius: 10px; border: none; background: #ffffff; color: #000000; font-weight: 700; font-family: inherit; cursor: pointer; }

.access-card { text-align: center; }
.restricted-icon { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.05); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem auto; font-size: 1.3rem; }
.access-modal-actions { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1.5rem; }
.btn-secondary { padding: 0.8rem; background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); border-radius: 10px; font-weight: 600; cursor: pointer; }

.feed-loader { text-align: center; padding: 4rem 0; color: var(--text-muted); }
.spinner { width: 28px; height: 28px; border: 2px solid var(--border-color); border-top-color: #ffffff; border-radius: 50%; margin: 0 auto 1rem auto; animation: spin 0.8s linear infinite; }

.site-footer { border-top: 1px solid var(--border-color); padding: 2rem 0; margin-top: 4rem; text-align: center; color: var(--text-muted); font-size: 0.88rem; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseGlow { 0% { transform: scale(1); } 100% { transform: scale(1.2); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalPop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }