/* 相机样式 */
.camera-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* 拍照前的相机样式 */
.camera-before-shot {
    background: url('../images/pailide-1.png') no-repeat center center;
    background-size: contain;
    width: 100%;
    height: 520px;
    position: relative;
}

/* 拍照后的相机样式 */
.camera-after-shot {
    background: url('../images/pailidexiangji.png') no-repeat center center;
    background-size: contain;
    width: 100%;
    height: 520px;
    position: relative;
}

/* 相机按钮基础样式 */
.camera-btn {
    position: absolute;
    left: 25.5%; 
    bottom: 51.3%; 
    width: 38px;
    height: 38px;
    background-color: transparent;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

/* 确保拍照后状态的按钮位置正确 */
.camera-after-shot .camera-btn {
    left: 26.7%; 
    bottom: 54.4%; 
}

/* 照片输出区域样式 */
.camera-photo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -7.2%; 
    width: 50%; 
    height: 46.2%; 
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.5s ease-out;
}

/* 成功生成图片后的照片位置 */
.photo-generated .camera-photo {
    bottom: -7.7%; 
}

.camera-photo img {
    width: 80%;
    height: 100%;
    object-fit: contain;
}

.photo-placeholder {
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .camera-before-shot,
    .camera-after-shot {
        height: 450px;
    }
    
    /* 移除照片输出区域位置变化的代码，确保位置固定 */
}

/* 照片显示动画 */
@keyframes slideOut {
    0% { 
        transform: translateY(-50px) translateX(-50%); 
        opacity: 0; 
    }
    100% { 
        transform: translateY(0) translateX(-50%); 
        opacity: 1; 
    }
}

.photo-animation {
    animation: slideOut 0.8s ease-out forwards;
}

/* 相机切换动画 */
.fade-transition {
    transition: opacity 0.3s ease-in-out;
}

.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}

/* 整体布局调整 */
main {
    padding-bottom: 120px;
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover {
    color: #333;
}

/* 标签页样式 */
.modal-tabs {
    display: flex;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #6b7280;
    position: relative;
}

.tab-btn.active {
    color: #3b82f6;
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3b82f6;
}

/* 表单样式 */
form input {
    transition: all 0.2s ease;
}

form input:focus {
    border-color: #3b82f6;
}

/* 用户信息显示 */
#userStatus {
    margin-top: 16px;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

#userInfoDisplay {
    background-color: rgba(59, 130, 246, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
}

/* 按钮悬停效果 */
button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}
