/* 기본 스타일 초기화 및 공통 스타일 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Serif KR', serif; /* 기본 폰트를 Noto Serif KR로 변경 */
    line-height: 1.8;
    color: #333;
    background-color: #fdfdfd;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 {
    font-weight: 700; /* 폰트 두께를 bold로 설정 */
    margin-bottom: 20px;
    text-align: center;
}

section {
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Header 스타일 */
header {
    background-color: #8D9B87; /* 차분한 녹색 계열 */
    color: white;
    padding: 80px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
}

header .date, header .location {
    font-size: 1.2em;
}

/* 초대 메시지 섹션 */
#invitation-message {
    text-align: center;
}

#invitation-message h2 {
    font-size: 2em;
    margin-bottom: 30px;
}

#invitation-message p {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #555;
}

#invitation-message .parents {
    margin-top: 40px;
    font-size: 1em;
    color: #666;
}

#invitation-message .wedding-announcement {
    margin-top: 30px;
    font-size: 1.8em;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.15em;
    position: relative;
    padding-bottom: 20px;
    display: inline-block;
}

#invitation-message .wedding-announcement::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background-color: #8D9B87;
}

/* 신랑 & 신부 소개 섹션 */
#intro h2, #gallery h2, #event-info h2, #directions h2 {
    font-size: 2.2em;
    margin-bottom: 40px;
    color: #4A4A4A;
}

#intro .couple {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    text-align: center;
}

#intro .person {
    flex-basis: 45%;
}

#intro .profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px auto;
    border: 5px solid #eee;
}

#intro .person h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

#intro .person p.person-description {
    font-size: 1em;
    color: #555;
    margin-top: 20px; /* 뱃지 아래 간격 */
    min-height: 60px; /* 내용 변경 시 높이 변화 최소화 */
}

/* 프로필 카드 플립 애니메이션 */
.profile-card {
    width: 200px; /* 기존 profile-pic 크기와 유사하게 */
    height: 200px;
    perspective: 1000px;
    margin: 0 auto 20px auto;
    cursor: pointer;
}

.profile-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.5, 1.3, 0.5, 1.3); /* 통통 튀는 느낌 */
    transform-style: preserve-3d;
    border-radius: 50%; /* 원형 유지 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.profile-card.flipped .profile-card-inner {
    transform: rotateY(180deg);
}

.profile-card-front,
.profile-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%; /* 원형 유지 */
    overflow: hidden; /* 이미지 원형으로 잘리도록 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-card-front img.selected-badge-icon,
.profile-card-back img.selected-badge-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 이미지 렌더링 개선을 위한 속성 추가 */
    image-rendering: -webkit-optimize-contrast; /* 크로미움 기반 브라우저(Chrome, Edge 등)에서 선명도 개선 */
    transform: scale(1.25) translateZ(0); /* 2배 줌 및 GPU 가속 활성화 */
    backface-visibility: hidden; /* 추가 렌더링 최적화 */
    -webkit-font-smoothing: antialiased; /* 텍스트 및 이미지 부드럽게 처리 */
    -moz-osx-font-smoothing: grayscale;
    /* 추가 이미지 품질 개선 */
    filter: none; /* 브라우저의 기본 필터 제거 */
    image-rendering: high-quality; /* 고품질 렌더링 (Firefox) */
    transition: transform 0.3s ease; /* 부드러운 변환 효과 */
}

.profile-card-back {
    transform: rotateY(180deg);
}

/* 뱃지 행 스타일 */
.badges-row {
    display: flex;
    justify-content: center;
    align-items: center; /* 뱃지들 수직 중앙 정렬 */
    gap: 10px; /* 뱃지 사이 간격 살짝 줄임 */
    margin-top: 20px;
    flex-wrap: wrap; /* 작은 화면에서 뱃지가 많을 경우 줄바꿈 허용 */
}

.badge-item {
    width: 55px; /* 기본 뱃지 크기 */
    height: 55px;
    background-color: #f0f0f0;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 5px; /* 내부 이미지와의 여백. default-badge에서 오버라이드 가능 */
    overflow: hidden; /* 이미지가 둥근 모서리를 넘어가지 않도록 */
}

