/* 기본 초기화 및 폰트 설정 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #fafafa;
  display: flex;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #262626;
}

/* 전체 로딩 오버레이 */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1115;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 500ms ease, visibility 500ms ease, transform 500ms ease;
}

.loading-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/do-profile.jpg") center center / cover no-repeat;
  opacity: 0.28;
  transform: scale(1.08);
  filter: grayscale(25%);
}

.loading-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 17, 21, 0.3) 0%, rgba(15, 17, 21, 0.92) 80%);
}

.loading-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #fff;
}

.loading-logo {
  font-family: "Grand Hotel", cursive;
  font-size: 44px;
  letter-spacing: 1px;
}

.loading-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  animation: spin 0.9s linear infinite;
}

.loading-text {
  font-size: 14px;
  letter-spacing: 0.2px;
  opacity: 0.9;
}

.loading-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 모바일 화면 프레임 */
.app-container {
  width: 100%;
  background-color: #fff;
  border: 1px solid #dbdbdb;
  min-height: 100vh;
  position: relative;
  padding-bottom: 50px;
}

/* 상단 헤더 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #dbdbdb;
  background-color: #fff;
}

.header .camera-icon { font-size: 22px; }
.header .dm-icon { font-size: 22px; }

.header .logo {
  font-family: "Grand Hotel", cursive;
  font-size: 28px;
  letter-spacing: 1px;
  font-weight: 500;
}

/* 피드 게시물 헤더 */
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
}

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

.profile-img-container {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  padding: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-img-container img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
}

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

.more-options {
  font-size: 16px;
  color: #262626;
}

/* 피드 이미지 */
.post-image {
  width: 100%;
  display: block;
}

.post-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* 게시물 액션 버튼 */
.post-actions {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
}

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

.post-actions i {
  font-size: 24px;
  cursor: pointer;
}

.post-actions i.liked {
  color: #ed4956;
}

.post-actions i.liked::before {
  content: "\f004";
  font-weight: 900;
}

.post-actions i.disabled {
  color: #c7c7c7;
  cursor: not-allowed;
  opacity: 0.7;
}

/* 게시물 본문 */
.post-content {
  padding: 0 15px 15px 15px;
  font-size: 14px;
}

.likes {
  font-weight: 600;
  margin-bottom: 5px;
}

.caption-username {
  font-weight: 600;
  margin-right: 5px;
}

.caption-tags {
  color: #00376b;
}

.caption-text {
  margin-top: 3px;
}

/* 상태 안내 */
.post-status-msg {
  padding: 0 15px 8px 15px;
  font-size: 13px;
  color: #8e8e8e;
}

/* 하단 네비게이션 바 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #fff;
  border-top: 1px solid #dbdbdb;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 10;
}

.bottom-nav i {
  font-size: 24px;
  color: #262626;
  cursor: pointer;
}

/* 기존 스크립트 호환용(숨김) */
.comment-input-bar {
  display: none;
}
