/* 기본 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 파스텔 초록 컬러 팔레트 */
    --primary-green: #8B9D83;      /* 세이지 그린 - 메인 포인트 */
    --light-green: #A8B99F;        /* 연한 세이지 그린 */
    --pale-green: #C9D5C3;         /* 페일 그린 */
    --mint-green: #B8C9B8;         /* 민트 그린 */
    --sage-green: #9CAF88;         /* 밝은 세이지 */
    --dark-sage: #6B7D5F;          /* 다크 세이지 */
}

body {
    font-family: 'Noto Serif KR', 'Nanum Myeongjo', serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: #333;
}

/* 스플래시 화면 */
.splash-screen {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100vh;
    height: 100svh;
    background: linear-gradient(135deg, rgba(107, 125, 95, 0.85) 0%, rgba(139, 157, 131, 0.75) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: splashFadeOut 0.8s ease-out 3.5s forwards;
    box-shadow: 0 0 20px rgba(139, 157, 131, 0.4);
}

/* 모바일에서는 그림자 제거 */
@media (max-width: 480px) {
    .splash-screen {
        box-shadow: none;
    }
}

.splash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(107, 125, 95, 0.2) 100%);
    pointer-events: none;
}

.splash-content {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 40px;
}

.splash-initials {
    font-family: 'Playfair Display', 'Nanum Myeongjo', serif;
    font-size: 72px;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 8px;
    margin-bottom: 30px;
    opacity: 0;
    animation: initialsAppear 1s ease-out 0.3s forwards;
}

.splash-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    margin: 0 auto 30px;
    opacity: 0;
    animation: lineExpand 0.8s ease-out 1s forwards;
}

.splash-text {
    font-family: 'Alex Brush', 'Great Vibes', cursive;
    font-size: 36px;
    color: #ffffff;
    letter-spacing: 2px;
    margin-bottom: 20px;
    opacity: 1;
    font-weight: 400;
    min-height: 50px;
    text-shadow: 0 2px 8px rgba(107, 125, 95, 0.3);
}

.splash-text span {
    display: inline-block;
    opacity: 0;
    animation: letterAppear 0.3s ease-out forwards;
}

.splash-date {
    font-family: 'Noto Serif KR', serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 3px;
    font-weight: 300;
    opacity: 0;
    animation: textFadeIn 0.8s ease-out 2s forwards;
}

/* 이니셜 애니메이션 */
@keyframes initialsAppear {
    0% {
        opacity: 0;
        transform: scale(0.8);
        letter-spacing: 20px;
    }
    100% {
        opacity: 1;
        transform: scale(1);
        letter-spacing: 8px;
    }
}

/* 라인 확장 애니메이션 */
@keyframes lineExpand {
    0% {
        opacity: 0;
        width: 0;
    }
    100% {
        opacity: 1;
        width: 80px;
    }
}

/* 텍스트 페이드인 */
@keyframes textFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 글자 하나씩 나타나기 */
@keyframes letterAppear {
    0% {
        opacity: 0;
        transform: translateY(5px) scale(0.8);
    }
    50% {
        transform: translateY(-2px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 스플래시 화면 페이드아웃 */
@keyframes splashFadeOut {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* 스플래시 종료 후 */
.splash-screen.hidden {
    display: none;
}

/* PC에서도 모바일처럼 보이도록 하는 컨테이너 */
.mobile-container {
    width: 100%;
    max-width: 480px;
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

/* 모바일 실제 기기에서는 그림자 제거 */
@media (max-width: 480px) {
    body {
        background-color: white;
    }

    .mobile-container {
        box-shadow: none;
    }
}

/* 커버 이미지 섹션 */
.cover-section {
    position: relative;
    width: 100%;
    height: 70vh;
    height: 70svh; /* 작은 뷰포트 높이 (주소 표시줄 제외) */
    overflow: hidden;
}

.cover-image {
    width: 100%;
    height: 100%;
}

.cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(107, 125, 95, 0.3), rgba(139, 157, 131, 0.15));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cover-label {
    color: white;
    font-size: 14px;
    letter-spacing: 4px;
    font-weight: 300;
    margin-bottom: 20px;
}

.divider-line {
    width: 60px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.7);
}

/* 신랑신부 이름 & 날짜 섹션 */
.main-info-section {
    padding: 60px 20px;
    text-align: center;
    background-color: white;
}

.couple-names {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 30px;
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

.groom-name,
.bride-name {
    color: #333;
}

.name-divider {
    margin: 0 12px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.heart-icon {
    width: 24px;
    height: 24px;
    fill: var(--primary-green);
    animation: heartbeat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(139, 157, 131, 0.3));
}

/* 하트 뛰는 애니메이션 */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.15);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.15);
    }
    56% {
        transform: scale(1);
    }
    100% {
        transform: scale(1);
    }
}

.wedding-date-info {
    margin-top: 30px;
}

.date-eng {
    font-size: 18px;
    letter-spacing: 2px;
    color: #666;
    margin-bottom: 12px;
}

