/* Instagram Views CSS - for phone mockup */

.ig-view {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.ig-view::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Profile Header */
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left svg {
  cursor: pointer;
}

.header-left .username {
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.header-right {
  display: flex;
  gap: 16px;
}

.header-icon {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Profile Section */
.profile-section {
  padding: 12px 16px;
  flex-shrink: 0;
}

.profile-content-wrapper {
  flex: 1;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.profile-content-wrapper::-webkit-scrollbar {
  display: none;
}

.profile-top-section {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}

.profile-avatar-container {
  flex-shrink: 0;
}

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

.profile-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.profile-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  margin-left: -8px;
  color: white;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.profile-stats {
  display: flex;
  gap: 8px;
  font-size: 11px;
  margin-left: -8px;
}

.profile-stats .stat {
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.profile-stats .stat strong {
  color: white;
  font-weight: 600;
}

.profile-stats .stat:last-child {
  cursor: pointer;
}

.profile-bio-section {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}

.bio-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
  color: rgba(255, 255, 255, 0.9);
}

.bio-link {
  color: #e0f1ff;
  text-decoration: none;
  font-weight: 500;
}

.bio-link:hover {
  text-decoration: underline;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.2s;
}

.tab.active {
  border-bottom-color: white;
}

.tab svg {
  opacity: 0.5;
  fill: white;
}

.tab.active svg {
  opacity: 1 !important;
  fill: white !important;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding-bottom: 20px;
}

.posts-grid::-webkit-scrollbar {
  display: none;
  width: 0;
}

.post-item {
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
}

.post-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tagged Posts View */
.tagged-posts-view {
  padding: 60px 20px;
  text-align: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.empty-icon {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  border-radius: 50%;
}

.empty-title {
  font-size: 22px;
  font-weight: 300;
  color: white;
}

/* Modal */
.modal {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #262626;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  color: white;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: white;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.following-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.following-list::-webkit-scrollbar {
  display: none;
}

.account-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
}

.account-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-info {
  flex: 1;
  min-width: 0;
}

.account-username {
  font-size: 13px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.follow-btn {
  background: #0095f6;
  color: white;
  border: none;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.follow-btn.following {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Post Detail View */
.post-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  flex-shrink: 0;
}

.post-detail-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.post-detail-content {
  flex: 1;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  min-height: 0;
}

.post-detail-content::-webkit-scrollbar {
  display: none;
}

.post-detail-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.post-user-info {
  flex: 1;
}

.post-username {
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.post-location {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.post-menu-btn {
  background: none;
  border: none;
  color: white;
  padding: 0;
  cursor: pointer;
}

.post-detail-image {
  width: 100%;
  background: #000;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-detail-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  display: block;
  object-fit: contain;
}

.post-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.post-detail-actions * {
  pointer-events: all;
}

.action-left {
  display: flex;
  gap: 16px;
}

.action-right {
  display: flex;
}

.action-icon {
  cursor: pointer !important;
  pointer-events: all !important;
  transition: all 0.15s ease;
  user-select: none;
  position: relative;
  z-index: 10;
}

.action-icon:hover {
  opacity: 0.8;
}

.action-icon:active {
  transform: scale(0.85) !important;
  opacity: 0.6 !important;
}

 .action-icon.saved {
   fill: white;
 }

.post-detail-caption {
  padding: 0 16px 16px 16px;
}

.post-likes {
  font-size: 13px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
}

.post-likes b {
  font-weight: 600;
  color: white;
}

.post-text {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.post-text b {
  font-weight: 600;
  color: white;
}

.hashtags {
  color: #4d9fff;
}

/* Profile View */
.profile-view {
  display: none;
  flex-direction: column;
  height: 100%;
  background: #000;
}

.profile-view.active {
  display: flex;
}

#profileView {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#profileView .app-bottom-nav {
  margin-top: 0;
}

/* Post Detail View */
.post-detail-view {
  display: none;
  flex-direction: column;
  height: 100%;
  background: #000;
  overflow-y: auto;
}

.post-detail-view.active {
  display: flex;
}

/* Bottom Navigation */
.app-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  flex-shrink: 0;
}

.nav-icon {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.nav-icon:hover {
  opacity: 1;
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
}

.nav-avatar.active {
  border-color: white;
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
