/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.logo p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 15px;
}

.subtitle p {
    font-size: 1rem;
    color: #888;
    font-style: italic;
}

/* 主要内容区域 */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    border-radius: 20px 20px 0 0;
}

/* 步骤区域 */
.step-section {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.step-section.active {
    display: block;
}

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

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.step-header p {
    font-size: 1.1rem;
    color: #666;
}

/* 职业分类样式 */
.career-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.career-category {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.career-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
}

.career-category.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.category-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.career-list {
    list-style: none;
}

.career-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.95rem;
    opacity: 0.9;
}

.career-list li:last-child {
    border-bottom: none;
}

/* 职级选择样式 */
.selected-career-info, .selected-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 10px;
    font-weight: 500;
    color: #333;
}

.career-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.career-level {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.career-level:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.career-level.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.level-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.level-order {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 工作描述样式 */
.work-description-form {
    margin-bottom: 40px;
}

.work-description-form textarea {
    width: 100%;
    padding: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease;
}

.work-description-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.char-count {
    text-align: right;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* 按钮样式 */
.navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e8ed;
}

.btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-warning {
    background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 165, 2, 0.3);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 165, 2, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #2ed573 0%, #17a2b8 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 213, 115, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 213, 115, 0.4);
}

/* 分析结果样式 */
.result-container {
    display: grid;
    gap: 30px;
}

.score-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 20px;
    margin-bottom: 20px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
}

.score-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.risk-info {
    text-align: center;
}

.risk-level {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.risk-description {
    font-size: 1rem;
    color: #666;
    max-width: 300px;
}

/* 雷达图样式 */
.radar-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.radar-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.chart-container {
    position: relative;
    height: 450px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.chart-container canvas {
    max-width: 100%;
    max-height: 100%;
    width: 400px;
    height: 400px;
}

/* 分析报告样式 */
.analysis-report {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.analysis-report h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.analysis-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
}

/* 后续操作样式 */
.next-actions {
    margin-top: 30px;
}

.action-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.action-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.encouragement-text {
    font-size: 1.1rem;
    color: #2ed573;
    margin-bottom: 20px;
    font-weight: 500;
}

.encouragement-tips {
    text-align: left;
    margin-top: 20px;
}

.encouragement-tips h4 {
    color: #333;
    margin-bottom: 15px;
}

.encouragement-tips ul {
    list-style: none;
    padding-left: 0;
}

.encouragement-tips li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
}

.encouragement-tips li::before {
    content: '✨';
    position: absolute;
    left: 0;
    top: 8px;
}

/* MBTI测试样式 */
.test-progress {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e8ed;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.question-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.question-text {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
}

.question-options {
    display: grid;
    gap: 15px;
}

.option {
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.option-text {
    font-size: 1rem;
    font-weight: 500;
}

/* MBTI结果样式 */
.mbti-result-container {
    display: grid;
    gap: 30px;
}

.mbti-type-section {
    text-align: center;
}

.mbti-type-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    display: inline-block;
    min-width: 300px;
}

.mbti-code {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.mbti-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.mbti-description {
    font-size: 1rem;
    opacity: 0.9;
}

.personality-traits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.trait-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.trait-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.trait-section ul {
    list-style: none;
    padding: 0;
}

.trait-section li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.trait-section li:last-child {
    border-bottom: none;
}

.trait-section li::before {
    position: absolute;
    left: 0;
    top: 8px;
}

.trait-section:first-child li::before {
    content: '💪';
}

.trait-section:last-child li::before {
    content: '🎯';
}

.career-recommendations {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.career-recommendations h3 {
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.recommendation-card {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.recommendation-career {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.recommendation-score {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.recommendation-reason {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
}

.development-suggestions {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.development-suggestions h3 {
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

.suggestions-list {
    display: grid;
    gap: 15px;
}

.suggestion-item {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 15px 20px;
    color: #555;
    line-height: 1.6;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 25px;
    }
    
    .step-header h2 {
        font-size: 1.5rem;
    }
    
    .career-categories {
        grid-template-columns: 1fr;
    }
    
    .career-levels {
        grid-template-columns: 1fr;
    }
    
    .score-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .personality-traits {
        grid-template-columns: 1fr;
    }
    
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
    
    .navigation-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-value {
        font-size: 2rem;
    }
    
    .chart-container {
        height: 300px;
    }
}

/* 风险等级颜色 */
.risk-high {
    color: #ff4757;
}

.risk-medium-high {
    color: #ffa502;
}

.risk-medium-low {
    color: #3742fa;
}

.risk-low {
    color: #2ed573;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* AI增强功能样式 */
.basic-analysis, .ai-analysis, .personalized-tips {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 10px;
}

.basic-analysis {
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
}

.ai-analysis {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 4px solid #667eea;
}

.personalized-tips {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    border-left: 4px solid #ff9800;
}

.ai-analysis h4, .personalized-tips h4, .basic-analysis h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1rem;
}

.ai-enhanced-advice {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    border-radius: 12px;
    border-left: 4px solid #4caf50;
}

.ai-enhanced-advice h4 {
    margin: 0 0 15px 0;
    color: #2e7d32;
    font-size: 1.2rem;
}

.ai-advice-content {
    color: #333;
    line-height: 1.6;
    white-space: pre-line;
}

/* AI状态指示器 */
.ai-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
}

.ai-status.enhanced {
    color: #4caf50;
}

.ai-status.unavailable {
    color: #ff9800;
}

/* AI交互增强样式 */
.ai-analysis-toggle {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 15px;
    border: 2px solid #667eea;
}

.ai-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.ai-toggle-label input[type="checkbox"] {
    display: none;
}

.ai-toggle-slider {
    position: relative;
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.ai-toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.ai-toggle-label input:checked + .ai-toggle-slider {
    background: #667eea;
}

.ai-toggle-label input:checked + .ai-toggle-slider::before {
    transform: translateX(30px);
}

.ai-toggle-description {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.ai-analysis-preview {
    margin: 25px 0;
}

.ai-preview-card {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    border-radius: 15px;
    padding: 20px;
    border-left: 4px solid #ff9800;
}

.ai-preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.ai-icon {
    font-size: 1.5rem;
}

.ai-preview-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.ai-preview-content {
    display: grid;
    gap: 10px;
}

.ai-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #555;
}

.feature-icon {
    font-size: 1.2rem;
}

.ai-enhanced-btn {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    overflow: hidden;
}

.ai-enhanced-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.ai-enhanced-btn:hover::before {
    left: 100%;
}

.btn-icon {
    margin-right: 8px;
}

.btn-subtitle {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
}

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

.ai-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #2e7d32;
}

.ai-status-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.analysis-footer {
    margin-top: 20px;
    text-align: center;
}

.ai-powered-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.ai-badge-icon {
    animation: sparkle 1.5s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.mbti-ai-header {
    text-align: center;
    margin-bottom: 20px;
}

.ai-enhancement-notice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 25px;
    font-size: 0.95rem;
    color: #333;
    border: 2px solid #667eea;
}

.ai-notice-icon {
    font-size: 1.2rem;
    animation: think 3s infinite;
}

@keyframes think {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

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

.ai-analysis-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.ai-disclaimer {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #6c757d;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #666;
}

.disclaimer-icon {
    font-size: 1.1rem;
    color: #007bff;
}

/* AI加载动画 */
.ai-thinking {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-weight: 500;
}

.ai-thinking::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
