* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    background-color: #f5f5f5;
    font-family: 'SourceHanSansCN-Normal-short-pozhehao', -apple-system, system-ui, BlinkMacSystemFont, sans-serif;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.xiansuo-page {
    width: 100%;
    min-height: 100vh;
    padding-bottom: 1.6rem;
    padding-top: 0.16rem;
    background-color: #f5f5f5;
}

.xiansuo-form {
    padding: 0.16rem 0.32rem;
}

.form-section {
    background-color: #fff;
    border-radius: 0.16rem;
    padding: 0 0.32rem 0.24rem;
    margin-bottom: 0.16rem;
}

.section-header {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0.24rem 0 0.16rem;
    font-size: 0.3rem;
    color: #333;
    font-weight: 500;
}

.form-section .input-group:first-of-type {
    margin-top: 0;
}

.input-group:last-child {
    border-bottom: none;
}

.section-title {
    flex: none;
}

.required {
    color: #e74c3c;
    margin-left: 0.04rem;
}

.textarea-wrapper {
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 0.12rem;
    overflow: hidden;
}

.desc-textarea {
    width: 100%;
    min-height: 5rem;
    padding: 0.24rem;
    border: none;
    outline: none;
    font-size: 0.28rem;
    line-height: 1.6;
    color: #333;
    resize: none;
    background-color: transparent;
    font-family: inherit;
}

.desc-textarea::placeholder {
    color: #999;
}

.word-count {
    position: absolute;
    right: 0.24rem;
    bottom: 0.16rem;
    font-size: 0.24rem;
    color: #999;
}

.upload-tip {
    font-size: 0.24rem;
    color: #999;
    line-height: 1.5;
    margin-bottom: 0.16rem;
}

.upload-area {
    display: flex;
    flex-wrap: wrap;
    gap: 0.16rem;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.16rem;
}

.preview-item {
    position: relative;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 0.12rem;
    overflow: hidden;
    background-color: #f5f5f5;
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .video-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .video-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0.56rem;
    height: 0.56rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-item .video-play-icon::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0.12rem 0 0.12rem 0.2rem;
    border-color: transparent transparent transparent #fff;
    margin-left: 0.04rem;
}

.video-player-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player-container {
    width: 100%;
    max-width: 100%;
    padding: 0 0.32rem;
}

.video-player-container video {
    width: 100%;
    max-height: 70vh;
    border-radius: 0.12rem;
    background-color: #000;
}

