/* 기본 Reset & Variables - British Royal Style */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* British Royal Colors */
  --royal-navy: #1a237e;
  --royal-blue: #283593;
  --royal-crimson: #8b0000;
  --royal-gold: #c9a227;
  --royal-gold-light: #d4af37;
  --royal-gold-pale: #f5e6a3;
  --royal-cream: #faf8f0;
  --royal-ivory: #fffff0;
  --royal-burgundy: #800020;

  /* Neutrals */
  --primary-color: var(--royal-navy);
  --secondary-color: var(--royal-burgundy);
  --accent-color: var(--royal-gold);
  --bg-color: var(--royal-cream);
  --card-bg: #ffffff;
  --text-color: #1a1a1a;
  --text-light: #4a4a4a;

  /* Shadows */
  --shadow: 0 4px 20px rgba(26, 35, 126, 0.12);
  --shadow-hover: 0 8px 35px rgba(26, 35, 126, 0.2);
  --shadow-luxury: 0 10px 40px rgba(201, 162, 39, 0.15);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans KR', 'Playfair Display', 'Noto Serif KR', serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at top, rgba(201, 162, 39, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(26, 35, 126, 0.03) 0%, transparent 50%);
}

/* 컨테이너 */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 25px;
  background: linear-gradient(180deg, var(--royal-ivory) 0%, var(--royal-cream) 100%);
  min-height: 100vh;
  position: relative;
}

/* Royal Border 장식 */
.container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg,
    var(--royal-crimson) 0%,
    var(--royal-navy) 25%,
    var(--royal-white) 50%,
    var(--royal-navy) 75%,
    var(--royal-crimson) 100%
  );
}

/* 헤더 */
.header {
  text-align: center;
  padding: 35px 0 25px;
  position: relative;
}

/* Royal 장식선 */
.header::after {
  content: '';
  display: block;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--royal-gold), transparent);
  margin: 20px auto 0;
}

.header-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.deco-line {
  width: 35px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--royal-gold), transparent);
}

/* 왕관 아이콘 */
.deco-cross {
  font-size: 1.8rem;
  color: var(--royal-gold);
  text-shadow: 0 2px 4px rgba(201, 162, 39, 0.3);
  position: relative;
}

.deco-crown {
  font-size: 2.2rem;
  margin: 10px 0;
  filter: drop-shadow(0 2px 3px rgba(201, 162, 39, 0.4));
}

.subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--secondary-color);
  margin-bottom: 12px;
  font-weight: 600;
}

.title {
  font-family: 'Playfair Display', 'Noto Serif KR', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 12px;
  letter-spacing: 3px;
  text-shadow: 1px 1px 2px rgba(26, 35, 126, 0.1);
  position: relative;
  display: inline-block;
}

.title::before {
  content: '✦';
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--royal-gold);
}

.title::after {
  content: '✦';
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--royal-gold);
}

.invitation-text {
  font-size: 1.15rem;
  color: var(--secondary-color);
  font-style: italic;
  position: relative;
  display: inline-block;
  font-weight: 500;
  letter-spacing: 2px;
}

.invitation-text::before,
.invitation-text::after {
  content: '✧';
  margin: 0 12px;
  color: var(--royal-gold);
  font-size: 0.7rem;
  vertical-align: middle;
}

/* 초대 메시지 */
.invitation-message {
  margin: 35px 0;
}

.message-box {
  background: var(--card-bg);
  padding: 35px 28px;
  border-radius: 4px;
  box-shadow: var(--shadow-luxury);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.2);
}

/* Royal 장식 모서리 */
.message-box::before,
.message-box::after {
  content: '❧';
  position: absolute;
  font-size: 1.5rem;
  color: var(--royal-gold);
  opacity: 0.4;
}

.message-box::before {
  top: 10px;
  left: 15px;
}

.message-box::after {
  bottom: 10px;
  right: 15px;
  transform: rotate(180deg);
}

.greeting {
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin-bottom: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.message {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-color);
  font-style: italic;
}

/* 이벤트 상세 정보 */
.event-details {
  margin: 35px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-card {
  background: var(--card-bg);
  padding: 22px 25px;
  border-radius: 3px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid var(--royal-gold);
  position: relative;
  overflow: hidden;
}

.detail-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--royal-gold), transparent);
}

.detail-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-hover);
  border-left-color: var(--royal-crimson);
}

