/* ==================== 注册弹窗 - 简约优雅风格 ==================== */
.register-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.register-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 关闭按钮 */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f6f8;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #fee;
    color: #e53935;
    transform: rotate(90deg);
}

/* 头部 */
.reg-header {
    padding: 40px 40px 0;
    text-align: center;
}

.reg-logo {
    display: none;
}

.reg-title {
    font-size: 26px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.reg-subtitle {
    font-size: 14px;
    color: #8b8b9a;
    margin: 0;
}

/* 表单区域 */
.reg-form {
    padding: 30px 40px 40px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #4a4a5c;
    margin-bottom: 8px;
}

.form-group label span {
    color: #e53935;
    margin-left: 2px;
}

.input-wrap {
    position: relative;
}

.reg-form .form-input {
    width: 100%;
    height: 42px;
    padding: 0 16px;
    font-size: 14px;
    color: #666 !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.reg-form .form-input::placeholder {
    color: #aaa !important;
}

.reg-form .form-input:hover {
    border-color: #ccc !important;
}

.reg-form .form-input:focus {
    border-color: #4a90d9 !important;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.12);
}

.input-wrap .eye-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #b0b0bc;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.input-wrap .eye-toggle:hover {
    color: #667eea;
}

/* 验证码 */
.verify-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.verify-wrap .form-input {
    flex: 1.2;
    width: 160px;
    min-width: 140px;
    height: 44px;
    padding: 0 14px;
    font-size: 16px;
    letter-spacing: 4px;
    text-align: center;
    border: 2px solid #ddd !important;
    border-radius: 10px;
    background: #fff !important;
    color: #333 !important;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.verify-wrap .form-input:focus {
    border-color: #4a90d9 !important;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.12);
}

.verify-btn {
    flex-shrink: 0;
    min-width: 110px;
    height: 44px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%) !important;
    border: none !important;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: 0.5px;
    outline: none !important;
    box-shadow: none !important;
}

.verify-btn:active {
    transform: translateY(0);
}

.verify-btn:disabled {
    color: #999;
    background: #e0e0e0;
    cursor: not-allowed;
    box-shadow: none;
}

/* 文件上传 */
.upload-area {
    margin-bottom: 16px;
}

.upload-box {
    position: relative;
    height: 100px;
    border: 2px dashed #e4e4ed;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.upload-box:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.03);
}

.upload-box.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.upload-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    color: #b0b0bc;
    margin-bottom: 6px;
}

.upload-text {
    font-size: 13px;
    color: #666;
    margin: 0 0 2px;
}

.upload-hint {
    font-size: 11px;
    color: #b0b0bc;
    margin: 0;
}

/* 上传预览 */
.upload-preview {
    position: relative;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f6f8;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.upload-preview .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 协议 */
.agreement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
}

.agreement input[type="checkbox"] {
    display: none;
}

.agreement .check-box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1.5px solid #d0d0dc;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 2px;
}

.agreement input[type="checkbox"]:checked + .check-box {
    background: #667eea;
    border-color: #667eea;
}

.agreement input[type="checkbox"]:checked + .check-box svg {
    display: block;
}

.agreement .check-box svg {
    display: none;
    color: #fff;
}

.agreement-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.agreement-text a {
    color: #667eea;
    text-decoration: none;
}

.agreement-text a:hover {
    text-decoration: underline;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    height: 52px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(74, 144, 217, 0.35);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.45);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

/* 登录链接 */
.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #8b8b9a;
}

.login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

/* 响应式 */
@media (max-width: 540px) {
    .modal-wrapper {
        border-radius: 16px;
        max-height: 95vh;
    }
    
    .reg-header {
        padding: 30px 24px 0;
    }
    
    .reg-form {
        padding: 24px 24px 30px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .verify-wrap {
        flex-direction: column;
        gap: 12px;
    }
    
    .verify-btn {
        width: 100%;
    }
    
    .reg-logo {
        width: 56px;
        height: 56px;
    }
    
    .reg-title {
        font-size: 22px;
    }
}

/* ==================== 自定义提示框 ==================== */
.toast-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.toast-mask.active {
    display: flex;
}

.toast-box {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    min-width: 260px;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.toast-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon.success {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: #fff;
}

.toast-icon.error {
    background: linear-gradient(135deg, #e53935, #c62828);
    color: #fff;
}

.toast-icon.info {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: #fff;
}

.toast-message {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 20px;
}

.toast-btn {
    display: inline-block;
    padding: 10px 40px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #4a90d9, #357abd);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toast-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.4);
}
