@font-face {
    font-family: 'SF_HambakSnow';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2106@1.1/SF_HambakSnow.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Gyeonggi_Batang_Regular';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/2410-3@1.0/Batang_Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

body {
    font-family: 'Gyeonggi_Batang_Regular', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0a1f44;
    color: #ffffff;
    overflow-x: hidden;
}

#snowCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 5s infinite;
}

header {
    background-color: rgba(57, 156, 95, 0.5); /* 단색 반투명 배경 */
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 1s ease-in-out;
}

header h1 {
    font-family: 'SF_HambakSnow', cursive;
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

main {
    padding: 20px;
    position: relative;
    z-index: 2;
}

#gallery {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin: 20px auto;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    backdrop-filter: blur(5px);
}

.person-selector {
    overflow-x: auto;
    white-space: nowrap;
    padding: 20px 0;
}

.person-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.person {
    width: 200px;
    height: 300px;
    position: relative;
    background-color: rgba(255, 239, 186, 0.7);
    border: 2px solid #ffd700;
    border-radius: 10px;
    margin: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    animation: cardAppear 0.5s ease-out;
}

.person-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    transition: transform 0.3s;
}

.person:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.person:hover .person-text {
    transform: translateY(-5px);
}

footer {
    text-align: center;
    background-color: #333;
    color: #fff;
    padding: 20px;
    margin-top: 20px;
    border-top: 5px solid #ff4500;
    position: relative;
    z-index: 2;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    background-image: url('gift_pattern.png');
    background-size: cover;
    animation: fadeIn 0.5s;
}
.overlay-content {
    background-color: #fffad5;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 5px solid #ff4500;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    position: relative;
    animation: popIn 0.5s;
}

.overlay-content h2 {
    color: #b22222;
    margin-bottom: 20px;
}

#bucketListForm, #keywordForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

#bucketListForm input, #keywordForm input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#bucketListForm button, #keywordForm button, #closeOverlay {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#bucketListForm button:hover, #keywordForm button:hover, #closeOverlay:hover {
    background-color: #45a049;
}

#closeOverlay {
    margin-top: 10px;
    background-color: #f44336;
}

#closeOverlay:hover {
    background-color: #d32f2f;
}

#keywordList {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.keyword {
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
}

.input-group {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    width: 100%;
}

#authorName {
    flex-basis: 20%;
    min-width: 20%;
}

#bucketItem {
    flex-basis: 78.5%;
    min-width: 78.5%;
}

.input-group input {
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes colorChange {
    0% { background: linear-gradient(90deg, #b22222, #ff4500); }
    50% { background: linear-gradient(90deg, #ff4500, #ffa500); }
    100% { background: linear-gradient(90deg, #ffa500, #b22222); }
}

@keyframes cardAppear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#bucketListContainer, #keywordContainer {
    background-color: rgba(255, 255, 255, 0.8); /* 반투명 흰색 배경 */
    border-radius: 10px;
    padding: 20px;
    margin: 10px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#bucketListContainer h3, #keywordContainer h3 {
    color: #b22222; /* 제목 색상 */
    margin-bottom: 10px;
}

#bucketListItems {
    list-style-type: none; /* 기본 리스트 스타일 제거 */
    padding: 0;
}

#bucketListItems li {
    background-color: rgba(255, 239, 186, 0.7); /* 부드러운 배경색 */
    border: 1px solid #ffd700; /* 황금색 테두리 */
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 5px;
    transition: background-color 0.3s;
}

#bucketListItems li:hover {
    background-color: rgba(255, 239, 186, 1); /* 호버 시 배경색 변경 */
}

#keywordList {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.keyword {
    background-color: #f0f0f0; /* 키워드 배경색 */
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#bucketListContainer h3 {
    color: #b22222; /* 제목 색상: 붉은색 */
}

#bucketListItems li {
    color: #333; /* 리스트 항목 텍스트 색상: 어두운 회색 */
}

#keywordContainer h3 {
    color: #4CAF50; /* 키워드 제목 색상: 초록색 */
}

.keyword {
    color: #fff; /* 키워드 텍스트 색상: 흰색 */
}

/* 추가적인 스타일로 키워드 배경색 변경 */
.keyword {
    background-color: #007BFF; /* 키워드 배경색: 파란색 */
}

#storyContainer {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 20px;
    margin: 10px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#storyContainer h3 {
    color: #8B4513; /* 제목 색상: 갈색 */
    margin-bottom: 10px;
}

#storyContent {
    color: #2F4F4F; /* 이야기 텍스트 색상: 짙은 청록색 */
    line-height: 1.6;
    font-style: italic;
}