.badge-item img {
    max-width: 100%; 
    max-height: 100%;
    object-fit: contain; /* 기본적으로는 contain 유지 */
    border-radius: 5px; 
}

.badge-item.default-badge {
    width: 70px; 
    height: 70px;
    border: 2px solid #8D9B87; 
    padding: 0; /* default-badge는 패딩 제거하여 이미지가 꽉 차도록 */
}

/* default-badge 내부 이미지에만 object-fit: cover 적용 */
.badge-item.default-badge img {
    width: 100%; /* 부모(.default-badge) 크기에 꽉 차도록 */
    height: 100%;
    object-fit: cover; /* 이미지를 뱃지 영역에 꽉 채우고, 넘치는 부분은 잘라냄 */
    border-radius: 8px; /* default-badge의 border-radius에 맞춰 조정 (10px - 2px border) */
    transform: scale(2); /* 메인 뱃지 이미지를 2배 확대 */
}

.badge-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.badge-item.active {
    box-shadow: 0 0 0 3px #8D9B87, 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-3px);
}

.badge-item.default-badge.active {
    /* 기본 뱃지가 active일 때는 이미 테두리가 있으므로, box-shadow만 강화 */
    box-shadow: 0 0 0 3px #5c6b57, 0 4px 8px rgba(0,0,0,0.25); 
}

/* 갤러리 섹션 */
.gallery-header {
	display: flex;
	justify-content: center;
	align-items: baseline; /* 세로 정렬 기준을 baseline으로 변경 */
	margin-bottom: 20px;
	gap: 15px;
}

#gallery .gallery-header h2 {
	margin: 0; /* h2의 기본 마진 제거 */
}

.gallery-refresh-btn {
	background: none;
	border: none;
	font-size: 32px; /* h2 폰트 크기와 시각적으로 유사하게 조정 */
	cursor: pointer;
	transition: transform 0.2s ease;
	padding: 0;
	margin: 0;
    line-height: 1; /* 라인 높이를 폰트 크기에 맞춤 */
}

.gallery-refresh-btn:hover {
	transform: scale(1.1);
}

/* 반짝 애니메이션 */
@keyframes blink {
	0%, 50%, 100% { opacity: 1; }
	25%, 75% { opacity: 0.3; }
}

.gallery-refresh-btn.blinking {
	animation: blink 0.6s ease-in-out;
}

#gallery .gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr); /* 항상 3개의 컬럼으로 표시 */
	gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item-likes {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none; /* 클릭 이벤트가 이미지로 전달되도록 */
    transition: opacity 0.3s ease;
    opacity: 0.9;
}

.gallery-item:hover .gallery-item-likes {
    opacity: 1;
}

.gallery-item-likes.liked .like-count-number {
    color: #ffeb3b;
    font-weight: bold;
}

.gallery-item.viewed::after {
    content: '✔';
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #2ecc71;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 1;
    animation: checkmark-appear 0.3s ease-out;
}

@keyframes checkmark-appear {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#gallery .gallery-grid img {
    width: 100%;
    aspect-ratio: 1 / 1; /* 기본적으로 1:1 정사각형 비율 유지 */
    object-fit: cover; /* 비율 유지하며 채우기 */
    display: block;
    image-rendering: -webkit-optimize-contrast;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0); /* GPU 가속을 통해 렌더링 품질 향상 시도 */
    outline: 1px solid transparent; /* 렌더링 개선 시도 */
}

/* 작은 화면에서 최대 3:4 비율을 넘지 않도록 제한 */
@media (max-width: 600px) {
    #gallery .gallery-grid img {
        aspect-ratio: 3 / 4; /* 작은 화면에서는 최대 3:4 비율로 제한 */
    }
}

/* Hover effect is now on .gallery-item, this rule is no longer needed */
#gallery .gallery-grid img:hover {
    transform: none;
}

.gallery-view-counter {
    text-align: center;
    margin: 0 0 20px 0;
    color: #777;
    font-size: 0.9em;
}

/* 예식 정보 섹션 */
#event-info .info-item {
    margin-bottom: 30px;
    text-align: center;
}

#event-info .info-item h3 {
    font-size: 1.4em;
    color: #8D9B87;
    margin-bottom: 8px;
}

#event-info .info-item p {
    font-size: 1.1em;
}

