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

body {
    font-family: "Times New Roman", "Georgia", serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 30px 20px;
}

.container {
    max-width: 850px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 50px 60px;
}

h1 {
    text-align: center;
    color: #000;
    margin-bottom: 40px;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 8px;
    border-bottom: 3px double #000;
    padding-bottom: 20px;
}

/* 合同内容样式 */
.contract-content {
    background: white;
    border: 1px solid #ccc;
    padding: 30px;
    margin-bottom: 40px;
    max-height: 600px;
    overflow-y: auto;
}

.contract-content h2 {
    color: #000;
    margin-bottom: 30px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

.contract-text p.clause {
    line-height: 2;
    color: #000;
    margin-bottom: 18px;
    text-align: justify;
    font-size: 14px;
}

.contract-text h3 {
    color: #000;
    font-size: 16px;
}

/* 签名区域样式 */
.signature-section {
    margin-bottom: 30px;
}

.signature-section h3 {
    color: #000;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
}

.signature-pad-container {
    border: 2px solid #000;
    padding: 15px;
    background: #fafafa;
}

#signaturePad {
    width: 100%;
    height: 180px;
    border: 1px solid #999;
    background: white;
    cursor: crosshair;
    touch-action: none;
}

.signature-buttons {
    margin-top: 10px;
    text-align: right;
}

/* 按钮样式 */
.btn {
    padding: 10px 25px;
    border: 1px solid #000;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: "Microsoft YaHei", sans-serif;
}

.btn-primary {
    background: #000;
    color: white;
    width: 100%;
    font-size: 16px;
    padding: 14px;
    border: 2px solid #000;
}

.btn-primary:hover {
    background: #333;
}

.btn-secondary {
    background: white;
    color: #000;
    border: 1px solid #666;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

.submit-section {
    margin-top: 20px;
}

/* 姓名输入框 */
.name-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #999;
    font-size: 15px;
    margin-bottom: 25px;
    font-family: "Microsoft YaHei", sans-serif;
}

.name-input:focus {
    outline: none;
    border-color: #000;
    border-width: 2px;
}

/* 签名展示区域 */
.signature-display {
    background: white;
    border: 2px solid #000;
    padding: 40px;
    margin-bottom: 30px;
}

.signature-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    font-size: 14px;
    color: #000;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.signature-info .label {
    font-weight: bold;
}

.signature-result {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 50px;
    min-height: 120px;
}

.signature-image {
    flex: 1;
    text-align: left;
}

.signature-image img {
    max-width: 250px;
    height: auto;
    border-bottom: 1px solid #000;
    background: white;
    padding-bottom: 5px;
}

.signer-name {
    margin-top: 8px;
    font-weight: normal;
    color: #000;
    font-size: 15px;
    text-align: center;
}

.stamp {
    flex-shrink: 0;
}

.stamp img {
    width: 120px;
    height: 120px;
    opacity: 0.8;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.btn-action {
    flex: 1;
    padding: 14px;
    font-size: 15px;
}

.btn-download {
    background: #000;
    color: white;
    border: 2px solid #000;
}

.btn-download:hover {
    background: #333;
}

.btn-copy {
    background: white;
    color: #000;
    border: 2px solid #000;
}

.btn-copy:hover {
    background: #f5f5f5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 30px 25px;
    }

    h1 {
        font-size: 22px;
        letter-spacing: 4px;
    }

    .contract-content {
        padding: 20px;
    }

    .signature-result {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .signature-image img {
        max-width: 200px;
    }

    .action-buttons {
        flex-direction: column;
    }
}
