/* ============================================
   나의 오늘의 태민이는? - 다크 모드 기반 스타일
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: #0f1118;
  color: #e8e8ed;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* 풀스크린 배경 이미지 고정 (images/background.webp) */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: #0f1118;
  background-image: url("images/background.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 배경 위 반투명 검은색 오버레이 → 텍스트·버튼 가독성 */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.6);
}

.page {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 90vw;
}

/* 제목: 페이지 상단 중앙 */
.title {
/* 1. 크기 키우기: 최솟값 2rem, 최댓값을 4.5rem으로 대폭 상향 */
font-size: clamp(2rem, 8vw, 4.5rem); 
  
/* 2. 두께 강화: 더 묵직하고 세련되게 */
font-weight: 800; 

/* 3. 자간 및 여백 조정 */
letter-spacing: -0.04em; 
margin: 0 0 2rem; 

/* 4. 그라데이션: 태민이 느낌의 밝은 화이트에서 시안 블루 계열로 */
background: linear-gradient(135deg, #ffffff 0%, #D8BFD8 50%, #D1D1F5  100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;

/* 5. 텍스트 그림자: 글자 뒤에 은은한 광채(Glow) 효과 주기 */
filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.2));
}

/* 제목 안 pansy 아이콘 (images/pansy.png) */
.title-icon {
  vertical-align: middle;
  height: 1em;
  width: auto;
  display: inline-block;
}

h3 {
  /* 1. 크기: 메인보다는 작지만 읽기 편한 사이즈 (최대 1.5rem) */
  font-size: clamp(1.5rem, 2.5vw, 2rem); 
  
  /* 2. 두께: 가볍게 해서 메인 타이틀과 대비를 줌 */
  font-weight: 500; 
  
  /* 3. 디자인: 깔끔한 화이트에 약간의 투명도 */
  color: rgba(255, 255, 255, 0.85);
  
  /* 4. 자간 및 여백: 세련된 느낌을 위해 살짝 넓힘 */
  letter-spacing: 0.05em; 
  margin: -1.5rem 0 3rem; /* 메인 타이틀과의 간격을 좁히기 위해 마이너스 마진 활용 */
  
  text-align: center;
  
  /* 5. 가독성: 배경 이미지 위에서도 잘 보이도록 얇은 그림자 */
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}
/* 메인 버튼: 태민아!!!! */
.btn-main {
  /* 보라색 그라데이션 */
  --btn-bg: linear-gradient(135deg, #7c3aed 0%, #5b21b6 50%, #4c1d95 100%);
  --btn-border: rgba(167, 139, 250, 0.5);
  --btn-shadow: 0 8px 24px rgba(91, 33, 182, 0.4);
  --btn-hover-scale: 1.05;
  --btn-hover-glow: 0 12px 32px rgba(124, 58, 237, 0.45);

  /* 버튼 크기 130% (기준 대비) */
  padding: 1.3rem 3.25rem;
  font-size: 1.625rem;
  font-weight: 600;
  color: #f5f3ff;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-main .btn-icon {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
}

.btn-main:hover {
  transform: scale(var(--btn-hover-scale));
  box-shadow: var(--btn-hover-glow);
  border-color: rgba(167, 139, 250, 0.7);
}

.btn-main:active {
  transform: scale(0.98);
}

/* ============================================
   모달: 랜덤 이미지 팝업
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 배경: 어둡게 + 블러 */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-box {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0e14;
}

.modal-content img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* 닫기 버튼: 우측 상단 */
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: #e8e8ed;
  background: rgba(20, 22, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  background: rgba(220, 60, 60, 0.6);
  transform: scale(1.08);
}

.modal-close:active {
  transform: scale(0.95);
}