.time-info {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.venue-name {
    font-size: 16px;
    color: #999;
}

/* 공통 섹션 스타일 */
section {
    padding: 60px 20px;
}

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

.divider-short {
    width: 30px;
    height: 1px;
    background-color: #ddd;
}

.section-title {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    font-family: 'Nanum Myeongjo', serif;
}

/* 인사말 섹션 */
.greeting-section {
    background-color: #f8faf7;
}

.greeting-text {
    text-align: center;
    line-height: 1.9;
    color: #555;
    font-size: 15px;
    margin-bottom: 50px;
}

.greeting-text p {
    margin-bottom: 25px;
}

.parents-section {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.parent-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.side-label {
    font-size: 12px;
    color: #999;
    flex: 0 0 32px;
    text-align: left;
}

.parent-names {
    flex: 1;
    text-align: left;
    margin: 0 8px;
}

.relation {
    flex: 0 0 52px;
    text-align: left;
}

.child-name {
    font-weight: 600;
    color: #333;
    flex: 0 0 50px;
    text-align: right;
}

/* GIF 이미지 섹션 */
.gif-section {
    background-color: white;
    padding: 40px 20px;
}

.gif-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(139, 157, 131, 0.15);
}

.gif-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 캘린더 섹션 */
.calendar-section {
    background-color: white;
}

.calendar-display {
    max-width: 350px;
    margin: 0 auto;
}

.calendar-header {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    font-size: 11px;
    color: #999;
    padding: 8px 0;
    font-weight: 600;
}

.calendar-day-header:first-child {
    color: #ff6b6b; /* 일요일 빨간색 */
}

.calendar-day-header:last-child {
    color: #4a90e2; /* 토요일 파란색 */
}

.calendar-date {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #666;
    border-radius: 50%;
}

/* 일요일 날짜들 (1, 8, 15, 22, 29 -> 1열, 8열, 15열...) */
.calendar-date:nth-child(7n+8) {
    color: #ff6b6b;
}

/* 토요일 날짜들 (2, 9, 16, 23, 30 -> 7열, 14열, 21열...) */
.calendar-date:nth-child(7n+14) {
    color: #4a90e2;
}

.calendar-date.empty {
    visibility: hidden;
}

.calendar-date.wedding-day {
    background-color: var(--primary-green);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(139, 157, 131, 0.3);
}

/* 갤러리 섹션 */
.gallery-section {
    background-color: #f8faf7;
}

.gallery-slider {
    display: flex;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    gap: 0;
    margin-bottom: 20px;
    scroll-behavior: smooth;
}

.gallery-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.gallery-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide img {
    width: calc(100% - 40px);
    max-width: 440px;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    pointer-events: none; /* 클릭 방지 */
    user-select: none; /* 선택 방지 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: block;
    margin: 0 auto;
}

/* 도트 인디케이터 */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: var(--primary-green);
    width: 24px;
    border-radius: 4px;
}

/* 오시는 길 섹션 */
.location-section {
    background-color: white;
}

.location-info {
    text-align: center;
    margin-bottom: 30px;
}

.location-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-family: 'Nanum Myeongjo', serif;
}

.location-address {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}

.location-tel {
    font-size: 14px;
    color: #999;
}

.map-container {
    width: 100%;
    border-radius: 12px;
    margin: 30px 0;
    overflow: hidden;
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.map-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.btn-map {
    flex: 1;
    padding: 12px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-map:hover {
    background-color: #f9f9f9;
    border-color: var(--primary-green);
    color: var(--dark-sage);
}

.transport-info {
    margin-top: 30px;
}

.transport-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background-color: #f8faf7;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(139, 157, 131, 0.1);
}

.transport-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.transport-detail h5 {
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
}

.transport-detail p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* 주차장 안내 */
.parking-guide {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(139, 157, 131, 0.2);
}

.parking-guide-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-sage);
    text-align: center;
    margin-bottom: 20px;
}

.parking-image-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.parking-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 마음 전하실 곳 섹션 */
.account-section {
    background-color: #f8faf7;
}

.account-desc {
    text-align: center;
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 40px;
}

.account-group {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.account-header {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.account-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-info {
    flex: 1;
}

.account-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.account-detail {
    font-size: 13px;
    color: #666;
}

.btn-account-copy {
    padding: 8px 16px;
    background-color: var(--primary-green);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(139, 157, 131, 0.2);
}

.btn-account-copy:hover {
    background-color: var(--dark-sage);
    box-shadow: 0 4px 8px rgba(139, 157, 131, 0.3);
}

/* 공유하기 섹션 */
.share-section {
    background-color: white;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
}

.btn-share {
    padding: 15px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-share.kakao {
    background-color: #FEE500;
    color: #3c1e1e;
}

.btn-share.kakao:hover {
    background-color: #fdd800;
}

.btn-share.url {
    background-color: var(--pale-green);
    color: var(--dark-sage);
    border: 1px solid var(--light-green);
}

.btn-share.url:hover {
    background-color: var(--light-green);
    border-color: var(--primary-green);
}

/* 감사 메시지 */
.thanks-section {
    background-color: #f8faf7;
    padding: 80px 20px;
}

.thanks-content {
    text-align: center;
}

.thanks-text {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 16px;
    line-height: 1.9;
    color: #555;
    margin-bottom: 30px;
}

.couple-names-small {
    font-size: 14px;
    color: #999;
    margin-top: 30px;
}

/* 푸터 */
.footer {
    background-color: white;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.footer p {
    font-size: 12px;
    color: #999;
}

/* 토스트 알림 */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 14px;
}

#toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

/* 스크롤 애니메이션 */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 각 섹션별로 약간 다른 딜레이 */
.fade-in-up:nth-child(even) {
    transition-delay: 0.1s;
}

/* 커버는 항상 보이도록 */
.cover-section {
    opacity: 1;
    transform: none;
}
