:root {
  --primary: #ff2d55;
  --bg-black: #000000;
  --card-dark: #000000;
  --text-white: #ffffff;
  --text-gray: #a8a8a8;
  --border-color: rgba(255, 255, 255, 0.15);
  --insta-grad: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
}

body {
  background: var(--bg-black);
  color: var(--text-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0; padding: 0;
  overflow-x: hidden;
}

.view { display: none; padding-bottom: 80px; }
.view.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* STORIES */
.stories { display: flex; gap: 12px; padding: 15px 10px; border-bottom: 0.5px solid var(--border-color); overflow-x: auto; scrollbar-width: none; }
.story { min-width: 75px; height: 75px; border-radius: 50%; background: var(--insta-grad); padding: 2.5px; position: relative; }
.story::after { content: ""; display: block; width: 100%; height: 100%; background: #000; border-radius: 50%; border: 2px solid #000; }

/* GENERAL POST STYLING */
.post { margin-bottom: 10px; border-bottom: 0.5px solid var(--border-color); padding-bottom: 10px; }
.post-header { display: flex; align-items: center; padding: 10px 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #262626; border: 0.5px solid var(--border-color); }
.avatar.mini { width: 24px; height: 24px; }
.username { font-weight: 600; margin-left: 10px; font-size: 14px; }

/* TEXT POST (Twitter Style) */
.post-body-text { padding: 5px 14px 10px 58px; font-size: 15px; line-height: 1.5; color: #fff; }
.post-body-text.mini { font-size: 13px; color: var(--text-gray); }

/* THREADING (The Line) */
.reply-thread { position: relative; margin-top: -5px; }
.thread-line { position: absolute; left: 30px; top: -15px; bottom: 30px; width: 2px; background: #333; z-index: -1; }

/* QUOTED / REPOSTED CONTENT */
.quoted-post {
  margin: 5px 14px 10px 58px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding-bottom: 10px;
}
.repost-header { padding: 8px 58px; font-size: 12px; color: var(--text-gray); font-weight: 600; }

/* FOOTER & ACTIONS */
.post-image img { width: 100%; object-fit: cover; }
.post-actions { display: flex; gap: 25px; padding: 10px 14px 10px 58px; }
.icon { font-size: 20px; cursor: pointer; transition: 0.2s; }
.icon:active { transform: scale(1.3); }
.post-content { padding: 0 14px 10px 14px; font-size: 14px; }

/* PROFILE VIEW */
.profile-header-top { padding: 15px; text-align: center; font-weight: 700; border-bottom: 0.5px solid var(--border-color); }
.profile-main-row { display: flex; align-items: center; padding: 20px; justify-content: space-between; }
.profile-avatar-container { width: 85px; height: 85px; border-radius: 50%; background: var(--insta-grad); padding: 3px; }
.avatar-inner { width: 100%; height: 100%; background: #000; border-radius: 50%; border: 2px solid #000; }
.stats-row { display: flex; gap: 30px; padding-right: 20px; }
.stat { text-align: center; }
.stat strong { font-size: 18px; display: block; }
.stat span { font-size: 13px; color: var(--text-gray); }
.user-info-bio { padding: 0 20px; }
.edit-profile-btn { width: calc(100% - 40px); margin: 20px; padding: 10px; border-radius: 8px; border: none; background: #262626; color: #fff; font-weight: 600; cursor: pointer; }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
.grid-item { aspect-ratio: 1/1; background: #121212; }

/* BOTTOM NAV */
.bottom-nav { position: fixed; bottom: 0; width: 100%; background: rgba(0,0,0,0.98); backdrop-filter: blur(15px); display: flex; justify-content: space-around; align-items: center; padding: 12px 0; border-top: 0.5px solid var(--border-color); z-index: 1000; }
.bottom-nav span { font-size: 24px; cursor: pointer; }
.nav-plus-btn { border: 2px solid #fff; border-radius: 8px; padding: 0 6px; font-size: 18px !important; font-weight: bold; }