/* =======================
   ✨ 전역 설정 ✨
======================= */
body {
    margin: 0;
    font-family: 'MainFont', sans-serif;
    color: #5a0a2e;
    background: linear-gradient(135deg, #fff, #ff9fcf);
    overflow-x: hidden;
  }
  
  /* 하트 낙하 */
  body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('heart.png') repeat;
    animation: fall 10s linear infinite;
    opacity: 0.15;
    pointer-events: none;
  }
  
  @keyframes fall {
    0% { background-position: 0 0; }
    100% { background-position: 500px 1000px; }
  }
  

  /* 헤더 타이틀 이미지 크기 조정 */
  header {
    text-align: center;
    padding: 20px 0;
  }
.title-image {
  width: 60%; /* 기존보다 확실히 크게 */
  max-width: 500px;
  height: auto;
  animation: fadeIn 2s ease-in-out;
}
  
  /* =======================
     ✨ 메뉴(nav)
  ======================= */
  .menu {
    display: flex;
    justify-content: center;
    gap: 80px;
    background: rgba(255, 200, 220, 0.6);
    padding: 12px 0;
    font-family: 'MenuFont', sans-serif;
    font-size: 1.1rem;
  }
  
  .menu a {
    color: #77224a;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s;
  }
  
  .menu a:hover .menu-icon,
  .menu a.active .menu-icon {
    transform: scale(1.3);
  }
  
  .menu-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }
  
  /* =======================
     ✨ 메인 컨텐츠
  ======================= */
  main {
    text-align: center;
    padding: 60px 10px;
    min-height: 70vh;
  }
  
  .dday-container {
    margin-top: 40px;
  }
  
  #dday-timer {
    font-size: 1.8rem;
    margin-top: 15px;
  }
  
  .calendar-placeholder {
    width: 150px;
    opacity: 0.7;
  }
  
  /* =======================
     ✨ 갤러리
  ======================= */
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
  }
  
  .gallery-grid img {
    width: 100%;
    border-radius: 15px;
    transition: transform 0.3s;
  }
  
  .gallery-grid img:hover {
    transform: scale(1.05);
  }
  
  /* =======================
     ✨ 방명록 (For)
  ======================= */
  .message-form {
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  textarea {
    width: 80%;
    max-width: 400px;
    height: 100px;
    border-radius: 10px;
    border: 2px solid #ff6ea6;
    padding: 10px;
    font-size: 1rem;
  }
  
  button {
    margin-top: 10px;
    padding: 8px 20px;
    background-color: #ff6ea6;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
  }
  
  button:hover {
    background-color: #ff4c8b;
  }
  
  #messageList {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
  }
  
  .message-bubble {
    position: relative;
    background: #ffe3ef;
    border: 2px solid #ff6ea6;
    border-radius: 15px;
    padding: 15px 20px;
    max-width: 70%;
    font-size: 1rem;
    text-align: center;
  }
  
  .message-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: #ffe3ef transparent transparent transparent;
  }
  
  .delete-btn {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    color: #ff4c8b;
    font-size: 1rem;
    cursor: pointer;
  }
  /* D-Day 강조 박스 */
.dday-box {
    background-color: white;
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
    margin: 10px auto 0 auto;
    text-align: center;
    border: 2px solid #ff99c8;
  }
  
  #dday-highlight {
    color: #c71585;
    font-weight: bold;
  }
  /* =======================
     ✨ 푸터
  ======================= */
  footer {
    text-align: center;
    font-size: 0.9rem;
    padding: 12px;
    background: rgba(255, 200, 220, 0.7);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
  }
  
  /* =======================
     ✨ 등장 효과
  ======================= */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  main, header, nav, footer {
    animation: fadeIn 1.5s ease-in-out;
  }
  /* ------------ 달력 오버레이 포스터  ------------ */
/* .calendar-area 가 이미 있으면 position:relative가 필요합니다.
   없으면 아래 규칙이 적용된 요소를 감싸거나, .calendar-area 클래스를 추가하세요. */
.calendar-area {
    position: relative; /* 필수: poster-overlay가 달력 위에 놓이도록 */
    display: inline-block; /* 달력 크기만큼 컨테이너 크기 유지 */
  }
  
  /* 포스터 이미지(달력 위에 위치하도록) */
  .poster-overlay {
    position: absolute;
    top: 6%;                 /* 달력 위에서 위치 조정: 필요시 값 조절 */
    left: 50%;
    transform: translateX(-50%);
    width: 500%;              /* 포스터 크기 (달력 대비) — 필요시 조절 */
    max-width: 1080px;
    pointer-events: none;    /* 클릭 차단 (달력 클릭 동작 유지) */
    z-index: 40;             /* 충분히 위에 표시되도록 큰 값 */
    image-rendering: auto;
  }
  
  /* ------------ D-DAY 강조 박스 (타이머 바로 아래) ------------ */
  /* .dday-highlight 요소는 dday 타이머 아래에 빈 흰색 박스를 만듭니다.
     필요하면 내부에 텍스트를 넣어 강조용으로도 사용 가능. */
  .dday-highlight {
    width: min(640px, 86%);
    margin: 12px auto 0;
    background: #ffffff;           /* 흰색 채움 (요청) */
    border-radius: 12px;
    padding: 10px 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
    text-align: center;            /* 내부 텍스트 중앙 정렬 */
    z-index: 20;
  }
  
  /* ------------ 하트 캔버스 위치/기본 스타일 (캔버스는 JS가 생성) ------------ */
  #falling-hearts-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999; /* 화면 위에 잘 보이도록 충분히 높게 설정 (다른 요소 가리면 알려주세요) */
  }