#naver-map {
    width: 100%;
    height: 400px; /* 높이를 400px로 유지 */
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 20px;
    overflow: hidden; /* 내용이 경계를 벗어나지 않도록 설정 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* 그림자 효과 추가 */
    position: relative; /* iframe 위치 기준점 설정 */
}

.naver-map-bubble {
    padding: 12px;
    padding-top: 8px;
    line-height: normal;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.naver-map-bubble a {
    font-weight: bold;
}

/* 오시는 길 섹션 */
#directions .transport-info {
    text-align: left;
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

#directions .transport-info h4 {
    font-size: 1.2em;
    color: #8D9B87;
    margin-bottom: 10px;
    text-align: left;
}

#directions .transport-info p {
    margin-bottom: 15px;
    font-size: 1em;
}

/* Footer 스타일 */
footer {
    text-align: center;
    padding: 40px 20px;
    background-color: #333;
    color: #f0f0f0;
    font-size: 0.9em;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2em;
    }
    #intro .couple {
        flex-direction: column;
        align-items: center;
    }
    #intro .person {
        flex-basis: auto;
        width: 80%;
    }
    section {
        padding: 40px 15px;
    }
    
    .gallery-header {
        gap: 12px;
    }
    
    .gallery-refresh-btn {
        font-size: 40px;
    }
}

/* 지도 앱 버튼 스타일 */
.map-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap; /* 화면이 작을 때 자동 줄바꿈 */
}

.map-button {
    flex: 1;
    min-width: 120px; /* 최소 너비 설정 */
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 12px 15px 12px 57px; /* 왼쪽 패딩 증가: 아이콘(32px) + 좌측여백(15px) + 아이콘-텍스트 간격(10px) */
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative; /* 위치 기반 배치 사용 */
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: #333;
}

.map-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.map-button img {
    width: 32px; /* 아이콘 크기 약간 키움 */
    height: 32px;
    border-radius: 8px; /* 앱 아이콘처럼 모서리 라운딩 추가 */
    object-fit: cover; /* 이미지 비율 유지 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.12); /* 아이콘에 미묘한 그림자 효과 */
    background-color: #fff; /* 배경색 지정 */
    padding: 2px; /* 내부 여백 추가 */
    position: absolute; /* 왼쪽에 고정 배치 */
    left: 15px;
}

.map-button span {
    font-size: 0.9em;
    font-weight: 500;
    width: 100%; /* 전체 너비 사용 */
    text-align: center; /* 가운데 정렬 */
}

@media (max-width: 480px) {
    .map-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .map-button {
        padding: 12px 10px;
    }
}

/* 네이버 지도 정보창 스타일 */
.iw_inner {
    padding: 10px;
    font-family: 'Noto Serif KR', serif;
    text-align: center;
}

.iw_inner h4 {
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #333;
}

.iw_inner p {
    font-size: 0.9em;
    color: #555;
}

/* 감사 메시지 섹션 */
#thanks-message {
    text-align: center;
    padding: 60px 20px;
    background-color: transparent;
    border-top: 1px solid #eaeaea;
}

#thanks-message .thanks-content {
    max-width: 600px;
    margin: 0 auto;
}

#thanks-message p {
    font-size: 1.2em;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #555;
    opacity: 0;
}

#thanks-message .highlight-text {
    font-size: 1.3em;
    color: #8D9B87;
    margin: 30px 0;
    opacity: 0;
}

#thanks-message .heart-image {
    margin: 30px auto 10px;
    width: 100%;
    max-width: 100%;
    height: auto;
    opacity: 0;
}

#thanks-message .heart-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* 화환 안내 섹션 */
#account-info {
    text-align: center;
    padding: 40px 20px;
    margin: 0 auto;
}

.account-section {
    max-width: 600px;
    margin: 0 auto;
}

.account-section h2 {
    font-size: 1.8em;
    margin-bottom: 30px;
    color: #555;
    font-weight: 600;
}

.account-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.new-account-btn {
    background-color: #8D9B87;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(141, 155, 135, 0.3);
}

.new-account-btn:hover {
    background-color: #7a8974;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(141, 155, 135, 0.4);
}

.new-account-btn.bride-btn {
    background-color: #B8A5A5;
    box-shadow: 0 4px 8px rgba(184, 165, 165, 0.3);
}

