/* 基础重置和变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 自然色彩系统 */
    --primary: #10b981;
    --primary-light: #34d399;
    --primary-dark: #059669;
    --secondary: #6ee7b7;
    
    /* 背景色调 */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-accent: rgba(16, 185, 129, 0.04);
    
    /* 文字颜色 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    
    /* 功能色彩 */
    --white: #ffffff;
    --border: rgba(16, 185, 129, 0.1);
    --shadow: rgba(16, 185, 129, 0.08);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: 'Inter', 'Inter-fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 容器样式 */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.6s ease-out;
}

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

/* 首页样式 */
.home-section {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    background: transparent;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.logo-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 8px 32px var(--shadow);
}

.home-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.home-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    margin-top: 16px;
    line-height: 1.6;
}

.feature-list {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon img {
    width: 24px;
    height: 24px;
    opacity: 0.8;
}

.feature-text {
    flex: 1;
}

.feature-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.feature-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px var(--shadow);
    width: 100%;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow);
}

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

.btn-secondary {
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
}

.btn-secondary:hover {
    background: var(--bg-accent);
}

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 8px var(--shadow) !important;
}

/* 测试页面样式 */
.test-section {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.test-header {
    margin-bottom: 24px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* 维度指导卡片 */
.dimension-guide {
    background: linear-gradient(135deg, var(--bg-accent), rgba(255, 255, 255, 0.8));
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    width:100%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(10px);
}

.guide-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow);
    overflow: hidden;
}

.guide-image {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
}

.guide-content {
    flex: 1;
}

.guide-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.guide-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.question-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    width:100%;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow);
}

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

.question-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.question-sub {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
}

.switch-btn {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.switch-btn:hover {
    background: var(--bg-accent);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow);
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.answer-input {
    position: relative;
    margin-bottom: 20px;
}

.answer-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    resize: vertical;
    transition: all 0.3s ease;
}

.answer-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.answer-textarea::placeholder {
    color: var(--text-light);
    font-style: italic;
}

.char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.75rem;
    color: var(--text-light);
    padding: 2px 6px;
    border-radius: 4px;
}

/* 答题提示 */
.answer-tips {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-accent);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.tip-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.tip-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.tip-enter {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(52, 211, 153, 0.05));
    border-left-color: var(--primary-light);
}

.tip-enter .tip-text {
    color: var(--primary);
    font-weight: 500;
}

.test-controls {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-small {
    padding: 12px 24px;
    font-size: 0.9rem;
    flex: 1;
}

/* 鼓励提示 */
.encouragement {
    text-align: center;
    margin-top: 32px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(52, 211, 153, 0.05));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.encouragement-text {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
    animation: fadeIn 0.6s ease-out;
}

/* 结果页面样式 */
.result-section {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
}

.result-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.result-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 12px 40px var(--shadow);
    border: 4px solid var(--white);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.result-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-type {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.result-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.result-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.dimensions-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 32px;
    width: 100%;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow);
}

.dimensions-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 28px;
    text-align: center;
}

.dimension-item {
    margin-bottom: 24px;
}

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

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

.dimension-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dimension-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

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

.dimension-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 1s ease;
}

.dimension-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
}

.traits-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow);
}

.traits-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.traits-content {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    text-align: left;
    max-width: none;
    white-space: pre-line;
}

/* 深度分析报告样式 */
.insights-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow);
}

.insights-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 28px;
    text-align: center;
    position: relative;
}

.insights-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
}

.insight-section {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-accent);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
}

.insight-section:last-child {
    margin-bottom: 0;
}

.insight-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insight-content {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: left;
}

.growth-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(52, 211, 153, 0.05));
    border-left-color: var(--primary-light);
}

.growth-content {
    font-weight: 500;
    color: var(--text-primary);
}

.result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* 加载动画 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-secondary);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    text-align: center;
    font-weight: 600;
}

.loading-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: -10px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .logo {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    
    .home-subtitle {
        margin-top: 12px;
        margin-bottom: 24px;
        font-size: 0.9rem;
    }
    
    .logo-image {
        background: transparent;
    }
    
    .logo-image:hover {
        transform: scale(1.03);
    }
    
    .question-header {
        align-items: center;
        gap: 12px;
    }
    
    .switch-btn {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .answer-textarea {
        min-height: 100px;
    }
    
    .dimension-guide {
        padding: 16px;
        margin-bottom: 20px;
        width: 100%;
        gap: 12px;
    }
    
    .guide-icon {
        width: 40px;
        height: 40px;
    }
    
    .guide-image {
        width: 28px;
        height: 28px;
    }
    
    .guide-title {
        font-size: 0.9rem;
    }
    
    .guide-desc {
        font-size: 0.8rem;
    }
    
    .answer-tips {
        gap: 6px;
    }
    
    .tip-item {
        padding: 6px 10px;
    }
    
    .tip-text {
        font-size: 0.75rem;
    }
    
    .encouragement {
        margin-top: 24px;
        padding: 12px;
    }
    
    .encouragement-text {
        font-size: 0.85rem;
    }
    
    .result-section {
        max-width: 100%;
        padding: 16px;
    }
    
    .result-header {
        padding: 0 16px;
        margin-bottom: 32px;
    }
    
    .result-avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    
    .result-type {
        font-size: 2.4rem;
    }
    
    .result-name {
        font-size: 1.3rem;
    }
    
    .result-desc {
        font-size: 1rem;
        margin-bottom: 32px;
    }
    
    .dimensions-container,
    .traits-container {
        padding: 24px;
        margin-bottom: 24px;
    }
    
    .insights-container {
        padding: 20px;
        margin-bottom: 24px;
    }
    
    .insights-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .insight-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .insight-section-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .insight-content {
        font-size: 0.9rem;
    }
    
    .dimensions-title,
    .traits-title {
        font-size: 1.2rem;
    }
    
    .traits-content {
        font-size: 0.95rem;
        text-align: center;
    }
    
    .result-actions {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 32px;
    }
}

@media (min-width: 768px) {
    .logo {
        width: 120px;
        height: 120px;
        margin-bottom: 32px;
    }
    
    .home-subtitle {
        margin-top: 20px;
        margin-bottom: 40px;
        font-size: 1.1rem;
    }
    
    .logo-image {
        background: transparent;
    }
    
    .logo-image:hover {
        transform: scale(1.08);
    }
    
    .section {
        padding: 40px;
    }
    
    .home-section,
    .test-section {
        max-width: 520px;
    }
    
    .result-section {
        max-width: 700px;
    }
    
    .home-title {
        font-size: 2.4rem;
    }
    
    .result-type {
        font-size: 3.2rem;
    }
    
    .result-avatar {
        width: 140px;
        height: 140px;
    }
    
    .answer-textarea {
        min-height: 140px;
    }
    
    .dimensions-container,
    .traits-container {
        padding: 40px;
    }
}

/* 隐藏类 */
.hidden {
    display: none !important;
} 

/* 错误页面样式 */
.error-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.error-container {
    text-align: center;
    max-width: 500px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e74c3c;
    margin-bottom: 15px;
}

.error-message {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.error-suggestions {
    text-align: left;
    margin-bottom: 30px;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--primary-green);
}

.suggestions-title {
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 12px;
    font-size: 1rem;
}

.suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestions-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #555;
    line-height: 1.5;
}

.suggestions-list li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

.suggestions-list li:last-child {
    margin-bottom: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .error-container {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .error-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .error-title {
        font-size: 1.3rem;
    }
    
    .error-message {
        font-size: 1rem;
    }
    
    .error-suggestions {
        padding: 15px;
    }
} 