/* 家长端移动端共享样式 */

/* ===== 基础布局 ===== */
body.mobile-page { background: #f5f5f5; }

.mobile-container {
    max-width: 480px;
    margin: 0 auto;
    background: #f5f5f5;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

/* ===== 头部导航 ===== */
.mobile-header {
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header--white {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}

.mobile-header--gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mobile-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-header-content--between {
    justify-content: space-between;
}

.mobile-header-title {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
}

.mobile-header-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(243, 244, 246, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover { background: #e5e7eb; }

.mobile-header--gradient .back-btn {
    background: rgba(255,255,255,0.2);
    color: white;
}

.user-avatar-mobile {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* ===== 内容区 ===== */
.mobile-content { padding: 16px; }

/* ===== 通用卡片 ===== */
.section-card {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-card:active {
    transform: scale(0.99);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.section-more {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

/* ===== 底部导航 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -1px 16px rgba(0,0,0,0.06);
    z-index: 100;
    border-top: 1px solid rgba(255,255,255,0.5);
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    padding: 6px 8px;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.bottom-nav-item.active { color: #667eea; }

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 0 0 4px 4px;
}

.bottom-nav-icon {
    font-size: 22px;
    display: block;
    margin-bottom: 2px;
    line-height: 1;
}

.bottom-nav-label { font-size: 11px; font-weight: 500; }

/* ===== 通用移动组件 ===== */
.nutrition-summary {
    display: flex;
    gap: 10px;
}

.nutrition-item {
    flex: 1;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
}

.nutrition-value {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nutrition-label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 500;
}

/* ===== 满意度按钮 ===== */
.satisfaction-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 16px;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.satisfaction-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.5);
}

.satisfaction-btn:active { transform: scale(0.98); }

/* ===== 预警卡片 ===== */
.alert-card {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 1px solid #feb2b2;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.alert-icon-mobile {
    width: 42px;
    height: 42px;
    background: #fc8181;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.alert-content { flex: 1; }
.alert-title-mobile { font-weight: 600; color: #c53030; font-size: 14px; }
.alert-desc-mobile { font-size: 12px; color: #742a2a; margin-top: 2px; }

/* ===== 快捷入口 ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.quick-action {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 16px 8px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.6);
}

.quick-action:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.quick-action:active { transform: scale(0.96); }

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 8px;
}

.quick-action-name { font-size: 12px; color: #374151; font-weight: 600; }

/* ===== 食谱卡片 ===== */
.week-recipe-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.6);
}

.week-recipe-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 18px;
}

.week-recipe-title { font-size: 16px; font-weight: 700; }
.week-recipe-subtitle { font-size: 12px; opacity: 0.9; margin-top: 4px; }

.today-menu { padding: 16px; }
.today-menu-title {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: background 0.15s ease;
}

.menu-item:active { background: #f3f4f6; }

.menu-item-icon {
    width: 42px;
    height: 42px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.menu-item-info { flex: 1; }
.menu-item-name { font-weight: 600; font-size: 14px; }
.menu-item-nutrition { font-size: 11px; color: #6b7280; margin-top: 2px; }
.menu-item-weight { font-size: 12px; color: #9ca3af; font-weight: 500; }

/* ===== 周食谱预览滑块 ===== */
.week-preview-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.week-preview-scroll::-webkit-scrollbar { display: none; }

.week-preview-item {
    min-width: 80px;
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    background: #f3f4f6;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.week-preview-item.today {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.week-preview-day { font-size: 12px; font-weight: 600; }
.week-preview-emoji { font-size: 11px; margin-top: 4px; }
.week-preview-label { font-size: 11px; margin-top: 4px; opacity: 0.85; }

/* ===== 成功弹窗 ===== */
.success-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.success-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 300px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.success-icon-wrap {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

.success-title-text { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.success-desc-text { font-size: 14px; color: #6b7280; margin-bottom: 24px; }

.success-btn-action {
    background: linear-gradient(135deg, #22c55e, #10b981);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.success-btn-action:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(34,197,94,0.4); }

/* ===== 动画 ===== */
.mobile-content > * {
    animation: mobileSlideUp 0.4s ease both;
}

.mobile-content > *:nth-child(1) { animation-delay: 0.05s; }
.mobile-content > *:nth-child(2) { animation-delay: 0.1s; }
.mobile-content > *:nth-child(3) { animation-delay: 0.15s; }
.mobile-content > *:nth-child(4) { animation-delay: 0.2s; }
.mobile-content > *:nth-child(5) { animation-delay: 0.25s; }
.mobile-content > *:nth-child(6) { animation-delay: 0.3s; }
.mobile-content > *:nth-child(7) { animation-delay: 0.35s; }

@keyframes mobileSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
