/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html{
    font-size: 100px;
     overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #4DBDBA;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    padding: 0.2rem;
    margin: 0 auto;
    background-color: #4DBDBA;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* 标题样式 */
h1 {
    text-align: center;
    margin-bottom: 0.3rem;
    color: #333;
    font-size: 0.24rem;
}

h2 {
    text-align: center;
    margin-bottom: 0.2rem;
    color: #333;
    font-size: 0.2rem;
}

h3 {
    margin-top: 0.3rem;
    /*margin-bottom: 0.06rem;*/
    color: #333;
    font-size: 0.18rem;
}

/*logo*/
.logo{
    width: 3.2rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.logo img{
    width: 100%;
    height: 100%;
}
/*上传按钮*/
.upload-btn{
    width: 1.6rem;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}
.upload-btn img{
    width: 100%;
    height: 100%;
}

/* 裁剪模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 1);
    z-index: 1000;
    overflow-y: auto;
    border-radius: 0;
}

.modal-content {
    padding: 0.2rem;
    border-radius: 0.1rem;
    width: 100%;
    height: 100%;
    max-width: 5rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.crop-container {
    width: 100%;
    overflow: hidden;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100% - 0.4rem);
}

#cropImage {
    max-width: 100%;
    height: auto;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: .4rem;
    height: 0.4rem;
}

.modal-buttons button {
    flex: 1;
    display: block;
    padding: 0.12rem;
    border: none;
    border-radius: 0.05rem;
    font-size: 0.16rem;
    cursor: pointer;
}

#cancelCrop {
    color: white;
    background-color: transparent;
}


#confirmCrop {
    color: white;
    background-color: transparent;
}

/* 海报弹窗样式 */
.poster-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 0.2rem;
    box-sizing: border-box;
    overflow: hidden;
}

.poster-modal-content {
    background: white;
    border-radius: 0.1rem;
    padding: 0.2rem;
    width: 95%;
    height: 95%;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.poster-close {
    position: absolute;
    top: 0.1rem;
    right: 0.15rem;
    font-size: 0.24rem;
    cursor: pointer;
    color: #666;
    z-index: 10000;
    line-height: 1;
}

.poster-modal h3 {
    margin-top: 0;
    color: #333;
    font-size: 0.18rem;
}

.poster-tip {
    color: #666;
    margin-bottom: 0.15rem;
    font-size: 0.14rem;
}


#posterImage {
    max-width: 90%;
}

.poster-buttons {
    margin-top: 0.15rem;
}

.poster-close-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.1rem 0.2rem;
    border-radius: 0.05rem;
    cursor: pointer;
    font-size: 0.16rem;
}

.poster-close-btn:hover {
    background: #0056b3;
}

/* 海报加载动画样式 */
.poster-loading {
    text-align: center;
    padding: 0.3rem 0;
}

.loading-spinner {
    width: 0.4rem;
    height: 0.4rem;
    border: 0.03rem solid #f3f3f3;
    border-top: 0.03rem solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.15rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.poster-loading p {
    color: #666;
    font-size: 0.14rem;
    margin: 0;
}
/*底图元素*/
.element-map{
    width: 8rem;
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.element-map img{
    width: 100%;
    height: 100%;
}
.element-t{
    position: absolute;
    top: 0;
    left: 0;
    animation: flyInFromTop 1s ease forwards;
    animation-delay: .5s;
    transform: translateY(-100%);
}
@keyframes flyInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.element-t img{
    width: 100%;
    height: 100%;
    display: block;
}
.element-b{
    position: absolute;
    bottom: 0;
    left: 0;
    animation: flyInFromBottom 1s ease forwards;
    animation-delay: .5s;
    transform: translateY(100%);

}
@keyframes flyInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.element-b img{
    width: 100%;
    height: 100%;
    display: block;
}

/* 响应式设计调整 */
@media (max-width: 6rem) {
    .container {
        padding: 0.15rem;
    }
    
    h1 {
        font-size: 0.22rem;
        margin-bottom: 0.2rem;
    }
    
    .upload-area {
        padding: 0.3rem 0.15rem;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .crop-container {
        height: 2.5rem;
    }
    
    .preview-container {
        grid-template-columns: repeat(auto-fill, minmax(1.2rem, 1fr));
        gap: 0.1rem;
    }
    
    .preview-item img {
        height: 1.2rem;
    }
}