/* ==================== ULTRA-PREMIUM V4 (THE EXPANSIVE LOOK) ==================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg: #ffffff;
  --bg-dim: #f7f9f9;
  --primary: #1d9bf0;
  --primary-hover: #1a8cd8;
  --primary-light: rgba(29, 155, 240, 0.1);
  
  --text: #0f1419;
  --text-dim: #536471;
  --text-muted: #8b98a5;
  
  --border: #eff3f4;
  --border-strong: #cfd9de;
  
  --red: #f4212e;
  --green: #00ba7c;
  
  --font: 'Outfit', -apple-system, system-ui, sans-serif;
  --sidebar-w: 275px;
  --right-w: 350px;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: normal;
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.layout-container {
  display: grid;
  grid-template-columns: var(--sidebar-w) 600px var(--right-w);
  width: 100%;
  max-width: 1250px;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  padding: 12px;
  height: 100vh;
  position: sticky;
  top: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.logo {
  padding: 12px;
  font-size: 32px;
  margin-bottom: 4px;
  cursor: pointer;
  display: inline-block;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: 9999px;
  transition: background 0.2s;
  margin-bottom: 4px;
  width: fit-content;
  max-width: 100%;
}

.nav-link:hover { background: rgba(15, 20, 25, 0.1); }
.nav-link.active { font-weight: 700; }

.nav-link span { font-size: 24px; }

.btn-logout {
  margin-top: auto;
  margin-bottom: 12px;
  background: none;
  border: none;
  padding: 12px;
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  color: var(--red);
  text-align: left;
  border-radius: 9999px;
}

.btn-logout:hover { background: rgba(244, 33, 46, 0.1); }

/* ==================== MAIN CONTENT ==================== */
.main-content {
  border-right: 1px solid var(--border);
  min-height: 100vh;
}

.view-header {
  height: 53px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.view-header h2 { font-size: 20px; font-weight: 800; }

/* Composer */
.composer {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

.composer-avatar { width: 48px; height: 48px; border-radius: 50%; background: #eee; overflow: hidden; }
.composer-right { flex: 1; }

.composer textarea {
  width: 100%;
  border: none;
  font-size: 20px;
  padding: 12px 0;
  resize: none;
  outline: none;
  font-family: var(--font);
  color: var(--text);
}

.composer-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Post Cards */
.post {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.post:hover { background: rgba(0,0,0,0.02); }

.post-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: #eee; flex-shrink: 0; }
.post-right { flex: 1; }

.post-meta { font-size: 15px; margin-bottom: 2px; }
.post-name { font-weight: 700; color: var(--text); }
.post-username { color: var(--text-dim); }

.post-content { font-size: 15px; line-height: 1.4; color: var(--text); margin-bottom: 12px; white-space: pre-wrap; }

.post-footer { display: flex; justify-content: space-between; max-width: 425px; color: var(--text-dim); }
.post-action { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 9999px; transition: 0.2s; }
.post-action:hover { color: var(--primary); background: var(--primary-light); }
.post-action.liked { color: var(--red); }

/* ==================== RIGHT COLUMN ==================== */
.right-column {
  padding: 12px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.search-bar {
  background: var(--bg-dim);
  border-radius: 9999px;
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.search-bar input { background: none; border: none; outline: none; flex: 1; font-size: 15px; font-family: var(--font); }

.section-box {
  background: var(--bg-dim);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.section-title { font-size: 20px; font-weight: 800; margin-bottom: 12px; }

.trend-item { margin-bottom: 16px; }
.trend-cat { font-size: 13px; color: var(--text-dim); }
.trend-name { font-size: 15px; font-weight: 700; display: block; }
.trend-count { font-size: 13px; color: var(--text-dim); }

/* Chat */
.chat-widget {
  background: var(--bg-dim);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--border);
}

.chat-header { padding: 12px 16px; font-weight: 800; border-bottom: 1px solid var(--border); background: white; }

.chat-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.chat-msg {
  padding: 8px 12px;
  font-size: 14px;
  background: white;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  max-width: 85%;
  align-self: flex-start;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.chat-msg.me {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 4px;
}

.chat-footer { padding: 12px; background: white; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-footer input { flex: 1; border: 1px solid var(--border); background: var(--bg-dim); border-radius: 9999px; padding: 8px 16px; outline: none; }

/* ==================== BUTTONS ==================== */
.btn {
  padding: 8px 16px;
  border-radius: 9999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { filter: brightness(90%); }

.btn-full { width: 100%; display: block; padding: 14px; font-size: 16px; }

/* ==================== AUTH PAGE (FIX) ==================== */
.auth-wrap {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  padding: 40px;
}

.auth-card h1 { font-size: 48px; font-weight: 900; letter-spacing: -2px; margin-bottom: 8px; }
.auth-card p { font-size: 18px; color: var(--text-dim); margin-bottom: 32px; }

.input-box { margin-bottom: 24px; }
.input-box label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.input-box input {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
  .layout-container { grid-template-columns: 80px 1fr 340px; }
  .nav-link span:not(.icon) { display: none; }
  .sidebar { width: 80px; align-items: center; }
}

@media (max-width: 700px) {
  .layout-container { grid-template-columns: 80px 1fr; }
  .right-column { display: none; }
}