.new-account-btn.bride-btn:hover {
    background-color: #A89696;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(184, 165, 165, 0.4);
}

/* 계좌 정보 모달은 기본 modal 스타일 사용 */

.account-item {
    background-color: rgba(141, 155, 135, 0.05);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid rgba(141, 155, 135, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.account-item h4 {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #8D9B87;
    font-weight: 600;
    text-align: center;
}

.account-details {
    line-height: 1.6;
    text-align: center;
}

.account-name {
    font-size: 1em;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.account-bank {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
}

.account-number {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.copy-btn {
    background-color: #8D9B87;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background-color: #7A8A74;
}

.copy-btn:active {
    transform: translateY(1px);
}

@media (max-width: 600px) {
    .account-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .new-account-btn {
        padding: 10px 25px;
        font-size: 1.1em;
    }
}

/* 히어로 섹션 스타일 */
#hero {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #fdfdfd;
}

.hero-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    z-index: 2;
}

.hero-image {
    width: 100%;
    height: auto;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    margin: 30px 0;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.d-day-label {
    position: absolute;
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(69, 95, 84, 0.9);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.5em;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 300px;
}

.d-day-highlight {
    color: #ffeb3b;
    font-weight: bold;
}

.wedding-details {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 15px 25px;
    z-index: 10;
    text-align: center;
    min-width: 300px;
}

.wedding-details .date,
.wedding-details .location {
    margin: 5px 0;
    color: #333;
    font-weight: 500;
}

.wedding-details .date {
    font-size: 1.1em;
}

.wedding-details .location {
    font-size: 1em;
}

@media (max-width: 768px) {
    .d-day-label {
        font-size: 1.3em; /* 모바일에서 D-day 라벨 글자 크기 조정 */
        top: 40px; /* 모바일에서 상단 간격 조정 */
        padding: 12px 25px; /* 모바일에서 패딩 조정 */
        min-width: 280px; /* 모바일에서 최소 너비 조정 */
    }
    
    .wedding-details {
        padding: 10px 20px;
        min-width: 250px;
    }
    
    .wedding-details .date {
        font-size: 0.9em;
    }
    
    .wedding-details .location {
        font-size: 0.8em;
    }
}

/* 꽃잎 스타일 */
#petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.petal {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
    pointer-events: none;
    z-index: 3;
}

.petal1 {
    background-image: url('../images/petal1.svg');
}

.petal2 {
    background-image: url('../images/petal2.svg');
}

.petal3 {
    background-image: url('../images/petal3.svg');
}

@media (max-width: 768px) {
    .wedding-details h1 {
        font-size: 1.5em;
    }
    
    .wedding-details .date, 
    .wedding-details .location {
        font-size: 1em;
    }
    
    .d-day-label {
        padding: 12px 25px;
        font-size: 1.3em;
        top: 40px;
        min-width: 280px;
    }
}

/* BGM Control Button */
#bgmControlBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

#bgmControlBtn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* 어두운 반투명 배경 */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* 초기에는 숨김 */
    visibility: hidden; /* 초기에는 숨김 */
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 2000; /* 다른 요소들 위에 표시 */
    padding: 20px;
}

.lightbox-overlay.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-loader {
    border: 5px solid #f3f3f3; /* Light grey */
    border-top: 5px solid #8D9B87; /* Theme color */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    position: absolute;
    z-index: 10;
    display: none; /* Default to hidden */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: -moz-fit-content; /* Firefox fallback */
    width: fit-content;      /* 콘텐츠 너비에 맞게 조절 */
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    /* Initially hide the image until it's loaded */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    flex-shrink: 1; /* 이미지가 공간에 맞게 줄어들도록 허용 */
    min-height: 0; /* flex-shrink가 올바르게 작동하도록 설정 */
}

.lightbox-image.loaded {
    visibility: visible;
    opacity: 1;
}

.lightbox-close-btn {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 2001;
}

.lightbox-close-btn:hover {
    transform: scale(1.1);
    color: #ddd;
}

.lightbox-caption-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    transition: opacity 0.3s ease;
    opacity: 0;
    flex-shrink: 0;
}

.lightbox-overlay.show .lightbox-caption-wrapper {
    opacity: 1;
}

