* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background: #000000;
  color: #FFFFFF;
  display: flex;
  justify-content: center;
}

.status-bar {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 25px;
  padding: 20px 20px;
  font-size: 12px;
  z-index: 10;
}

.app {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 402px;
  display: flex;
  flex-direction: column;
  padding-bottom: 50px;
}

/* Top navigation */
.top-bar {
  height: 50px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #222;
}

/* Bottom nav */
.bottom-nav {
  height: 50px;
  border-top: 1px solid #222;
  display: flex;justify-content: space-around;
  align-items: center;
  background: #000;
  position: fixed;
  bottom: 0px;
  width: 100%;
}

.bottom-nav img {
  width: 20px;
  height: 20px;
}

/* Stories */
.stories {
  padding: 8px 0;
  border-bottom: 1px solid #222;
  overflow-x: auto;
  display: flex;
  gap: 10px;
  padding-left: 8px;
  font-size: 8px;
}

.story {
  width: 64px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ddd;
}

.story-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 0px;
  background: radial-gradient(circle at 30% 30%, #feda75, #d62976, #962fbf, #4f5bd5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.story-avatar-inner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #444;
  overflow: hidden;
  margin-bottom: 5px;
  margin-top: 4.5px;
}

.story-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Feed */
.feed {
  flex: 1;
  overflow-y: auto;
  background: #000;
}

.post {
  margin-bottom: 20px;
}

.post-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
}

.post-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #555;
}

.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.post-user {
  display: flex;
  flex-direction: column;
  font-size: 12px;
}

.post-username {
  font-weight: 600;
}

.post-location {
  font-size: 11px;
  color: #aaa;
}

.post-more {
  margin-left: auto;
  font-size: 18px;
  color: #aaa;
}

.post-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #333;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px 4px;
  font-size: 20px;
}

.post-actions img {
  width: 20px;
}

.post-actions-left {
  display: flex;
  gap: 14px;
}

.post-likes {
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.post-caption {
  padding: 0 12px 4px;
  font-size: 13px;
}

.post-caption span.username {
  font-weight: 600;
  margin-right: 4px;
}

.post-comments {
  padding: 0 12px 4px;
  font-size: 12px;
  color: #aaa;
}

.post-time {
  padding: 0 12px 8px;
  font-size: 10px;
  color: #777;
  text-transform: uppercase;
}

    /* Simple icon placeholders (you can replace with SVGs) */
    .icon {
      width: 22px;
      height: 22px;
      border-radius: 4px;
      border: 1px solid #777;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: #ccc;
    }

    /* Hide scrollbars for a cleaner look (optional) */
    .feed::-webkit-scrollbar,
    .stories::-webkit-scrollbar {
      display: none;
    }
    .feed,
    .stories {
      -ms-overflow-style: none;
      scrollbar-width: none;
    }


.post-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

/* Carousel viewport = same exact footprint as a single post image */
.post-carousel {
  width: 100%;
  aspect-ratio: 4 / 5;           /* portrait feed post */
  overflow-x: auto;
  overflow-y: hidden;

  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;       /* one full slide per view */

  scroll-snap-type: x mandatory; /* snap slide-by-slide */
  scroll-behavior: smooth;       /* smooth programmatic scroll */
  -webkit-overflow-scrolling: touch;

  /* optional polish to match “post card” */
  border-radius: 12px;
  background: #000;              /* helps if images load slowly */
}

/* Hide scrollbar (optional) */
.post-carousel::-webkit-scrollbar { display: none; }
.post-carousel { scrollbar-width: none; }

/* Each slide occupies the viewport */
.post-slide {
  margin: 0;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;      /* snap each slide to the left edge */
  position: relative;
}

/* Images fill the slide exactly, cropping like Instagram */
.post-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;             /* fill + crop, no distortion */
  object-position: center;
}
