/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #4a4a4a;
    background-color: var(--background-blue);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Color Variables for Boy Theme */
:root {
    --primary-blue: #4a90e2;
    --secondary-blue: #357abd;
    --light-blue: #e3f2fd;
    --dark-blue: #2c5aa0;
    --accent-navy: #1e3a8a;
    --background-blue: #f8fbff;
}

/* Container */
.container {
    max-width: 420px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Base Styles */
section {
    padding: 60px 0;
    position: relative;
}

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

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--background-blue) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="%23f4a261" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="%23e76f51" opacity="0.1"/><circle cx="40" cy="80" r="1.5" fill="%23f4a261" opacity="0.1"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

.hero-image {
    position: relative;
    text-align: center;
}

.hero-photo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 30px;
    box-shadow: 0 20px 40px rgba(74, 144, 226, 0.3);
    border: 6px solid #fff;
    display: block;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

.hero-overlay {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-name {
    font-size: 28px;
    font-weight: 600;
    color: var(--secondary-blue);
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 16px;
    color: #6b6b6b;
    font-weight: 300;
    line-height: 1.5;
}

/* Invitation Section */
.invitation-section {
    background-color: #fff;
    padding: 80px 0;
}

.invitation-text {
    max-width: 300px;
    margin: 0 auto;
}

.greeting {
    font-size: 18px;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 20px;
}

.message {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #5a5a5a;
}

.parents-name {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.parents-name p {
    font-size: 16px;
    color: var(--primary-blue);
    font-weight: 500;
}

/* Date Section */
.date-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    text-align: center;
}

.date-section .section-title {
    color: white;
    margin-bottom: 50px;
}

.date-section .section-title::after {
    background: white;
}

.date-info {
    max-width: 320px;
    margin: 0 auto;
}

.main-date {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.date-number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.date-day {
    font-size: 18px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.date-time {
    font-size: 20px;
    font-weight: 500;
}

.countdown-container {
    text-align: center;
}

.countdown-label {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 15px;
    min-width: 70px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.countdown-item span {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.countdown-item label {
    font-size: 12px;
    opacity: 0.8;
}

/* Timeline Section */
.timeline-section {
    background-color: var(--background-blue);
    padding: 80px 0;
}

.timeline {
    max-width: 350px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-blue), var(--secondary-blue));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    text-align: center;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 60px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-blue);
    transform: translateX(-50%);
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--primary-blue);
    z-index: 2;
}

.timeline-date {
    font-size: 14px;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 15px;
    background: var(--primary-blue);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.timeline-content {
    background: white;
    border-radius: 15px;
    padding: 25px 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f5f5f5;
}

.timeline-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 4px solid var(--primary-blue);
}

.timeline-content h3 {
    font-size: 18px;
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-weight: 600;
}

.timeline-content p {
    font-size: 14px;
    color: #6b6b6b;
    line-height: 1.5;
}

/* Party Info Section */
.party-info-section {
    background-color: #fff;
    padding: 80px 0;
}

.party-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 350px;
    margin: 0 auto;
}

.party-card {
    background: var(--light-blue);
    border-radius: 15px;
    padding: 30px 25px;
    text-align: center;
    border: 2px solid var(--background-blue);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.party-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.15);
}

.party-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.party-card h3 {
    font-size: 18px;
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-weight: 600;
}

.party-card p {
    font-size: 14px;
    color: #6b6b6b;
    line-height: 1.5;
    margin-bottom: 8px;
}

.party-date-highlight {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--secondary-blue) !important;
}

.party-venue {
    font-weight: 500 !important;
    color: #5a5a5a !important;
}

.party-address {
    font-size: 13px !important;
    color: #8a8a8a !important;
}

.party-note {
    font-size: 12px !important;
    color: #999 !important;
    font-style: italic;
}

