/* 页面容器 */
.risk-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 标题 */
.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #ff4d4f;
    text-align: center;
    margin-bottom: 8px;
}

/* 页面描述 */
.page-description {
    width: 100%;
    font-size: 14px;
    line-height: 1.7;
    background: #fafafa;
    border-left: 4px solid #ff4d4f;
    padding: 12px 16px;
    border-radius: 6px;
    color: #555;
    margin-bottom: 16px;
}

/* 上传区 */
.upload-section {
    margin-bottom: 12px;
}

.upload-label {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #1677ff, #4090ff);
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.upload-label:hover {
    background-color: #d0e4f7;
}

.upload-section input[type="file"] {
    display: none;
}

/* 文本框区域 */
.input-section {
    margin-bottom: 12px;
}

.input-label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.input-section textarea {
    width: 100%;
    height: 280px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}

/* 平板及以下 */
@media (max-width: 768px) {
    .risk-page {
        padding: 12px;
        min-height: 50vh;
    }
    .page-title {
        font-size: 20px;
    }
    .page-description {
        font-size: 13px;
        padding: 10px 12px;
    }
    .upload-label {
        font-size: 13px;
        padding: 8px 14px;
    }
    .input-section textarea {
        font-size: 14px;
        height: 200px;
    }
    .submit-btn {
        font-size: 16px;
        padding: 10px 32px;
    }
    .button-wrapper {
        padding: 8px 0;
    }
    .code-modal-box {
        width: 90vw;
        padding: 24px 20px;
    }
}

/* 手机 */
@media (max-width: 480px) {
    .risk-page {
        padding: 8px;
        min-height: auto;
    }
    .page-title {
        font-size: 18px;
    }
    .page-description {
        font-size: 12px;
        line-height: 1.5;
        padding: 8px 10px;
    }
    .upload-label {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    .input-section textarea {
        min-height: 120px;
        font-size: 13px;
    }
    .submit-btn {
        width: 100%;
        font-size: 16px;
    }
    .code-modal-box {
        width: 95vw;
        padding: 20px 14px;
    }
    .code-modal-box h3 { font-size: 17px; }
    .modal-btn-cancel, .modal-btn-confirm {
        flex: 1;
        padding: 10px 0;
    }
}

/* 提交按钮容器 — 固定在底部 */
.button-wrapper {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 0;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: 16px;
    z-index: 10;
}

/* 提交按钮 */
.submit-btn {
    display: inline-block;
    padding: 12px 48px;
    background: #52c41a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.25s ease;
}

.submit-btn:hover {
    background-color: #e03e3f;
}

/* ======== 使用码弹窗 ======== */
.code-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.code-modal-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.code-modal-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 32px 36px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.code-modal-box h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
}

.code-modal-desc {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.code-modal-box input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 18px;
    letter-spacing: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    text-transform: uppercase;
    text-align: center;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.code-modal-box input:focus {
    outline: none;
    border-color: #ff4d4f;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.15);
}

.code-modal-error {
    color: #ff4d4f;
    font-size: 14px;
    margin-top: 10px;
    margin-bottom: 0;
}

.code-modal-btns {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.modal-btn-cancel,
.modal-btn-confirm {
    padding: 10px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.modal-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.modal-btn-cancel:hover {
    background: #e8e8e8;
}

.modal-btn-confirm {
    background: #ff4d4f;
    color: #fff;
}

.modal-btn-confirm:hover {
    background: #e03e3f;
}

.modal-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

