@import url('https://fonts.googleapis.com/css2?family=Gaegu:wght@400;700&display=swap');

/* 기본 설정 */
* { box-sizing: border-box; }
body, html { 
    margin: 0; padding: 0; width: 100%; height: 100%; 
    overflow: hidden; font-family: 'Gaegu', cursive; 
    background-color: #e0f7fa; 
}

/* 🌳 1. 배경 (전체 화면 고정) */
#aviary-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #87ceeb url('bird.png') no-repeat center center;
    background-size: cover; 
    z-index: 1;
}

/* 🚪 2. 입장 레이어 */
#entryOverlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: radial-gradient(circle at center, #a8e063 0%, #56ab2f 100%);
    display: flex; justify-content: center; align-items: center; 
    z-index: 9999;
}

.entry-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 40px 60px; border-radius: 40px; border: 6px solid #ffcc00;
    text-align: center; box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    animation: contentPopUp 0.6s ease-out;
}

.entry-icon { font-size: 60px; margin-bottom: 10px; animation: bounce 2s infinite; }

.entry-content h1 {
    font-size: 3rem; color: #56ab2f; margin: 10px 0 30px 0;
    text-shadow: 2px 2px 0px white;
}

.btn-start {
    padding: 15px 40px; font-size: 2.2rem; background: #ffcc00; color: #5d4037;
    border: none; border-radius: 50px; cursor: pointer; font-family: 'Gaegu';
    box-shadow: 0 8px 0 #ffa000; transition: 0.1s;
}
.btn-start:active { transform: translateY(5px); box-shadow: 0 3px 0 #ffa000; }

/* 🎀 3. UI 버튼 디자인 */
.ui-panel {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background: rgba(255, 255, 255, 0.85); padding: 15px; 
    border-radius: 0 0 25px 25px; border-bottom: 3px solid #ffcc00;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    transition: opacity 0.5s ease;
}

.ui-header { font-size: 1.8rem; color: #56ab2f; font-weight: bold; }

.btn-group-horizontal { display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 10px; }

.btn-main-sm {
    padding: 10px 20px; font-size: 1.2rem; border: none; border-radius: 12px;
    cursor: pointer; font-family: 'Gaegu'; font-weight: bold; transition: 0.2s;
}
.camera-btn { background: #ffeb3b; box-shadow: 0 3px 0 #fbc02d; color: #444; }
.upload-btn { background: #c5e1a5; box-shadow: 0 3px 0 #9ccc65; color: #444; }

.btn-circle-sm {
    padding: 8px 12px; font-size: 1rem; background: white; border: 1px solid #ddd;
    border-radius: 10px; cursor: pointer; font-family: 'Gaegu';
}

.btn-exit-sm {
    padding: 8px 15px; background: #ffcc00; color: #5d4037; border: none;
    border-radius: 10px; font-family: 'Gaegu'; font-size: 1.1rem; cursor: pointer;
}

/* 📸 4. 카메라 및 로딩 */
.camera-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.9); display: none; justify-content: center; align-items: center; z-index: 2000;
}
.camera-content { position: relative; width: 90%; max-width: 500px; border: 6px solid white; border-radius: 25px; overflow: hidden; }
#video { width: 100%; height: auto; display: block; }
.camera-ui { position: absolute; bottom: 20px; width: 100%; display: flex; justify-content: center; gap: 30px; }
.btn-capture { width: 65px; height: 65px; background: white; border: 5px solid #ffcc00; border-radius: 50%; }

.custom-alert {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: white; padding: 25px; border-radius: 25px; border: 4px solid #56ab2f;
    display: none; flex-direction: column; align-items: center; z-index: 3000;
}
.custom-alert.show { display: flex; }

@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes contentPopUp { from { opacity: 0; transform: scale(0.8) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }