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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* 调整容器最大宽度，让内容更好地利用屏幕空间 */
.container {
    max-width: 1600px; /* 从1200px增加到1600px */
    margin: 0 auto;
    padding: 20px;
}

/* 为超大屏幕进一步优化 */
@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
        padding: 40px;
    }
}

/* 调整表单最大宽度，避免在大屏幕上过于宽泛 */
.birth-form {
    max-width: 1000px; /* 从800px增加到1000px */
    margin: 0 auto;
}

/* 优化表单网格布局 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 调整最小宽度 */
    gap: 25px;
    margin-bottom: 40px;
}

/* 在大屏幕上限制表单列数，避免过于分散 */
@media (min-width: 1200px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr); /* 最多3列 */
    }
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

.header-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo i {
    font-size: 3rem;
    color: #667eea;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

/* 主要内容区域 */
.main-content {
    margin-bottom: 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-header h2 i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
    font-weight: 500;
}

/* 输入表单样式 */
.input-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 30px;
}

.birth-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-group label i {
    color: #667eea;
    font-size: 1.1rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    color: #333;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #aaa;
}

/* 提交按钮 */
.form-actions {
    text-align: center;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 加载状态 */
.loading-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.loading-content h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.loading-content p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.loading-spinner {
    margin-bottom: 30px;
}

.loading-spinner i {
    font-size: 4rem;
    color: #667eea;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e1e5e9;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 结果展示样式 */
.result-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.result-section .section-header h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
}

.new-reading-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.new-reading-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.result-content {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
    border-left: 4px solid #667eea;
}

.result-content h3 {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.result-content p {
    margin-bottom: 15px;
}

.result-content .highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 3px solid #667eea;
}

.analysis-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

/* 修改分析区域标题样式 - 保持emoji原色，文字应用渐变 */
.analysis-section h5 {
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    padding: 10px 0;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    /* 移除整体的渐变色效果 */
    color: #333; /* 设置默认文字颜色 */
}

/* 为标题中的文字部分（非emoji）应用渐变色 */
.analysis-section h5::after {
    content: attr(data-text);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 结果内容区域的h3标题也做同样处理 */
.result-content h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
    padding: 15px 0;
    border-bottom: 3px solid rgba(102, 126, 234, 0.3);
    color: #333; /* 保持emoji原色 */
}

/* 更简单的解决方案：使用CSS选择器分离emoji和文字 */
.analysis-section h5,
.result-content h3 {
    color: #667eea; /* 统一文字颜色，不使用渐变 */
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    /* 移除渐变背景效果，保持emoji原色 */
}

.result-content h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 3px solid rgba(102, 126, 234, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .analysis-section h5 {
        font-size: 1.5rem;
    }
    
    .result-content h3 {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    .analysis-section h5 {
        font-size: 1.3rem;
    }
    
    .result-content h3 {
        font-size: 1.5rem;
    }
}

.section-content {
    line-height: 1.6;
    color: #333;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        padding: 30px 20px;
    }
    
    .logo h1 {
        font-size: 2.2rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .input-section {
        padding: 30px 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .result-section .section-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .result-section .section-header h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .submit-btn {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
}

/* 在现有的markdown-content样式后添加以下内容 */
.markdown-content ul,
.markdown-content ol {
    margin: 15px 0;
    padding-left: 30px; /* 增加左侧缩进 */
    line-height: 1.8;
}

.markdown-content li {
    margin: 8px 0;
    padding-left: 8px; /* 额外的内容缩进 */
    position: relative;
}

.markdown-content ul li {
    list-style-type: disc;
    margin-left: 0;
}

.markdown-content ol li {
    list-style-type: decimal;
    margin-left: 0;
}

/* 嵌套列表的额外缩进 */
.markdown-content ul ul,
.markdown-content ol ol,
.markdown-content ul ol,
.markdown-content ol ul {
    margin: 5px 0;
    padding-left: 25px;
}

/* 确保分析区域内的列表也有适当缩进 */
.analysis-section ul,
.analysis-section ol {
    margin: 10px 0;
    padding-left: 25px;
}

.analysis-section li {
    margin: 5px 0;
    padding-left: 5px;
}

/* 结果内容区域的列表样式 */
.result-content ul,
.result-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.result-content li {
    margin: 8px 0;
    padding-left: 8px;
}