/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Helvetica, Arial, sans-serif;
    background-color: #FDEAAA;
    min-height: 100vh;
}

.container {
    max-width: 414px;
    margin: 0 auto;
    background-color: #FDEAAA;
    min-height: 100vh;
    position: relative;
}

/* 导航栏样式 */
.nav-bar {
    height: 50px;
    display: flex;
    align-items: center;
    position: relative;
    background-color: #FDEAAA;
    padding: 0 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.back-icon {
    position: absolute;
    left: 15px;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    text-align: center;
    z-index: 10;
}

.title {
    width: 100%;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* 流程步骤样式 */
.flow-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #FFF2D4;
    height: 120px;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    cursor: pointer;
}

.flow-step.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.step-circle {
    width: 64px;
    height: 64px;
    background-color: #F8C457;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    font-size: 32px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.flow-step.active .step-circle {
    background-color: #E6A23C;
    box-shadow: 0 2px 8px rgba(230,162,60,0.3);
}

.step-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.flow-step.active .step-text {
    color: #E6A23C;
    font-weight: bold;
}

.step-line {
    flex: 1;
    height: 4px;
    background-color: #F8C457;
    margin: 0 20px;
    position: relative;
    top: -20px;
}

/* 子步骤标签样式 */
.sub-step-tabs {
    display: flex;
    background-color: #FFF2D4;
    margin: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.sub-step {
    flex: 1;
    text-align: center;
    line-height: 40px;
    font-size: 14px;
    position: relative;
    transition: all 0.3s;
    color: #666;
    cursor: pointer;
}

.sub-step.active {
    background-color: #F8C457;
    color: #fff;
    font-weight: bold;
}

.sub-step.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* 内容容器统一样式 */
.common-content {
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

/* 紧凑型卡片样式 */
.compact-card {
    background-color: rgba(255, 242, 212, 0.8);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mini-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    height: 24px;
}

.mini-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.mini-title {
    font-size: 14px;
    font-weight: bold;
    color: #E6A23C;
}

.add-icon {
    margin-left: auto;
    width: 20px;
    height: 20px;
    background: #F8C457;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 16px;
    color: white;
    cursor: pointer;
}

/* 孩子信息行 */
.kid-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    height: 32px;
}

.kid-num {
    width: 20px;
    height: 20px;
    background: #F8C457;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    margin-right: 8px;
    color: white;
}

.gender-select {
    display: flex;
    margin-right: 8px;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    height: 32px;
}

.gender-option {
    width: 40px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-size: 13px;
    color: #666;
    transition: all 0.3s;
    cursor: pointer;
}

.gender-option.active {
    background: #F8C457;
    color: white;
    font-weight: bold;
}

.mini-input {
    background: white;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 13px;
    height: 32px;
    outline: none;
}

.age {
    width: 70px;
}

.delete-icon {
    margin-left: auto;
    color: #e64340;
    font-size: 16px;
    width: 20px;
    text-align: center;
    cursor: pointer;
}

/* 选择器样式 */
.pick-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.mini-picker {
    background: white;
    border: none;
    border-radius: 4px;
    width: 48%;
    height: 32px;
    padding: 6px 8px;
    font-size: 13px;
    outline: none;
}

/* 时长选择按钮 */
.mini-duration {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.duration-btn {
    flex: 1;
    text-align: center;
    height: 32px;
    line-height: 32px;
    background: white;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.duration-btn.active {
    background: #F8C457;
    color: white;
    font-weight: bold;
}

/* 按钮样式 */
.submit-btn, .primary-btn {
    background: #F8C457;
    height: 44px;
    line-height: 44px;
    text-align: center;
    border-radius: 22px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    margin: 15px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-btn.disabled {
    background: #D9D9D9;
    color: #999;
    pointer-events: none;
}

.secondary-btn {
    background: #FFF9E6;
    color: #666;
    font-size: 15px;
    font-weight: normal;
    border-radius: 20px;
    text-align: center;
    padding: 10px 0;
    margin: 15px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.buttons-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.half-btn {
    width: 48%;
}

/* 加载指示器 */
.loading-indicator {
    font-size: 14px;
    color: #f6a416;
    font-weight: normal;
    animation: pulse 1.5s infinite;
    margin-left: 10px;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #f6a416;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* 建议列表样式 */
.suggestion-tips {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 15px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.suggestion-list {
    width: 100%;
    margin-bottom: 15px;
}

.suggestion-item {
    background-color: #FFF9E6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid transparent;
    transition: all 0.3s;
    cursor: pointer;
}

.suggestion-item.selected {
    background-color: rgba(248, 196, 87, 0.2);
    border: 2px solid #F8C457;
    box-shadow: 0 2px 8px rgba(248, 196, 87, 0.3);
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.suggestion-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    flex: 1;
}

.suggestion-select-icon {
    width: 24px;
    height: 24px;
    color: #F8C457;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}

.suggestion-brief {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.suggestion-footer {
    display: flex;
    align-items: center;
    font-size: 13px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0,0,0,0.05);
}

.suggestion-age {
    color: #666;
    padding: 3px 8px;
    background-color: rgba(0,0,0,0.03);
    border-radius: 4px;
    margin-right: auto;
}

.view-detail {
    color: #F8C457;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(248, 196, 87, 0.1);
    cursor: pointer;
    margin-left: auto;
}

/* 底部加载指示器 */
.bottom-loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    margin: 5px 0 15px;
    font-size: 14px;
    color: #666;
    background-color: rgba(246, 164, 22, 0.05);
    border-radius: 8px;
}

.dot-loading {
    display: inline-block;
    margin-left: 5px;
}

.dot {
    display: inline-block;
    animation: dotBounce 1.4s infinite ease-in-out both;
    margin: 0 1px;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* 详情页样式 */
.detail-card {
    background-color: #FFF9E6;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.detail-header {
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 10px;
}

.detail-title {
    font-size: 18px;
    font-weight: bold;
    color: #E6A23C;
}

.detail-section {
    margin-bottom: 15px;
}

.detail-section-title {
    font-size: 15px;
    font-weight: bold;
    color: #666;
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 3px solid #F8C457;
}

.detail-desc, .detail-text {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    padding: 0 5px;
}

/* 导读材料样式 */
.story-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.story-card {
    background-color: #FFF2D4;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    margin-bottom: 10px;
}

.story-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

.story-title {
    font-size: 18px;
    font-weight: bold;
    color: #E6A23C;
    text-align: center;
    flex: 1;
}

.audio-btn-story {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    position: absolute;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.audio-icon {
    width: 20px;
    height: 20px;
}

.story-content {
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    padding: 10px;
    background-color: #FFF9E6;
    border-radius: 6px;
    max-height: 400px;
    overflow-y: auto;
}

.story-desc {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin: 15px 0;
}

/* 故事插图样式 */
.story-image-container {
    margin-top: 20px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(230, 162, 60, 0.2);
}

.story-image-title {
    font-size: 14px;
    font-weight: bold;
    color: #E6A23C;
    margin-bottom: 12px;
    text-align: center;
}

.image-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.image-loading .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(230, 162, 60, 0.2);
    border-top-color: #E6A23C;
    margin-bottom: 10px;
}

.image-loading span {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
}

.loading-tips {
    font-size: 12px;
    color: #999;
    text-align: center;
    background-color: rgba(246, 164, 22, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
}

.story-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 研学中页面样式 */
.card {
    background-color: #FFF2D4;
    border-radius: 10px;
    margin: 0 0 10px 0;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #E6A23C;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.plan-title {
    justify-content: center;
    text-align: center;
}

.plan-content {
    background-color: #FFF9E6;
    border-radius: 8px;
    padding: 10px;
}

.step-item {
    background-color: #FFF9E6;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.step-title {
    font-weight: bold;
    margin-bottom: 6px;
    color: #333;
}

.step-desc {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

/* 研学卡片样式 */
.study-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.study-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #4caf50;
    margin-bottom: 8px;
}

.study-card-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.study-card-content {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* 研学后页面样式 */
.image-upload {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-box {
    width: 150px;
    height: 150px;
    background-color: #FFF9E6;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
    border: 2px dashed #F8C457;
    cursor: pointer;
    overflow: hidden;
}

.upload-icon {
    font-size: 40px;
    color: #F8C457;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.upload-text {
    font-size: 12px;
    color: #666;
}

.text-area-container {
    margin: 10px 0;
}

.reflection-text {
    width: 100%;
    height: 150px;
    background-color: #FFF9E6;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    font-family: inherit;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
    
    .flow-steps {
        padding: 15px 20px;
    }
    
    .step-circle {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .common-content {
        padding: 8px;
    }
}

/* 隐藏滚动条但保持功能 */
.common-content::-webkit-scrollbar,
.story-content::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}