/* 기본 설정 */
body {
  font-family: 'Apple SD Gothic Neo', sans-serif;
  margin: 0;
  background-color: #fff;
}

/* 인스타그램 포스트 전체 컨테이너 */
.insta-post {
  max-width: 400px;
  margin: 0 auto;
  border: 1px solid #ddd;
  background: #fff;
}

/* 상단 헤더 */
.header {
  display: flex;
  align-items: center;
  padding: 10px;
  font-weight: bold;
  border-bottom: 1px solid #eee;
}

.back-arrow {
  margin-right: 10px;
}

/* 유저 정보 */
.user-info {
  display: flex;
  align-items: center;
  padding: 10px;
}

.profile-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 10px;
}

.username {
  font-weight: bold;
  flex: 1;
}

.dots {
  cursor: pointer;
}

/* 게시 이미지 */
.post-image img {
  width: 100%;
  display: block;
}

/* 액션바 */
.post-actions {
  display: flex;
  align-items: center;
  padding: 10px;
}

.post-actions span {
  font-size: 20px;
  margin-right: 10px;
  cursor: pointer;
}

.post-actions .bookmark {
  margin-left: auto;
}

/* 좋아요 표시 */
.likes {
  padding: 0 10px;
  font-weight: bold;
}

/* 댓글 안내 문구 */
.no-comments,
.comment-prompt,
.post-date {
  padding: 0 10px;
  font-size: 14px;
  color: #777;
  margin-top: 5px;
}

/* 하단 내비게이션 바 */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 400px;
  margin: 0 auto;
  height: 48px;
  background-color: #fff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #ccc;
  z-index: 1000;
}

.nav-bar span {
  font-size: 20px;
  cursor: pointer;
}

/* ===================== 댓글 모달 ===================== */
.comment-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: calc(100% - 48px); /* 수정: 하단바 높이만큼 뺌 */
  z-index: 999;
}

.modal-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: absolute;
  bottom: 0;
  width: 100%;
  max-height: 75%; /* 수정: 기존보다 더 여유 공간 확보 */
  background: #fff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  font-weight: bold;
  border-bottom: 1px solid #eee;
}

.close-btn {
  cursor: pointer;
}

.comments {
  padding: 10px;
  flex: 1;
  overflow-y: auto;
}

.comment {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 14px;
}

.comment-user {
  font-weight: bold;
  margin-right: 5px;
}

.comment-buttons {
  display: flex;
  gap: 5px;
  font-size: 12px;
}

.comment-buttons span {
  cursor: pointer;
  color: #777;
}

.comment-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ddd;
  background-color: #fff;
}

.profile-img-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-right: 10px;
}

.comment-input input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
}

.comment-input button {
  background: none;
  border: none;
  color: #3897f0;
  font-weight: bold;
  cursor: pointer;
  margin-left: 10px;
  font-size: 14px;
}

.edit-input {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 14px;
  width: 100%;
}

/* 업로드 모달 */
.upload-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.upload-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 360px;
  padding: 20px;
  text-align: center;
  animation: slideUp 0.3s ease-out;
  position: relative;
}

.upload-header {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upload-body {
  border: 2px dashed #ccc;
  padding: 30px;
  border-radius: 10px;
  cursor: pointer;
}

.upload-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.upload-btn {
  display: inline-block;
  margin-top: 10px;
  background: #0095f6;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.upload-preview img,
.upload-preview video {
  margin-top: 15px;
  max-width: 100%;
  border-radius: 10px;
}

.close-upload {
  cursor: pointer;
  font-size: 18px;
}

@keyframes slideUp {
  from {
    transform: translateY(50%);
    opacity: 0;
  }
  to {
    transform: translateY(0%);
    opacity: 1;
  }
}

.upload-post-button {
  margin-top: 10px;
  background-color: #0095f6;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}
