/* ================================
   좋은 시간 app - 공통 스타일
   ================================ */

:root {
  --bg-pink: #ffeded;
  --border-brown: #9f2b08;
  --card-frame: #ffe9e3;
  --btn-red: #b10a0a;
  --btn-text: #ede8f4;
  --text-dark: #3a2323;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-pink);
  font-family: 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- 로고 / 타이틀 ---------- */
.logo-box {
  background: #ffffff;
  border: 5px solid var(--card-frame);
  border-radius: 20px;
  padding: 14px 24px;
  margin: 20px auto 32px;
  text-decoration: none;
  display: inline-block;
}

.logo-box h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(90deg, #e05fa0, #f2a65a, #6fc3d1, #7d8fe0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 상단 네비 (로그인/회원가입) ----------
   원본 피그마 레이아웃을 그대로 유지하기 위해
   문서 흐름에 영향을 주지 않도록 화면 우상단에 겹쳐서 배치합니다. */
.top-nav {
  position: absolute;
  top: 14px;
  right: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  font-size: 13px;
  z-index: 10;
}

.top-nav a {
  color: var(--border-brown);
  text-decoration: none;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.top-nav a:hover {
  background: rgba(255, 255, 255, 0.9);
}

.top-nav .user-chip {
  font-size: 13px;
  color: var(--text-dark);
  padding: 5px 9px;
}

/* ---------- 사진 갤러리 (홈) ---------- */
.gallery {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  row-gap: 18px;
  margin-top: 10px;
}

.gallery a.photo-card {
  display: block;
  width: 47%;
  aspect-ratio: 1 / 1;
  border: 5px solid var(--border-brown);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(159, 43, 8, 0.12);
  transition: transform 0.15s ease;
}

.gallery a.photo-card:hover {
  transform: translateY(-3px) scale(1.02);
}

.gallery a.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- 상세 페이지 ---------- */
.detail-image-frame {
  width: 100%;
  border: 5px solid var(--border-brown);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 40px;
  box-shadow: 0 4px 14px rgba(159, 43, 8, 0.15);
}

.detail-image-frame img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.detail-caption {
  margin-top: 18px;
  text-align: center;
  font-size: 15px;
  color: var(--text-dark);
  line-height: 1.5;
}

/* ---------- home 버튼 ---------- */
.home-btn {
  margin-top: auto;
  padding-top: 48px;
}

.home-btn a {
  display: inline-block;
  background: var(--btn-red);
  color: var(--btn-text);
  font-size: 26px;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 40px;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(177, 10, 10, 0.3);
  transition: opacity 0.15s ease;
}

.home-btn a:hover {
  opacity: 0.88;
}

/* ---------- 로그인 / 회원가입 폼 ---------- */
.auth-card {
  width: 100%;
  background: #ffffff;
  border: 5px solid var(--card-frame);
  border-radius: 20px;
  padding: 32px 24px;
  margin-top: 20px;
  box-shadow: 0 4px 10px rgba(159, 43, 8, 0.1);
}

.auth-card h2 {
  margin: 0 0 24px;
  text-align: center;
  font-size: 24px;
  color: var(--border-brown);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #6b4a3a;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid #f0d5cf;
  font-size: 15px;
  background: #fffaf9;
  outline: none;
}

.field input:focus {
  border-color: var(--border-brown);
}

.field-error {
  color: #c0392b;
  font-size: 12px;
  margin-top: 4px;
  min-height: 14px;
}

.submit-btn {
  width: 100%;
  background: var(--btn-red);
  color: var(--btn-text);
  font-size: 18px;
  font-weight: 700;
  border: none;
  padding: 14px;
  border-radius: 30px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 10px rgba(177, 10, 10, 0.3);
}

.submit-btn:hover {
  opacity: 0.9;
}

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: #6b4a3a;
}

.auth-switch a {
  color: var(--border-brown);
  font-weight: 700;
  text-decoration: none;
}

.form-message {
  text-align: center;
  font-size: 14px;
  margin-top: 14px;
  min-height: 18px;
}

.form-message.success {
  color: #1c7a3a;
}

.form-message.error {
  color: #c0392b;
}

.hint {
  font-size: 12px;
  color: #a0867d;
  text-align: center;
  margin-top: 22px;
  line-height: 1.6;
}