/* =======================
   포스터 반응형
======================= */
  .poster-image {
    display: block;
    width: 90%;           /* 부모 폭 대비 90% */
    max-width: 800px;    /* 최대 크기 */
    height: auto;         /* 세로 비율 유지 */
    margin: 0 auto 50px auto; /* 중앙 정렬 + 아래 간격 */
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}



/* =======================
   달력 이미지 크게
======================= */
  /* 달력 이미지 */
  .calendar-placeholder {
    display: block;
    width: 80%;           /* 부모 폭 대비 80% */
    max-width: 500px;     /* 최대 크기 */
    height: auto;
    margin: 0 auto 40px auto; /* D-DAY 간격 */
    opacity: 0.9;
}



/* 모바일 대응 */
@media (max-width: 768px) {
  .poster-image {
    max-width: 90%;
    margin-bottom: 40px;
  }
  .calendar-placeholder {
    max-width: 90%;
    margin-bottom: 30px;
  }
}

@media (max-width: 480px) {
  .poster-image {
    max-width: 100%;
    margin-bottom: 30px;
  }
  .calendar-placeholder {
    max-width: 100%;
    margin-bottom: 25px;
  }
}

/* 기본 폰트 */
@font-face {
  font-family: 'MenuFont';
  src: url('menufont.ttf') format('truetype');
}
@font-face {
  font-family: 'MainFont';
  src: url('mainfont.ttf') format('truetype');
}

body {
  margin: 0;
  font-family: 'MainFont', sans-serif;
  color: #5a0a2e;
  background: linear-gradient(135deg, #fff, #ff9fcf);
  overflow-x: hidden;
  text-align: center;
}

header {
  padding: 20px 0;
}

.title-image {
  width: 70%;
  max-width: 600px;
  height: auto;
  margin: 0 auto;
  animation: fadeIn 2s ease-in-out;
}

main {
  padding: 40px 10px 80px 10px;
  min-height: 70vh;
}

/* =======================
   ✨ 메뉴(nav) 정렬 수정 (모바일 대응 포함)
======================= */
.menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
  background: rgba(255, 200, 220, 0.6);
  padding: 12px 0;
  font-family: 'MenuFont', sans-serif;
  font-size: 1.3rem; /* 글씨 크기 키움 */
  flex-wrap: wrap; /* 모바일 줄바꿈 가능 */
  text-align: center;
}

.menu a {
  color: #77224a;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s;
  -webkit-text-stroke: 0.5px white; /* 흰색 윤곽선 */
}

.menu a:hover .menu-icon,
.menu a.active .menu-icon {
  transform: scale(1.3);
}

.menu-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
}

/* 모바일에서 nav 가운데 정렬 고정 */
@media (max-width: 768px) {
  .menu {
    gap: 40px;
    justify-content: center;
  }
}

/* =======================
   ✨ 본문(body) 글자 크기 확대 + 흰 윤곽 강조
======================= */
body, main, header, footer, .message-bubble, button, textarea, #dday-timer {
  font-size: 1.2rem; /* 전반적으로 크게 */
  -webkit-text-stroke: 0.4px white; /* 흰색 윤곽선 */
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
}

/* D-day 타이머 강조 */
#dday-highlight {
  color: #c71585;
  font-weight: bold;
  -webkit-text-stroke: 0.6px white;
}

/* =======================
   ✨ Lovely 메뉴 (유튜브 영상 크기 조정)
======================= */
.lovely-section iframe {
  width: 80%;
  max-width: 600px; /* 데스크탑에서 너무 크지 않게 */
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  margin: 20px auto;
  display: block;
}

/* 태블릿 이하에서 조금 더 작게 */
@media (max-width: 1024px) {
  .lovely-section iframe {
    width: 85%;
    max-width: 500px;
  }
}

/* 모바일에서는 꽉 차게 */
@media (max-width: 768px) {
  .lovely-section iframe {
    width: 95%;
    max-width: 400px;
  }
}

/* =======================
   ✨ Lovely 메뉴 배경색 통일
======================= */
.lovely-section,
body.lovely-page {
  background: linear-gradient(135deg, #fff, #ff9fcf) !important;
  color: #5a0a2e;
}

/* =======================
   ✨ 추가로 글자 강조 일관성
======================= */
h1, h2, h3, h4, h5, h6, p, span {
  -webkit-text-stroke: 0.4px white;
}