/* 智聘通 - 主样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1677ff;
    --primary-light: #e6f4ff;
    --primary-dark: #0958d9;
    --success: #52c41a;
    --warning: #faad14;
    --error: #ff4d4f;
    --text-primary: #262626;
    --text-secondary: #595959;
    --text-tertiary: #8c8c8c;
    --border: #d9d9d9;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 页面切换 */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 欢迎页 */
.brand-section {
    text-align: center;
    padding: 40px 20px;
}

.logo {
    font-size: 64px;
    margin-bottom: 16px;
}

.brand-section h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.subtitle {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-bottom: 32px;
}

.company-info {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.company-info h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--primary);
}

.company-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 公司品牌介绍 */
.company-brand {
    margin-bottom: 24px;
}

.company-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 16px;
}

.brand-title h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.company-intro {
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border-radius: var(--radius);
    padding: 28px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    text-align: left;
}

.intro-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.company-intro h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
}

.intro-slogan {
    text-align: center;
    color: var(--primary);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
}

.intro-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.intro-stats {
    display: flex;
    justify-content: space-around;
    margin: 24px 0;
    padding: 20px 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.intro-details {
    margin-top: 20px;
}

.intro-details h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.intro-details ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.intro-details li {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.join-section {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.join-section h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--primary);
}

.join-section p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 进度条 */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px 0;
}

.progress-bar::before {
    content: '';
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    position: absolute;
    left: 20px;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-bar span {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* 标题 */
h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 16px;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* 表单 */
.form-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.form-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--primary-light);
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-group.half {
    flex: 1;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all 0.2s;
    background: var(--card-bg);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

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

/* 单选组 */
.radio-group {
    display: flex;
    gap: 12px;
}

.radio-label {
    flex: 1;
    cursor: pointer;
}

.radio-label input {
    display: none;
}

.radio-label span {
    display: block;
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    background: var(--card-bg);
}

.radio-label input:checked + span {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* 按钮 */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 照片采集 */
.photo-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.photo-preview {
    width: 160px;
    height: 200px;
    margin: 0 auto 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    text-align: center;
    color: var(--text-tertiary);
}

.photo-placeholder span {
    font-size: 48px;
}

.photo-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.photo-actions .btn-secondary {
    flex: 0 1 auto;
    padding: 10px 20px;
}

.camera-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

/* MBTI测试 */
.mbti-intro {
    text-align: center;
    padding: 40px 20px;
}

.mbti-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.mbti-intro h2 {
    margin-bottom: 12px;
}

.mbti-intro > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.mbti-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
}

.feature {
    text-align: center;
}

.feature span {
    font-size: 32px;
}

.feature p {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.mbti-tip {
    color: var(--text-tertiary);
    font-size: 13px;
    margin-bottom: 20px;
}

.question-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.question-card h3 {
    font-size: 17px;
    margin-bottom: 20px;
    border: none;
    padding: 0;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.option-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.option-btn.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.option-label {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.option-btn.selected .option-label {
    background: var(--primary);
    color: white;
}

.option-text {
    font-size: 15px;
    color: var(--text-primary);
}

/* MBTI结果 */
.result-header {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--card-bg) 100%);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.mbti-type {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    margin: 16px 0 8px;
}

.type-name {
    font-size: 18px;
    color: var(--text-secondary);
}

.result-detail {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.dimension-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}

.dimension-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.dimension-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.type-description p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.job-tag {
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 13px;
}

/* MBTI评分选项 */
.rating-guide {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
}

.rating-guide h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.rating-scale {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-num {
    width: 28px;
    height: 28px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.rating-item:nth-child(1) .rating-num { border-color: var(--error); color: var(--error); }
.rating-item:nth-child(2) .rating-num { border-color: #fa8c16; color: #fa8c16; }
.rating-item:nth-child(3) .rating-num { border-color: var(--warning); color: var(--warning); }
.rating-item:nth-child(4) .rating-num { border-color: var(--success); color: var(--success); }
.rating-item:nth-child(5) .rating-num { border-color: #52c41a; color: #52c41a; }

.rating-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.test-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.dimension-tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.credibility-score {
    font-size: 12px;
    color: var(--text-tertiary);
}

.rating-options {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 20px;
}

.rating-option {
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-option:hover {
    transform: scale(1.05);
}

.rating-circle {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    margin: 0 auto 8px;
    transition: all 0.2s;
    background: var(--card-bg);
    color: var(--text-secondary);
}

.rating-option:nth-child(1) .rating-circle { border-color: #ff4d4f; }
.rating-option:nth-child(2) .rating-circle { border-color: #fa8c16; }
.rating-option:nth-child(3) .rating-circle { border-color: #faad14; }
.rating-option:nth-child(4) .rating-circle { border-color: #73d13d; }
.rating-option:nth-child(5) .rating-circle { border-color: #52c41a; }

.rating-option:hover .rating-circle {
    background: var(--primary-light);
}

.rating-circle.selected {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.rating-option span {
    font-size: 11px;
    color: var(--text-tertiary);
    display: block;
}

.question-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

.warning-content {
    text-align: center;
    padding: 40px 20px;
}

.warning-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.warning-content h2 {
    color: var(--warning);
    margin-bottom: 16px;
}

.warning-content ul {
    text-align: left;
    max-width: 320px;
    margin: 20px auto;
    color: var(--text-secondary);
}

.warning-content li {
    margin-bottom: 8px;
}

.warning-suggestion {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-top: 20px;
}

.credibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--success);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 16px;
}

.dimension-score {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
    text-align: center;
}

/* 简历页面 */
.resume-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.resume-actions .btn-secondary,
.resume-actions .btn-primary {
    flex: 0 1 auto;
    padding: 10px 20px;
}

.resume-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.resume-header {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--primary-light);
}

.resume-photo {
    width: 100px;
    height: 130px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.resume-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resume-photo span {
    font-size: 48px;
}

.resume-title h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.resume-id,
.resume-position {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.resume-position {
    color: var(--primary);
    font-weight: 500;
}

.resume-section {
    margin-bottom: 24px;
}

.resume-section h3 {
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item.full {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
}

.experience-text {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 14px;
}

.mbti-section {
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.mbti-result-inline {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.mbti-badge {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.mbti-info p {
    margin: 0;
}

.mbti-type-name {
    font-weight: 600;
    color: var(--text-primary);
}

.mbti-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.suitable-jobs-inline {
    font-size: 13px;
}

.suitable-jobs-inline .label {
    color: var(--text-tertiary);
}

.resume-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 12px;
}

.resume-date {
    margin-top: 4px;
}

/* 打印样式 */
@media print {
    body {
        background: white;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .resume-actions {
        display: none;
    }
    
    .resume-card {
        box-shadow: none;
    }
}

/* 工作经历样式 */
.work-experience-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    border: 1px solid #e8e8e8;
}

.work-experience-item .remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
}

.work-experience-item .form-group {
    margin-bottom: 12px;
}

.work-experience-item .form-group:last-child {
    margin-bottom: 0;
}

.work-experience-item input,
.work-experience-item textarea {
    background: white;
}

/* 响应式 */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .brand-section {
        padding: 24px 16px;
    }
    
    .mbti-features {
        gap: 16px;
    }
    
    .resume-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}
