/* Google Fonts에서 Inter 폰트 불러오기 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── 전체 초기화 ──
   브라우저마다 기본 margin/padding이 달라서 통일시킴 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── 배경 ──
   보라색 그라데이션 배경, 화면 정중앙에 카드 배치 */
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ── 플래시 메시지 (오류/성공 알림) ──
   로그인 실패 등 서버에서 보낸 메시지를 화면 상단에 표시 */
.flash {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff4d4f;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: fadeout 3s forwards;  /* 3초 후 자동으로 사라짐 */
}
.flash.success { background: #52c41a; }  /* 성공 메시지는 초록색 */

@keyframes fadeout {
  0%   { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

/* ── 카드 (흰색 박스) ──
   로그인/회원가입 폼을 담는 흰색 둥근 카드 */
.card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: 420px;
  overflow: hidden;
}

/* ── 카드 상단 헤더 (보라색 영역) ── */
.card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 36px 40px 28px;
  color: white;
}
.card-header h1 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.card-header p  { font-size: 14px; opacity: 0.85; }

/* ── 카드 본문 (흰색 영역) ── */
.card-body { padding: 32px 40px 40px; }

/* ── 탭 (로그인 / 회원가입 전환) ──
   클릭하면 아래 폼이 바뀜 */
.tabs {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 28px;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #aaa;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}
.tab.active { color: #667eea; }
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: #667eea;
  border-radius: 2px;
}

/* ── 폼 섹션 ──
   active 클래스가 붙은 섹션만 보이고 나머지는 숨김 */
.form-section { display: none; }
.form-section.active { display: block; }

/* ── 입력 필드 ── */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafafa;
}
input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
  background: white;
}

/* ── 버튼 ── */
.btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity 0.2s, transform 0.1s;
}
.btn:hover  { opacity: 0.92; }
.btn:active { transform: scale(0.99); }

/* ════════════════════════════════
   프로필 페이지 전용 스타일
   ════════════════════════════════ */

.profile-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: 440px;
  overflow: hidden;
}

/* 프로필 상단 (아바타 + 이름) */
.profile-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px;
  text-align: center;
  color: white;
}
.avatar {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
  border: 3px solid rgba(255,255,255,0.5);
}
.profile-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.profile-header span { font-size: 13px; opacity: 0.8; }

/* 프로필 정보 목록 */
.profile-body { padding: 32px 40px; }
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
}
.info-row:last-of-type { border-bottom: none; }
.info-label { color: #999; font-weight: 500; }
.info-value { color: #1a1a1a; font-weight: 600; }

/* 로그아웃 버튼 */
.btn-logout {
  width: 100%;
  padding: 13px;
  background: #f5f5f5;
  color: #555;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 24px;
  transition: background 0.2s, color 0.2s;
}
.btn-logout:hover { background: #ffe5e5; color: #e53e3e; }
