/* ==========================================================================
   STYLE KONSISTEN & VARIABEL WARNA
   ========================================================================== */
:root {
  --navy-dark: #0f172a;
  --navy-primary: #1e293b;
  --blue-accent: #2563eb;
  --blue-light: #e0f2fe;
  --mint-accent: #10b981;
  --mint-light: #d1fae5;
  --bg-light: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   NAVBAR KONSISTEN
   ========================================================================== */
.navbar {
  background-color: var(--navy-primary);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  gap: 1rem;
}

.brand-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo span {
  color: #38bdf8;
}

.search-bar {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 9999px;
  border: 1px solid #475569;
  background-color: #0f172a;
  color: #ffffff;
  font-size: 0.9rem;
}

.search-bar input:focus {
  outline: 2px solid var(--blue-accent);
}

.search-bar i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #cbd5e1;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  border-bottom: 2px solid #38bdf8;
  padding-bottom: 0.2rem;
}

.nav-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #334155;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn {
  padding: 0.5rem 1.15rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-primary {
  background-color: var(--blue-accent);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-outline {
  border: 1px solid #475569;
  background-color: transparent;
  color: #ffffff;
}

.btn-outline:hover {
  background-color: #334155;
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

/* ==========================================================================
   LAYOUT GENERAL & KARTU THREAD (VOTE BOX DIHILANGKAN)
   ========================================================================== */
.main-layout {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

.full-width-layout {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.badge {
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-tag {
  background-color: var(--blue-light);
  color: var(--blue-accent);
}

.badge-verified {
  background-color: var(--mint-light);
  color: var(--mint-accent);
}

.hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy-primary));
  color: #ffffff;
  padding: 3.5rem 2rem;
  border-radius: 1rem;
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.hero p {
  color: #94a3b8;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.hero-search {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}

.hero-search input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 1rem;
}

/* KARTU THREAD BERSIH TANPA AREA VOTE */
.thread-card {
  display: flex;
  gap: 1rem;
}

.thread-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.thread-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 0.4rem;
  cursor: pointer;
}

.thread-title:hover {
  color: var(--blue-accent);
}

/* META DATA SEJAJAR DI BAGIAN BAWAH KARTU */
.thread-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ==========================================================================
   TOAST, MODAL & CHAT SYSTEM
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--navy-primary);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--blue-accent);
  animation: slideIn 0.3s ease, fadeOut 0.5s 2.5s forwards;
}

.toast.success { border-left-color: var(--mint-accent); }
.toast.info { border-left-color: var(--blue-accent); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(10px); }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 580px;
  padding: 24px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
}

.chat-messages {
  height: 250px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  background: var(--bg-light);
}

.chat-bubble {
  max-width: 75%;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.chat-bubble.sent {
  align-self: flex-end;
  background-color: var(--blue-accent);
  color: #ffffff;
}

.chat-bubble.received {
  align-self: flex-start;
  background-color: #e2e8f0;
  color: var(--navy-primary);
}

.chat-input-group {
  display: flex;
  gap: 8px;
}

.chat-input-group input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.btn-follow.following {
  background-color: var(--mint-light) !important;
  color: var(--mint-accent) !important;
  border-color: var(--mint-accent) !important;
}

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links, .search-bar, .nav-actions {
    display: none;
  }
  .hamburger {
    display: block;
  }
  .hero-search {
    flex-direction: column;
  }
}