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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f5e9 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* 左侧表单区域 */
.form-section {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.1);
}

.form-section h1 {
    color: #2e7d32;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #424242;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-primary {
    width: 100%;
    padding: 14px 28px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* 右侧预览区域 */
.preview-section {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.1);
    position: sticky;
    top: 20px;
}

.preview-section h2 {
    color: #2e7d32;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

.card-container {
    perspective: 1000px;
}

.bio-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: linear-gradient(145deg, #ffffff 0%, #f1f8e9 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* 确保html2canvas能正确捕获背景 */
    background-attachment: fixed;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.bio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(76, 175, 80, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.avatar-placeholder {
    margin-right: 20px;
    flex-shrink: 0;
}

.name-title h3 {
    color: #1b5e20;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.name-title p {
    color: #4CAF50;
    font-size: 16px;
    margin: 3px 0;
}

.name-title p:first-of-type {
    font-weight: 600;
}

.card-body {
    margin-bottom: 25px;
}

.card-body p {
    color: #424242;
    line-height: 1.6;
    font-size: 15px;
}

.card-footer {
    border-top: 1px solid rgba(76, 175, 80, 0.2);
    padding-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #616161;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item svg {
    margin-right: 12px;
    flex-shrink: 0;
}

.contact-item span {
    font-size: 14px;
}

.btn-download {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .preview-section {
        position: static;
    }

    .bio-card {
        max-width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section,
.preview-section {
    animation: fadeIn 0.6s ease-out;
}

.preview-section {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}