:root {
    --bg-color: #fffaf0;
    --card-bg-color: #ffffff;
    --text-color: #5d5d5d;
    --title-color: #d19a66;
    --accent-color: #f0e4d7;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --font-main: 'Noto Sans KR', sans-serif;
    --font-cursive: 'Pacifico', cursive;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    text-align: center;
    overflow-x: hidden; /* Prevent horizontal scrollbar from the background element */
}

/* New SVG Background Styles */
#background-container {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    transform: rotate(-15deg);
    pointer-events: none;
    opacity: 0.6;
}

.bg-text {
    font-family: var(--font-cursive); /* Applies Pacifico font */
    font-size: 32px;
    fill: var(--accent-color);
    font-weight: 400; /* Pacifico standard weight */
}

header {
    position: relative;
    z-index: 1;
}

header h1 {
    font-family: var(--font-cursive);
    color: var(--title-color);
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px var(--accent-color);
}

main {
    width: 100%;
    max-width: 600px;
    display: grid;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

footer {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: #aaa;
    position: relative;
    z-index: 1;
}

/* Web Component Style */
birthday-card {
    display: block;
    background: var(--card-bg-color);
    border-radius: 15px;
    box-shadow: 0 10px 20px var(--shadow-color);
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease-out forwards;
}

birthday-card:nth-child(2) {
    animation-delay: 0.3s;
}

image-slideshow {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease-out 0.6s forwards; /* Added delay */
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }
    header h1 {
        font-size: 2.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}