.delete-btn {
    position: absolute;
    top: 0.04rem;
    right: 0.04rem;
    width: 0.36rem;
    height: 0.36rem;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 0.28rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.upload-status {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.upload-status-spinner {
    width: 0.36rem;
    height: 0.36rem;
    border: 0.04rem solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.upload-status-success {
    width: 0.4rem;
    height: 0.4rem;
    background-color: #52c41a;
    color: #fff;
    border-radius: 50%;
    font-size: 0.24rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-status-fail {
    width: 0.4rem;
    height: 0.4rem;
    background-color: #ff4d4f;
    color: #fff;
    border-radius: 50%;
    font-size: 0.24rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-btn {
    width: 1.6rem;
    height: 1.6rem;
    border: 1px dashed #ccc;
    border-radius: 0.12rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: #fafafa;
    transition: all 0.2s;
}

.upload-btn:hover {
    border-color: #c81623;
    background-color: #fef5f5;
}

.upload-icon {
    width: 0.48rem;
    height: 0.48rem;
    margin-bottom: 0.08rem;
}

.upload-text {
    font-size: 0.22rem;
    color: #666;
}

.input-group {
    margin-bottom: 0.16rem;
    display: flex;
    align-items: center;
    padding: 0 0 0.12rem;
    border-bottom: 1px solid #e0e0e0;
}

.input-group:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.input-label {
    display: flex;
    align-items: center;
    font-size: 0.28rem;
    color: #333;
    font-weight: 400;
    min-width: 1.2rem;
}

.label-text {
    margin-right: 0.08rem;
    white-space: nowrap;
}

.form-input {
    flex: 1;
    height: 0.8rem;
    padding: 0 0.16rem;
    border: none;
    outline: none;
    background-color: transparent;
    font-family: inherit;
    font-size: 0.28rem;
    color: #333;
}

.form-input:focus {
    border-bottom-color: #c81623;
}

.form-input::placeholder {
    color: #999;
}

.statement-section {
    background-color: transparent !important;
    padding: 0.24rem 0.32rem !important;
    margin-bottom: 0;
}

.statement-section .section-header {
    padding: 0;
    margin: 0 0 0.16rem;
}

.statement-section .section-title {
    color: #999;
    font-weight: 400;
    font-size: 0.26rem;
}

.statement-content {
    font-size: 0.22rem;
    color: #bbb;
    line-height: 1.8;
    margin-bottom: 0.24rem;
}

.statement-content p {
    margin-top: 0.16rem;
    margin-bottom: 0.08rem;
    color: #999;
    font-weight: 400;
    font-size: 0.24rem;
}

.statement-content ol {
    padding-left: 0.36rem;
    margin-bottom: 0.04rem;
}

.statement-content li {
    margin-bottom: 0.08rem;
    color: #bbb;
    line-height: 1.8;
    font-size: 0.22rem;
}

.checkbox-wrapper {
    padding-top: 0.16rem;
    display: flex;
    justify-content: center;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.custom-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 0.3rem;
    height: 0.3rem;
    min-width: 0.3rem;
    border: 1px solid #d0d0d0;
    border-radius: 0.04rem;
    background-color: #fff;
    margin-right: 0.12rem;
    position: relative;
    transition: all 0.2s;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: #c81623;
    border-color: #c81623;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 0.09rem;
    top: 0.04rem;
    width: 0.08rem;
    height: 0.14rem;
    border: solid white;
    border-width: 0 0.02rem 0.02rem 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 0.24rem;
    color: #999;
    line-height: 1;
}

.statement-section.highlight-statement {
    animation: highlightPulse 1.5s ease;
}

@keyframes highlightPulse {
    0% { background-color: transparent; }
    30% { background-color: rgba(200, 22, 35, 0.06); }
    100% { background-color: transparent; }
}

.submit-btn {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: calc(100% - 0.64rem);
    height: 0.88rem;
    background-color: #c81623;
    color: #fff;
    font-size: 0.32rem;
    font-weight: 500;
    border: none;
    outline: none;
    cursor: pointer;
    z-index: 99;
    margin-bottom: calc(0.32rem + env(safe-area-inset-bottom));
    border-radius: 0.12rem;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #a0131b;
}

.submit-btn:active {
    background-color: #8a1017;
}

.submit-btn.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.toast {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 0.32rem 0.48rem;
    border-radius: 0.12rem;
    font-size: 0.28rem;
    z-index: 9999;
    max-width: 80%;
    text-align: center;
    line-height: 1.4;
    animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

.loading-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.loading-spinner {
    width: 0.64rem;
    height: 0.64rem;
    border: 0.06rem solid #e0e0e0;
    border-top-color: #c81623;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-mask {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-mask.hidden {
    display: none;
}

.login-mask-icon {
    width: 1.2rem;
    height: 1.2rem;
    background: url('../images/logoNew.png') no-repeat center;
    background-size: cover;
    margin-bottom: 0.4rem;
    border-radius: 0.24rem;
}

.login-mask-text {
    font-size: 0.3rem;
    color: #666;
    margin-bottom: 0.48rem;
    text-align: center;
    line-height: 1.6;
}

.login-mask-btn {
    width: 4rem;
    height: 0.88rem;
    background-color: #c81623;
    color: #fff;
    font-size: 0.3rem;
    font-weight: 500;
    border: none;
    border-radius: 0.44rem;
    cursor: pointer;
    transition: background-color 0.2s;
    outline: none;
    -webkit-appearance: none;
}

.login-mask-btn:active {
    background-color: #8a1017;
}
