:host { --primary-color: var(--ion-color-primary); --background-color: #f5f5f5; } ion-header { ion-toolbar { --background: transparent; ion-title { font-size: 18px; font-weight: 600; } } } .survey-intro { padding: 20px; background: white; margin: 16px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); h2 { margin: 0 0 12px; font-size: 20px; font-weight: 600; color: #333; } p { margin: 0; color: #666; font-size: 14px; line-height: 1.5; } } .section-container { background: white; margin: 16px; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); .section-header { display: flex; align-items: center; padding: 16px; border-bottom: 1px solid #eee; ion-icon { font-size: 24px; color: var(--primary-color); margin-right: 12px; } h3 { margin: 0; font-size: 18px; font-weight: 600; color: #333; } } } ion-list { background: transparent; padding: 0; ion-item { --padding-start: 16px; --padding-end: 16px; --padding-top: 12px; --padding-bottom: 12px; --background: transparent; ion-label { color: #333; font-weight: 500; margin-bottom: 8px; } span { margin-right: 50px; font-size: 14px; margin-bottom: 20px; } ion-datetime-button { margin-bottom: 20px; } ion-input, ion-select { --padding-start: 0; --placeholder-color: #999; font-size: 15px; } } } .question-container { padding: 16px; border-bottom: 1px solid #eee; &:last-child { border-bottom: none; } .question-header { display: flex; align-items: flex-start; margin-bottom: 16px; .question-number { background: var(--primary-color); color: white; padding: 4px 8px; border-radius: 4px; font-size: 14px; margin-right: 12px; min-width: 40px; text-align: center; } h4 { margin: 0; font-size: 16px; font-weight: 500; color: #333; flex: 1; } } .options-container { padding-left: 52px; .option-item { --padding-start: 0; --padding-end: 0; --min-height: 44px; --background: transparent; ion-radio { margin-right: 12px; --color-checked: var(--primary-color); } ion-label { font-size: 15px; color: #666; } } } } .button-container { padding: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; ion-button { margin: 0; height: 44px; --border-radius: 8px; ion-icon { margin-right: 8px; } &[color="tertiary"] { --background: var(--ion-color-tertiary); --color: white; &:hover { --background: var(--ion-color-tertiary-shade); } } } } .result-modal { --height: 90%; --border-radius: 20px 20px 0 0; .modal-header { ion-toolbar { --background: var(--ion-color-primary); --color: white; ion-title { font-size: 20px; font-weight: 600; } ion-button { --color: white; } } } .result-content { --background: #f5f5f5; } .result-container { padding: 20px; h3 { display: flex; align-items: center; font-size: 18px; font-weight: 600; color: #333; margin: 0 0 16px; ion-icon { margin-right: 8px; font-size: 24px; color: var(--ion-color-primary); } } .tags-section { background: white; border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); .tags-container { display: flex; flex-wrap: wrap; gap: 12px; .interest-tag { display: flex; align-items: center; background: var(--ion-color-primary-light); color: var(--ion-color-primary); padding: 8px 16px; border-radius: 20px; font-size: 14px; ion-icon { margin-right: 6px; font-size: 16px; } } } } .analysis-section { background: white; border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); .analysis-content { color: #666; line-height: 1.6; font-size: 15px; p { margin: 8px 0; } } } .action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; ion-button { margin: 0; height: 44px; --border-radius: 8px; ion-icon { margin-right: 8px; } } } } } // 添加动画效果 @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } } .result-modal { .result-container { animation: slideUp 0.3s ease-out; } } .section-container { animation: fadeInUp 0.5s ease-out; animation-fill-mode: both; } .section-container:nth-child(2) { animation-delay: 0.2s; } .section-container:nth-child(3) { animation-delay: 0.4s; } ion-checkbox { margin-left: 15px; --size: 20px; --checkbox-background-checked: #1455ce; } ion-checkbox::part(container) { border-radius: 6px; border: 2px solid #1455ce; } ion-radio::part(container) { width: 20px; height: 20px; margin-left: 15px; border-radius: 6px; border: 2px solid #ddd; --checkbox-background-checked: #1455ce; } ion-radio::part(mark) { background: none; transition: none; transform: none; border-radius: 0; } ion-radio.radio-checked::part(container) { background: #1455ce; border-color: transparent; } ion-radio.radio-checked::part(mark) { width: 6px; height: 10px; border-width: 0px 2px 2px 0px; border-style: solid; border-color: #fff; transform: rotate(45deg); } .fontsize { font-size: 20px; } // 日期选择器样式 .custom-datetime { padding: 8px 0; --background: var(--ion-color-light); border-radius: 8px; margin-top: 4px; &::part(wheel-item) { color: var(--ion-color-dark); font-size: 16px; } &::part(wheel-item active) { color: var(--ion-color-primary); font-size: 18px; font-weight: 600; } &::part(wheel) { background: var(--ion-background-color); border-radius: 8px; } } // 日期选择器头部样式 .datetime-header { padding: 16px; font-size: 18px; font-weight: 600; color: var(--ion-color-dark); text-align: center; border-bottom: 1px solid var(--ion-color-light-shade); } // 日期选择器按钮样式 .datetime-buttons { display: flex; justify-content: flex-end; padding: 8px; border-top: 1px solid var(--ion-color-light-shade); ion-button { margin: 0 4px; --padding-start: 16px; --padding-end: 16px; font-weight: 500; } } // 调整 ion-item 中日期选择器的样式 ion-item { &.item-has-value { ion-datetime { --placeholder-color: var(--ion-color-dark); } } ion-datetime { width: 100%; min-height: 44px; --padding-start: 0; --padding-end: 0; } } .analysis-result { padding: 20px; background: #f8f9fa; .result-section { background: white; border-radius: 20px; padding: 24px; margin-bottom: 24px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); transition: transform 0.3s ease; &:hover { transform: translateY(-2px); } .section-title { display: flex; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid #f0f0f0; ion-icon { font-size: 28px; color: var(--ion-color-primary); margin-right: 16px; } h2 { margin: 0; font-size: 20px; font-weight: 600; color: #333; letter-spacing: 0.5px; } } } .tags-section { .tags-wrapper { display: flex; flex-wrap: wrap; gap: 16px; .tag-item { display: flex; align-items: center; background: linear-gradient(135deg, var(--ion-color-primary-light), var(--ion-color-primary-tint)); color: var(--ion-color-primary-contrast); padding: 12px 20px; border-radius: 50px; font-size: 16px; font-weight: 500; transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(var(--ion-color-primary-rgb), 0.2); &:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 6px 16px rgba(var(--ion-color-primary-rgb), 0.3); } .tag-icon { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: 8px; ion-icon { font-size: 18px; } } span { letter-spacing: 0.5px; } } } } .report-section { .content-wrapper { color: #444; line-height: 1.8; .analysis-item { display: flex; align-items: flex-start; margin-bottom: 20px; padding: 16px; background: #f8f9fa; border-radius: 12px; transition: all 0.3s ease; &:hover { background: #f0f2f5; transform: translateX(8px); } .bullet-point { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--ion-color-primary); margin-top: 8px; margin-right: 16px; } p { margin: 0; font-size: 15px; color: #333; line-height: 1.8; letter-spacing: 0.3px; } } } } } // 添加加载状态的样式 .loading-container { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; padding: 32px; text-align: center; ion-spinner { width: 48px; height: 48px; --color: var(--ion-color-primary); margin-bottom: 24px; } h3 { font-size: 18px; font-weight: 600; color: #333; margin: 0 0 12px; } p { font-size: 14px; color: #666; margin: 0; max-width: 280px; line-height: 1.5; } } // 添加淡入动画 @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .loading-container { animation: fadeIn 0.3s ease-out; } // 添加动画效果 @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .result-section { animation: fadeInUp 0.5s ease-out forwards; &:nth-child(2) { animation-delay: 0.2s; } }