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

body {
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #f5f6fa;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

main {
    display: flex;
    min-height: 100vh;
}

.input-section {
    flex: 0 0 380px;
    padding: 30px;
    background: #fafbfc;
    border-right: 1px solid #e8ecf0;
}

.preview-section {
    flex: 1;
    padding: 40px 50px;
    background: white;
    overflow-y: auto;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.preview-header h2 {
    margin-bottom: 0;
}

.preview-actions {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 8px 18px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-action:hover:not(:disabled) {
    background: #219a52;
}

.btn-action:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

h2 {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-size: 0.9em;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dce1e6;
    border-radius: 6px;
    font-size: 0.95em;
    transition: border 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

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

.btn-generate {
    width: 100%;
    padding: 12px;
    background: #4a90d9;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 10px;
}

.btn-generate:hover {
    background: #3a7bc8;
}

.btn-generate:active {
    transform: scale(0.98);
}

.btn-generate:disabled {
    background: #b0c4de;
    cursor: not-allowed;
}

.resume-preview {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.placeholder-text {
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-size: 1.1em;
}

.resume-preview h1 {
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 700;
    border-bottom: 3px solid #4a90d9;
    padding-bottom: 10px;
}

.resume-preview .title {
    font-size: 1.2em;
    color: #4a90d9;
    margin-bottom: 25px;
    font-weight: 500;
}

.resume-preview .section {
    margin-bottom: 28px;
    page-break-inside: avoid;
}

.resume-preview .section h2 {
    font-size: 1.3em;
    color: #2c3e50;
    border-bottom: 2px solid #e8ecf0;
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resume-preview .item {
    margin-bottom: 18px;
    padding-left: 0;
}

.resume-preview .item h3 {
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 4px;
    font-weight: 600;
}

.resume-preview .meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
    font-style: italic;
}

.resume-preview .description {
    color: #555;
    line-height: 1.7;
    text-align: justify;
}

.resume-preview .skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resume-preview .skill-tag {
    background: #f0f4f8;
    color: #4a90d9;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid #dce1e6;
}

@media print {
    .input-section,
    .preview-header,
    .preview-actions {
        display: none !important;
    }
    .preview-section {
        padding: 0 !important;
    }
    .resume-preview {
        border: none !important;
    }
}

@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    .input-section {
        flex: 1;
        border-right: none;
        border-bottom: 1px solid #e8ecf0;
    }
    .preview-section {
        padding: 20px;
    }
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
