/* ===================== HTML5 自适应全局公共样式 | 移动端优先 ===================== */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    font-size: 16px;
}
/* 小屏自动基准字体缩放 */
@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
}
body{
    background-color: #f8f4f6;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
    padding: 0.9375rem 0.75rem;
    min-height: 100vh;
}
a{
    text-decoration: none;
    color: #e03b7b;
}
a:hover{
    text-decoration: underline;
}

/* 卡片容器：自适应，最大宽度限制，居中 */
.box{
    width: 100%;
    max-width: 38.75rem;
    margin: 0 auto;
    background: #ffffff;
    padding: 1.875rem 1.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 6px 24px rgba(224, 59, 123, 0.08);
}
.box h3{
    text-align: center;
    color: #e03b7b;
    margin-bottom: 1.75rem;
    font-size: 1.375rem;
    font-weight: 600;
}

/* 表单项 */
.item{
    margin-bottom: 1.25rem;
}
.item label{
    display: block;
    margin-bottom: 0.5rem;
    color: #444;
    font-weight: 500;
    font-size: 0.9375rem;
}
.item input,
.item select,
.item textarea{
    width: 100%;
    padding: 0.8125rem 0.875rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.75rem;
    font-size: 1rem;
    background: #fff;
    transition: 0.2s ease;
}
.item input:focus,
.item select:focus,
.item textarea:focus{
    outline: none;
    border-color: #e03b7b;
    box-shadow: 0 0 0 0.1875rem rgba(224, 59, 123, 0.12);
}
textarea{
    resize: vertical; /* 只允许上下拉伸，不横向拉宽溢出 */
}

/* 提交按钮 */
.btn-submit{
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 0.75rem;
    background: #e03b7b;
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 500;
    margin-top: 0.625rem;
    cursor: pointer;
    transition: 0.25s ease;
}
.btn-submit:hover{
    background: #c82f68;
}
.btn-submit:active{
    opacity: 0.92;
}

/* 头像区域自适应 */
.avatar-center{
    text-align: center;
    margin-bottom:1.625rem;
}
.avatar-center img{
    width: 8.75rem;
    height: 8.75rem;
    border-radius:50%;
    object-fit:cover;
    border:3px solid #ffe6ef;
    max-width: 100%; /* 防止超大图片撑破屏幕 */
}
.avatar-empty{
    width: 8.75rem;
    height: 8.75rem;
    border-radius:50%;
    background:#f3f3f3;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#999;
    font-size:0.875rem;
}

/* 返回链接 */
.back-link{
    text-align:center;
    margin-top:1.5rem;
    font-size:0.9375rem;
}

/* 图片通用自适应（相册、动态图片都能用） */
.img-auto{
    max-width: 100%;
    height: auto;
    display:block;
    border-radius:0.75rem;
}

/* 简单网格，以后相册列表可以直接用这个类 */
.flex-row{
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.flex-col{
    flex: 1 1 12rem;
}

/* ========== 新增合并：弹窗、灯箱、辅助按钮、空提示（来自album.html提取通用部分） ========== */
.modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.65);
    z-index:9998;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
}
.modal.show{
    display:flex;
}
.modal-box{
    width:400px;
    background:#fff;
    border-radius:12px;
    padding:24px;
}
.modal-box h4{
    margin-bottom:18px;
    font-size:18px;
    color:#333;
}
.modal-row{
    margin-bottom:14px;
}
.modal-row label{
    display:block;
    margin-bottom:6px;
    color:#444;
}
.modal-row select,.modal-row input{
    width:100%;
    padding:8px;
    border:1px solid #ddd;
    border-radius:6px;
}
.modal-buttons{
    display:flex;
    gap:10px;
    margin-top:20px;
    justify-content:flex-end;
}
.modal-buttons button{
    padding:8px 16px;
    border-radius:6px;
    border:none;
    cursor:pointer;
}
.btn-close{
    background:#aaa;
    color:#fff;
}
.lightbox{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.85);
    z-index:9999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
}
.lightbox.show{
    display:flex;
}
.lightbox img{
    max-width:100%;
    max-height:100%;
    border-radius:8px;
}
.lightbox-close{
    position:absolute;
    top:16px;
    right:20px;
    color:#fff;
    font-size:32px;
    cursor:pointer;
}
.empty-tip{
    text-align:center;
    padding:40px;
    color:#888;
    background:#fff;
    border-radius:12px;
    box-shadow:0 4px 18px rgba(0,0,0,0.08);
}
.btn-gray{
    background:#888;
    color:#fff;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
    border:none;
    cursor:pointer;
    padding:7px 12px;
}
.btn-blue{
    background:#3388ee;
    color:#fff;
    border-radius:4px;
    text-decoration:none;
    font-size:12px;
    border:none;
    cursor:pointer;
    padding:2px 6px;
}
.btn-red{
    background:#f44336;
    color:#fff;
    border-radius:4px;
    text-decoration:none;
    font-size:12px;
    border:none;
    cursor:pointer;
    padding:2px 6px;
}
@media(max-width:480px){
    .modal-box{
        width:92%;
    }
}
