/* 设置页面为 9:16 的比例 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 容器设置为 9:16 的比例 */
.container {
    width: 90vw;
    max-width: 360px; /* 9:16 的比例，宽度为 360px，高度为 640px */
    height: 160vw;
    max-height: 640px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow-y: auto; /* 允许垂直滚动 */
    position: relative;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="text"], input[type="file"], input[type="date"], textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3;
}

/* 证书样式 */
.certificate {
    margin-top: 20px;
    padding: 20px;
    border: 2px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
    display: none;
    position: relative;
    width: 100%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.certificate-inner {
    position: relative;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.certificate-header {
    text-align: center;
    margin-bottom: 20px;
}

.certificate-header h2 {
    font-size: 24px;
    margin: 0;
    color: #333;
}

.certificate-header p {
    font-size: 14px;
    color: #666;
}

.certificate-body {
    text-align: center;
}

#certificate-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid #ccc;
}

#certificate-name, #certificate-age, #certificate-gender {
    font-size: 16px;
    color: #333;
    margin: 5px 0;
}

.certificate-description {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
}

#certificate-number-display, #certificate-date, #certificate-validity {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.slogan {
    font-size: 16px;
    color: #ff6b6b;
    font-weight: bold;
    margin-top: 20px;
}

.certificate-footer {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stamp {
    width: 120px;
    height: 120px;
    border: 3px solid rgba(255, 107, 107, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    position: relative;
}

.stamp-circle {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stamp-text {
    position: absolute;
    font-size: 18px;
    font-weight: bold;
    color: rgba(255, 107, 107, 0.8);
    transform-origin: 50% 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(var(--rotate)) translateY(-50px);
}

.stamp-star {
    font-size: 48px;
    color: rgba(255, 107, 107, 0.8);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 裁剪模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    text-align: center;
}

.close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

.image-container {
    width: 100%;
    height: 300px;
    margin-bottom: 20px;
}

#crop-image {
    max-width: 100%;
    max-height: 100%;
}