/* Gallery Section */
.gallery-section {
    background: linear-gradient(135deg, var(--background-blue) 0%, var(--light-blue) 100%);
    padding: 80px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 350px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-photo {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 144, 226, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-zoom {
    font-size: 24px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery-photo {
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-photo {
    transform: scale(1.1);
}

/* Location Section */
.location-section {
    background-color: #fff;
    padding: 80px 0;
}


/* Link Styles */
.map-link, .location-link {
    display: inline-block;
    background: var(--primary-blue);
    color: white !important;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.map-link:hover, .location-link:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
    color: white !important;
}

.party-venue-sub {
    font-size: 14px !important;
    color: var(--secondary-blue) !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
}

.location-info {
    max-width: 350px;
    margin: 0 auto;
}

.map-container {
    margin-bottom: 40px;
}

.map-placeholder {
    background: #f5f5f5;
    border: 2px dashed #d0d0d0;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.map-placeholder p {
    margin-bottom: 10px;
}

.map-note {
    font-size: 12px !important;
    font-style: italic;
}

.location-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.location-card {
    background: var(--light-blue);
    border-radius: 15px;
    padding: 25px 20px;
    border: 1px solid var(--background-blue);
}

.location-card h3 {
    font-size: 16px;
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-weight: 600;
}

.location-card p {
    font-size: 14px;
    color: #6b6b6b;
    line-height: 1.5;
    margin-bottom: 5px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    padding: 40px 0 100px 0; /* 하단 여백 늘려서 플로팅 메뉴 공간 확보 */
    text-align: center;
}

.footer-message {
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 300;
}

.footer-contact {
    font-size: 14px;
    opacity: 0.9;
}

/* Floating Navigation */
.floating-nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(74, 144, 226, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 375px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .hero-photo {
        width: 240px;
        height: 240px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .countdown {
        gap: 15px;
    }
    
    .countdown-item {
        padding: 15px 10px;
        min-width: 60px;
    }
    
    .countdown-item span {
        font-size: 20px;
    }
    
    .floating-nav {
        bottom: 20px;
        padding: 8px 12px;
        gap: 8px;
    }
    
    .nav-item {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .footer {
        padding: 30px 0 120px 0; /* 작은 화면에서 더 많은 여백 */
    }
    
    .footer-message {
        font-size: 14px;
        padding: 0 20px;
    }
    
    .footer-contact {
        font-size: 12px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 600px;
        padding: 0 40px;
    }
    
    section {
        padding: 100px 0;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-photo {
        width: 320px;
        height: 320px;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .party-details {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        max-width: 550px;
    }
    
    .party-card:nth-child(3) {
        grid-column: 1 / -1;
        max-width: 260px;
        margin: 0 auto;
    }
    
    .gallery-grid {
        max-width: 500px;
        gap: 15px;
    }
    
    .location-details {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .location-card:nth-child(1) {
        grid-column: 1 / -1;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-content {
    animation: fadeInUp 0.8s ease-out;
}

/* Smooth transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* Music Control */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.music-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
}

.music-btn:hover {
    background: var(--secondary-blue);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.5);
}

.music-btn.muted {
    background: #999;
    color: #fff;
    opacity: 0.7;
}

.music-btn:active {
    transform: scale(0.95);
}

/* 음악 버튼 깜빡임 애니메이션 */
@keyframes pulse {
    0% {
        box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    }
    50% {
        box-shadow: 0 6px 20px rgba(74, 144, 226, 0.8);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    }
}

/* 라이트박스 */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 10000;
    animation: zoomIn 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: white;
    transform: scale(1.1);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* 라이트박스 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* 모바일에서 더 크게 */
@media (max-width: 768px) {
    .music-control {
        top: 15px;
        right: 15px;
    }
    
    .music-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
    
    .lightbox-counter {
        bottom: 10px;
    }
}

/* Print styles */
@media print {
    .floating-nav, .music-control {
        display: none;
    }
    
    body {
        background: white;
    }
    
    section {
        page-break-inside: avoid;
        padding: 30px 0;
    }
}