.detail-icon {
  font-size: 1.9rem;
  min-width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--royal-navy) 0%, var(--royal-blue) 100%);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(26, 35, 126, 0.25);
}

.detail-content h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--secondary-color);
  margin-bottom: 6px;
  font-weight: 700;
}

.detail-content p {
  font-size: 0.95rem;
  color: var(--text-color);
}

.detail-content .highlight {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

.address-detail {
  color: var(--text-light) !important;
  font-size: 0.9rem !important;
}

/* 지도 섹션 */
.map-section {
  margin: 35px 0;
  background: var(--card-bg);
  padding: 28px;
  border-radius: 3px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201, 162, 39, 0.15);
}

.section-title {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 1px;
}

.section-title::before,
.section-title::after {
  content: '◆';
  font-size: 0.5rem;
  color: var(--royal-gold);
}

.title-icon {
  font-size: 1.3rem;
}

#map {
  width: 100%;
  height: 200px;
  border-radius: 3px;
  overflow: hidden;
  background: #f0f0f0;
  border: 2px solid rgba(201, 162, 39, 0.2);
}

/* 지도 래퍼 */
.map-wrapper {
  width: 100%;
  height: 200px;
  border-radius: 3px;
  overflow: hidden;
  border: 2px solid rgba(201, 162, 39, 0.2);
}

.map-wrapper iframe {
  display: block;
  width: 100%;
  height: 100%;
}

/* 대체 지도 표시용 */
.map-placeholder {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 2px solid rgba(201, 162, 39, 0.2);
}

.map-placeholder-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.6;
}

.map-placeholder-text {
  color: var(--text-light);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.6;
}

.map-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--royal-navy) 0%, var(--royal-blue) 100%);
  color: white;
  text-decoration: none;
  border-radius: 3px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.35s ease;
  box-shadow: 0 4px 15px rgba(26, 35, 126, 0.25);
  letter-spacing: 0.5px;
}

.map-link:hover {
  background: linear-gradient(135deg, var(--royal-blue) 0%, var(--royal-navy) 100%);
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(26, 35, 126, 0.35);
}

.arrow {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.map-link:hover .arrow {
  transform: translateX(6px);
}

/* 푸터 */
.footer {
  text-align: center;
  padding: 35px 0 25px;
  border-top: 1px solid rgba(139, 0, 0, 0.15);
  margin-top: 25px;
  position: relative;
}

.footer::before {
  content: '❧';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--royal-cream);
  padding: 0 15px;
  color: var(--royal-gold);
  font-size: 1.2rem;
}

.prayer-text {
  font-size: 0.95rem;
  color: var(--secondary-color);
  margin-bottom: 12px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.copyright {
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* 애니메이션 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.header {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.invitation-message {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.15s forwards;
  opacity: 0;
}

.detail-card {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.detail-card:nth-child(1) { animation-delay: 0.2s; }
.detail-card:nth-child(2) { animation-delay: 0.35s; }
.detail-card:nth-child(3) { animation-delay: 0.5s; }

.map-section {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
  opacity: 0;
}

.contact-section {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.75s forwards;
  opacity: 0;
}

.footer {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.9s forwards;
  opacity: 0;
}

/* 반응형 */
@media (max-width: 400px) {
  .container {
    padding: 18px;
  }

  .title {
    font-size: 2.2rem;
    letter-spacing: 2px;
  }

  .title::before,
  .title::after {
    display: none;
  }

  .message-box {
    padding: 28px 20px;
  }

  .detail-card {
    padding: 18px 20px;
    gap: 15px;
  }

  .detail-icon {
    min-width: 42px;
    height: 42px;
    font-size: 1.6rem;
  }

  .map-section {
    padding: 20px;
  }

  #map,
  .map-wrapper,
  .map-placeholder {
    height: 180px;
  }
}

/* 다크모드 지원 - Royal Dark */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0d0d1a;
    --card-bg: #1a1a2e;
    --text-color: #e8e8e8;
    --text-light: #a0a0a0;
    --primary-color: #c9a227;
    --secondary-color: #d4af37;
    --royal-gold-pale: #2a2a1a;
  }

  .container {
    background: linear-gradient(180deg, #12121f 0%, #0d0d1a 100%);
  }

  .message-box {
    border-color: rgba(201, 162, 39, 0.3);
  }

  .map-section {
    border-color: rgba(201, 162, 39, 0.25);
  }

  #map {
    background: #2a2a3a;
    border-color: rgba(201, 162, 39, 0.3);
  }
}