.lightbox-caption {
    width: auto; /* 내용에 맞는 너비 */
    background-color: rgba(0,0,0,0.6);
    padding: 10px 15px;
    border-radius: 5px;
    color: #eee;
    font-size: 0.9em;
    text-align: center;
}

.lightbox-like-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px; /* 캡션과의 간격 */
}

.like-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
    color: #fff; /* 하트 기본 색상 */
}

.like-btn:hover {
    transform: scale(1.2);
}

.like-btn.liked {
    color: #ff4d4d; /* '좋아요' 누른 후 색상 */
    animation: heart-pop 0.4s ease;
}

@keyframes heart-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.like-count {
    font-size: 1.1em;
    font-weight: 500;
    color: #fff;
    min-width: 20px; /* 숫자 변경시 레이아웃 흔들림 방지 */
    text-align: left;
}

.like-count.liked {
    color: #ffeb3b;
    font-weight: bold;
}

/* 라이트박스 네비게이션 래퍼 */
.lightbox-nav-wrapper { display: none !important; }

/* 라이트박스 네비게이션 버튼 사진 안쪽 배치 */
.lightbox-btn-inside-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 90vw;
    margin: 0 auto;
}

.lightbox-btn-inside-wrapper .lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.lightbox-prev-btn,
.lightbox-next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    z-index: 2;
}

.lightbox-prev-btn {
    left: 10px;
}

.lightbox-next-btn {
    right: 10px;
}

.lightbox-prev-btn:hover,
.lightbox-next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev-btn:active,
.lightbox-next-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev-btn:disabled,
.lightbox-next-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.lightbox-prev-btn:disabled:hover,
.lightbox-next-btn:disabled:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .lightbox-btn-inside-wrapper .lightbox-image {
        max-height: 50vh;
    }
    .lightbox-prev-btn,
    .lightbox-next-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .lightbox-prev-btn {
        left: 2px;
    }
    .lightbox-next-btn {
        right: 2px;
    }
}

/* 미래수정 S */
body {
    word-break: keep-all;
}
/* 미래수정 E */

/* 포커스 카드 스타일 */
.guestbook-focus-card {
    width: 100%;
    min-height: 180px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.focus-card-empty {
    text-align: center;
    padding: 40px 0;
    color: #888;
}

.focus-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.focus-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.focus-card-author {
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
}

.focus-card-date {
    font-size: 0.9em;
    color: #888;
}

.focus-card-message {
    font-size: 1.1em;
    line-height: 1.8;
    flex-grow: 1;
    white-space: pre-line;
}

/* 컨트롤 버튼 스타일 */
.guestbook-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.card-nav-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #555;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card-nav-btn:hover {
    background-color: #f5f5f5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.add-guestbook-btn {
    background-color: #8D9B87;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(141, 155, 135, 0.3);
}

.add-guestbook-btn:hover {
    background-color: #7a8974;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(141, 155, 135, 0.4);
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    position: relative;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 25px;
    color: #333;
    font-size: 1.6em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus {
    border-color: #8D9B87;
    outline: none;
}

/* 컬러 옵션 스타일 */
.color-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.color-option {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-swatch {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.color-option input[type="radio"]:checked + .color-swatch {
    transform: scale(1.1);
    border: 2px solid #333;
}

.color-option input[type="radio"]:checked + .color-swatch::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(0,0,0,0.6);
    font-size: 16px;
}

.color-swatch.yellow { background-color: #fff9c4; }
.color-swatch.blue { background-color: #e3f2fd; }
.color-swatch.green { background-color: #e8f5e9; }
.color-swatch.pink { background-color: #fce4ec; }
.color-swatch.purple { background-color: #f3e5f5; }

.submit-btn,
.delete-btn {
    background-color: #8D9B87;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    margin-top: 10px;
}

.submit-btn:hover,
.delete-btn:hover {
    background-color: #7a8974;
}

.delete-btn {
    background-color: #e57373;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .focus-card-author {
        font-size: 1.2em;
    }
    
    .focus-card-message {
        font-size: 1em;
    }
}

/* 주차장 안내 문구 스타일 */
.venue-note {
    font-size: 0.85em;
    color: #777;
    margin-top: 5px;
    font-style: italic;
}

