@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: #000; 
}

/* 🌊 1. 수족관 배경 (전체 화면 고정) */
#aquarium-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #1e5799 url('aquarium_background.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, #6dd5ed 0%, #2193b0 100%);
    display: flex; justify-content: center; align-items: center; 
    z-index: 9999; overflow: hidden;
}

.entry-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 40px 60px; border-radius: 40px; border: 6px solid #ff85a2;
    text-align: center; box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    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: #ff85a2; margin: 10px 0 30px 0;
    text-shadow: 2px 2px 0px white;
}

.btn-start {
    padding: 15px 40px; font-size: 2.2rem; background: #ff85a2; color: white;
    border: none; border-radius: 50px; cursor: pointer; font-family: 'Gaegu';
    box-shadow: 0 8px 0 #d6336c; transition: 0.1s;
}
.btn-start:active { transform: translateY(5px); box-shadow: 0 3px 0 #d6336c; }

/* 🎀 3. UI 버튼 디자인 (좌측 상단 패널) */
.ui-panel {
    position: absolute; top: 20px; left: 20px; z-index: 100;
    background: rgba(255, 255, 255, 0.85); padding: 20px; 
    border-radius: 25px; border: 3px solid #ff85a2; width: 320px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: opacity 0.5s ease; /* 0.5초 동안 부드럽게 사라지고 나타남 */
}

.ui-header { font-size: 1.8rem; color: #ff85a2; text-align: center; margin-bottom: 15px; font-weight: bold; }

.btn-main {
    width: 100%; padding: 12px; font-size: 1.4rem; border: none; border-radius: 15px;
    cursor: pointer; font-family: 'Gaegu'; margin-bottom: 10px; font-weight: bold; transition: 0.2s;
}
.camera-btn { background: #ffeb3b; box-shadow: 0 4px 0 #fbc02d; color: #444; }
.upload-btn { background: #a2d2ff; box-shadow: 0 4px 0 #70a1ff; color: #444; }

.btn-row { display: flex; gap: 8px; margin-bottom: 12px; }
.btn-circle {
    flex: 1; padding: 10px 5px; font-size: 1.1rem; background: white; border: 1px solid #ddd;
    border-radius: 12px; cursor: pointer; font-family: 'Gaegu'; box-shadow: 0 3px 0 #eee;
}

.btn-exit {
    width: 100%; padding: 10px; background: #ff85a2; color: white; border: none;
    border-radius: 12px; font-family: 'Gaegu'; font-size: 1.2rem; 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 #ff85a2; border-radius: 50%; }
.btn-close-cam { background: #ff85a2; color: white; border: none; padding: 8px 15px; border-radius: 10px; font-family: 'Gaegu'; }

/* 🫧 5. 로딩 알림창 */
.custom-alert {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: white; padding: 25px; border-radius: 25px; border: 4px solid #4facfe;
    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); }
}