/* ==========================================
   童趣家园 - 主样式表
   ========================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 50%, #FFE4B5 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 容器 */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
    position: relative; 
    z-index: 1; 
}

/* 卡片 */
.card { 
    background: white; 
    border-radius: 32px; 
    padding: 40px; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.1), 0 0 40px rgba(255, 182, 193, 0.3); 
    border: 4px solid #FFD700; 
}

/* 按钮 */
.btn { 
    padding: 16px 36px; 
    border: none; 
    border-radius: 50px; 
    cursor: pointer; 
    font-size: 18px; 
    font-weight: 700; 
    transition: all 0.3s; 
    box-shadow: 0 6px 20px rgba(0,0,0,0.15); 
    position: relative; 
    overflow: hidden; 
}

.btn::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: -100%; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); 
    transition: left 0.5s; 
}

.btn:hover::before { left: 100%; }
.btn:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5); }
.btn:active { transform: translateY(-2px) scale(0.98); }

.btn-primary { background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); color: white; }
.btn-secondary { background: linear-gradient(135deg, #A8E6CF 0%, #88D8B0 100%); color: #2d5a45; }
.btn-danger { background: linear-gradient(135deg, #FFB6C1 0%, #DDA0DD 100%); color: #8B4557; }
.btn-success { background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%); color: white; }
.btn-small { padding: 10px 20px; font-size: 14px; border-radius: 30px; }

/* 输入框 */
.input { 
    width: 100%; 
    padding: 16px 20px; 
    border: 3px solid #E8E8E8; 
    border-radius: 20px; 
    font-size: 18px; 
    margin-bottom: 16px; 
    background: #FAFAFA; 
    transition: all 0.3s; 
}

.input:focus { 
    outline: none; 
    border-color: #FF8E53; 
    background: white; 
    box-shadow: 0 0 20px rgba(255, 142, 83, 0.2); 
}

.input-row { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 16px; 
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-group label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background: #f8f9fa;
}

/* 邀请码卡片 */
.invite-card {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border: 2px dashed #FF6B6B;
    border-radius: 16px;
    padding: 24px;
    margin-top: 16px;
}

.invite-code {
    font-size: 28px;
    font-weight: bold;
    color: #FF6B6B;
    font-family: 'Courier New', monospace;
    letter-spacing: 4px;
}

/* 导航栏 */
.nav { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 20px; 
    background: white; 
    padding: 16px 20px; 
    border-radius: 30px; 
    flex-wrap: wrap; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.1); 
    border: 3px solid #FFD700; 
}

.nav-left { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
}

.nav-item { 
    padding: 12px 24px; 
    border-radius: 30px; 
    cursor: pointer; 
    font-weight: 600; 
    color: #666; 
    font-size: 16px; 
    transition: all 0.3s; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.nav-item:hover { 
    background: linear-gradient(135deg, #FFE4B5 0%, #FFDAB9 100%); 
    transform: scale(1.05); 
}

.nav-item.active { 
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); 
    color: white; 
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4); 
}

.nav-right { 
    display: flex; 
    gap: 12px; 
    align-items: center; 
}

.user-info { 
    padding: 12px 20px; 
    background: linear-gradient(135deg, #E6E6FA 0%, #D8BFD8 100%); 
    border-radius: 30px; 
    font-weight: 600; 
    color: #333; 
    font-size: 15px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.logout-btn { 
    padding: 12px 24px; 
    border-radius: 30px; 
    cursor: pointer; 
    font-weight: 600; 
    color: white; 
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); 
    font-size: 15px; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.logout-btn:hover { 
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4); 
    transform: scale(1.05); 
}

.join-family-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.25);
    transition: all 0.3s;
}

.join-family-btn:hover {
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.45);
    transform: scale(1.05);
}

.join-family-tip {
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.menu-toggle { 
    display: none; 
    cursor: pointer; 
    padding: 12px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); 
    color: white; 
    font-size: 24px; 
}

/* 网格布局 */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 24px; 
}

/* 统计卡片 */
.stat-card { 
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); 
    color: white; 
    padding: 28px; 
    border-radius: 24px; 
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3); 
    border: 3px solid rgba(255,255,255,0.3); 
    position: relative; 
    overflow: hidden; 
}

.stat-card::after { content: '✨'; position: absolute; top: 10px; right: 15px; font-size: 24px; }
.stat-card:nth-child(2) { background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%); }
.stat-card:nth-child(2)::after { content: '🌟'; }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #A8E6CF 0%, #88D8B0 100%); }
.stat-card:nth-child(3)::after { content: '🏆'; }

.stat-value { 
    font-size: 42px; 
    font-weight: 800; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2); 
}

.stat-label { 
    opacity: 0.95; 
    margin-top: 8px; 
    font-size: 16px; 
    font-weight: 500; 
}

/* 任务卡片 */
.task-card { 
    border: 3px solid #E8E8E8; 
    border-radius: 24px; 
    padding: 24px; 
    transition: all 0.3s; 
    background: white; 
    position: relative; 
    overflow: hidden; 
}

.task-card::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    height: 6px; 
    background: linear-gradient(90deg, #FF6B6B, #FF8E53, #FFD93D, #6BCB77, #4D96FF); 
}

.task-card:hover { 
    transform: translateY(-6px); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.15); 
    border-color: #FFD700; 
}

.task-card.completed { background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%); border-color: #6BCB77; }
.task-card.in-progress { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); border-color: #FFD93D; }
.task-card.pending { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); border-color: #4D96FF; }

/* 图表容器 */
.chart-container { 
    height: 300px; 
    display: flex; 
    align-items: flex-end; 
    gap: 20px; 
    padding: 20px; 
    background: linear-gradient(180deg, transparent 0%, rgba(255,228,181,0.3) 100%); 
    border-radius: 24px; 
}

.bar { 
    flex: 1; 
    background: linear-gradient(180deg, #FF6B6B 0%, #FF8E53 100%); 
    border-radius: 16px 16px 0 0; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
    align-items: center; 
    color: white; 
    padding-bottom: 12px; 
    font-weight: 700; 
    font-size: 14px; 
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3); 
    transition: all 0.3s; 
}

.bar:hover { 
    transform: scaleY(1.05); 
    background: linear-gradient(180deg, #FF8E53 0%, #FFD93D 100%); 
}

/* 饼图 */
.pie-chart { 
    width: 220px; 
    height: 220px; 
    border-radius: 50%; 
    background: conic-gradient(#FF6B6B 0deg 90deg, #4ECDC4 90deg 180deg, #FFD93D 180deg 270deg, #A8E6CF 270deg 360deg); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
    border: 6px solid white; 
}

/* 图例 */
.legend { 
    display: flex; 
    gap: 20px; 
    flex-wrap: wrap; 
    margin-top: 20px; 
    justify-content: center; 
}

.legend-item { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 8px 16px; 
    background: white; 
    border-radius: 30px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
}

.legend-color { 
    width: 20px; 
    height: 20px; 
    border-radius: 50%; 
    border: 3px solid white; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.15); 
}

/* 消息提示 */
.message { 
    padding: 16px 20px; 
    border-radius: 20px; 
    margin-bottom: 20px; 
    font-size: 16px; 
    font-weight: 500; 
}

.message.error { 
    background: linear-gradient(135deg, #FFE4E1 0%, #FFD1D1 100%); 
    color: #C71585; 
    border: 2px solid #FFB6C1; 
}

.message.success { 
    background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%); 
    color: #2d5a45; 
    border: 2px solid #6BCB77; 
}

/* 标题 */
h1, h2, h3 { 
    color: #333; 
    margin-bottom: 20px; 
    font-weight: 700; 
}

h1 { 
    font-size: 32px; 
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text; 
}

h2 { font-size: 26px; color: #4ECDC4; }
h3 { font-size: 20px; color: #666; }

/* 行列布局 */
.row { 
    display: flex; 
    gap: 24px; 
    flex-wrap: wrap; 
}

.col { 
    flex: 1; 
    min-width: 300px; 
}

/* 成员头像 */
.member-avatar { 
    width: 70px; 
    height: 70px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); 
    color: white; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 32px; 
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3); 
    border: 4px solid white; 
}

/* 成员卡片 */
.member-card { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    padding: 20px; 
    border: 3px solid #E8E8E8; 
    border-radius: 24px; 
    cursor: pointer; 
    transition: all 0.3s; 
    background: white; 
}

.member-card:hover { 
    border-color: #FFD700; 
    transform: translateY(-4px); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
}

/* 徽章 */
.badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    padding: 6px 16px; 
    border-radius: 30px; 
    font-size: 14px; 
    font-weight: 700; 
}

.badge.parent { background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%); color: white; }
.badge.child { background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); color: white; }

/* AI卡片 */
.ai-card { 
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); 
    border-radius: 24px; 
    padding: 28px; 
    cursor: pointer; 
    transition: all 0.3s; 
    border: 3px solid #FFDAB9; 
    position: relative; 
    overflow: hidden; 
}

.ai-card::before { content: '🤖'; position: absolute; top: 10px; right: 15px; font-size: 40px; }

.ai-card:hover { 
    transform: translateY(-6px) rotate(2deg); 
    box-shadow: 0 15px 40px rgba(252, 182, 159, 0.5); 
}

/* 聊天容器 */
.chat-container { 
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%); 
    border-radius: 24px; 
    padding: 24px; 
    height: 420px; 
    overflow-y: auto; 
    border: 3px solid #E8E8E8; 
}

.chat-message { 
    padding: 16px 20px; 
    border-radius: 24px; 
    margin-bottom: 16px; 
    max-width: 85%; 
    font-size: 16px; 
    line-height: 1.6; 
}

.chat-message.user { 
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); 
    color: white; 
    margin-left: auto; 
    border-bottom-right-radius: 8px; 
}

.chat-message.ai { 
    background: white; 
    border: 2px solid #E8E8E8; 
    border-bottom-left-radius: 8px; 
}

/* 复选框 */
.checkbox-wrapper { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 20px; 
}

.checkbox-wrapper input[type="checkbox"] { 
    width: 24px; 
    height: 24px; 
    accent-color: #FF6B6B; 
}

.checkbox-wrapper label { 
    font-size: 16px; 
    color: #666; 
    cursor: pointer; 
}

/* 链接 */
.link-text { 
    color: #FF6B6B; 
    text-decoration: none; 
    cursor: pointer; 
    font-weight: 600; 
}

.link-text:hover { text-decoration: underline; }

.link-btn {
    color: #FF6B6B;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

.link-btn:hover {
    text-decoration: underline;
}

/* 模态框 */
.modal-overlay { 
    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: 1000; 
    backdrop-filter: blur(5px); 
}

.modal { 
    background: white; 
    border-radius: 32px; 
    padding: 36px; 
    width: 90%; 
    max-width: 520px; 
    max-height: 85vh; 
    overflow-y: auto; 
    border: 4px solid #FFD700; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.2); 
}

.modal-content { 
    background: white; 
    border-radius: 32px; 
    padding: 36px; 
    width: 90%; 
    max-width: 470px; 
    max-height: 80vh; 
    overflow-y: auto; 
    border: 4px solid #FFD700; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.2); 
}

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

.modal-title { 
    font-size: 24px; 
    font-weight: 700; 
    color: #333; 
}

.modal-close { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, #FFB6C1 0%, #DDA0DD 100%); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    font-size: 20px; 
    transition: all 0.3s; 
}

.modal-close:hover { 
    transform: rotate(90deg) scale(1.1); 
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); 
    color: white; 
}

/* 指针样式 */
.pointer {
    cursor: pointer;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

/* 功能卡片网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

/* 功能卡片 */
.feature-card {
    background: white;
    border-radius: 24px;
    padding: 28px 16px;
    text-align: center;
    border: 3px solid #E8E8E8;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: #FFD700;
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.2);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 14px;
    color: #999;
    line-height: 1.4;
}

/* 儿童首页卡片 */
.child-home-card {
    background: white;
    border-radius: 24px;
    padding: 28px 16px;
    text-align: center;
    border: 3px solid #E8E8E8;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    cursor: pointer;
}

.child-home-card:hover {
    transform: translateY(-6px);
    border-color: #FFD700;
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.2);
}

.child-home-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.child-home-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.child-home-desc {
    font-size: 14px;
    color: #999;
    line-height: 1.4;
}

/* 角色选择器 */
.role-selector { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin-bottom: 24px; 
}

.role-btn { 
    border: 4px solid #E8E8E8; 
    border-radius: 24px; 
    padding: 28px 20px; 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.3s; 
    background: white; 
    font-size: 16px;
    font-weight: 500;
}

.role-btn:hover { 
    border-color: #FFD700; 
    transform: scale(1.03); 
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2); 
}

.role-btn.active { 
    border-color: #FF6B6B; 
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%); 
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3); 
    color: #FF6B6B;
}

.role-icon { font-size: 56px; margin-bottom: 16px; }
.role-name { font-weight: 700; color: #333; font-size: 18px; }

/* 头像选择器 */
.avatar-selector { 
    display: flex; 
    gap: 16px; 
    flex-wrap: wrap; 
    margin-bottom: 24px; 
    justify-content: center; 
}

.avatar-option { 
    width: 70px; 
    height: 70px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 36px; 
    border: 4px solid #E8E8E8; 
    cursor: pointer; 
    transition: all 0.3s; 
    background: white; 
}

.avatar-option:hover { 
    border-color: #FFD700; 
    transform: scale(1.15) rotate(10deg); 
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3); 
}

.avatar-option.selected { 
    border-color: #FF6B6B; 
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%); 
    transform: scale(1.1); 
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3); 
}

/* 邀请码盒子 */
.invite-code-box { 
    background: linear-gradient(135deg, #E6E6FA 0%, #D8BFD8 100%); 
    border-radius: 24px; 
    padding: 28px; 
    text-align: center; 
    border: 3px solid #DDA0DD; 
}

.invite-code { 
    font-family: 'Comic Sans MS', cursive, sans-serif; 
    font-size: 32px; 
    font-weight: 800; 
    color: #FF6B6B; 
    letter-spacing: 6px; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1); 
}

.sub-text { color: #999; font-size: 15px; margin-top: 12px; }

/* Logo */
.logo-title { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 16px; 
    margin-bottom: 12px; 
}

.logo-icon { font-size: 48px; animation: bounce 2s infinite; }

.page-subtitle { 
    text-align: center; 
    color: #999; 
    font-size: 16px; 
    margin-bottom: 36px; 
}

/* 切换标签 */
.toggle-tabs { 
    display: flex; 
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%); 
    border-radius: 24px; 
    padding: 8px; 
    margin-bottom: 28px; 
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1); 
}

.toggle-tab { 
    flex: 1; 
    padding: 14px; 
    text-align: center; 
    border-radius: 20px; 
    cursor: pointer; 
    font-weight: 600; 
    transition: all 0.3s; 
    font-size: 16px; 
}

.toggle-tab.active { 
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); 
    color: white; 
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4); 
}

/* 眼睛图标 */
.eye-icon { position: relative; }
.eye-icon .input { padding-right: 50px; }
.eye-btn { 
    position: absolute; 
    right: 16px; 
    top: 50%; 
    transform: translateY(-50%); 
    background: none; 
    border: none; 
    cursor: pointer; 
    font-size: 22px; 
}

/* 动画 */
@keyframes blink { 0%, 50%, 100% { opacity: 1; } 25%, 75% { opacity: 0.3; } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(5deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.bounce-animation { animation: bounce 2s infinite; }
.float-animation { animation: float 3s ease-in-out infinite; }
.wiggle-animation { animation: wiggle 0.5s ease-in-out infinite; }
.pulse-animation { animation: pulse 2s ease-in-out infinite; }

/* 家长端导航响应式 - 默认显示PC端导航 */
.parent-nav .pc-nav { display: flex !important; }
.parent-nav .mobile-nav { display: none !important; }

/* 大屏幕确保PC端导航显示 */
@media screen and (min-width: 769px) {
    .parent-nav .pc-nav { display: flex !important; }
    .parent-nav .mobile-nav { display: none !important; }
}

/* PC端容器顶部padding补偿 - 避免被导航栏遮挡 */
.parent-page { padding-top: 90px; }

/* ======== H5响应式适配 ======== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .container { padding: 15px; max-width: 95%; }
    .card { padding: 24px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 28px; }
    .nav { flex-direction: column; gap: 12px; }
    .nav-left { flex-wrap: wrap; justify-content: center; }
    .nav-item { padding: 8px 16px; font-size: 14px; }
    .input-row { grid-template-columns: 1fr; gap: 12px; }
    .row { flex-direction: column; }
    .col { min-width: 100%; }
}

/* 手机设备 (480px - 768px) */
@media (max-width: 768px) {
    * { -webkit-tap-highlight-color: transparent; }
    html { font-size: 14px; }
    body { padding-bottom: env(safe-area-inset-bottom); }
    .container { padding: 10px; max-width: 100%; }
    .card { padding: 16px; border-radius: 16px; }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
    .btn { padding: 12px 24px; font-size: 14px; border-radius: 10px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
    .btn-primary, .btn-secondary, .btn-danger { width: 100%; }
    .input { padding: 12px 16px; font-size: 14px; border-radius: 10px; min-height: 44px; }
    .grid { grid-template-columns: 1fr; gap: 12px; }
    .stat-card { padding: 12px; border-radius: 12px; }
    .stat-value { font-size: 24px; }
    .stat-label { font-size: 12px; }
    .nav { flex-direction: column; gap: 10px; padding: 10px; }
    .nav-left { display: none; }
    .nav-left.mobile-active { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eee; }
    .nav-item { padding: 12px 16px; text-align: center; border-radius: 8px; }
    .nav-right { width: 100%; justify-content: center; flex-wrap: wrap; }
    .join-family-btn { padding: 8px 16px; font-size: 13px; }
    .user-info { padding: 8px 12px; font-size: 13px; }
    .logout-btn { padding: 8px 16px; font-size: 13px; }
    .menu-toggle { display: flex; font-size: 20px; padding: 8px; background: #f5f5f5; border-radius: 8px; width: 40px; height: 40px; align-items: center; justify-content: center; }
    .task-card { padding: 16px; }
    .task-card h3 { font-size: 1rem; margin-bottom: 8px; }
    .member-card { padding: 12px; }
    .member-avatar { width: 48px; height: 48px; font-size: 20px; }
    .modal, .modal-content { width: 100%; max-width: 100%; margin: 10px; padding: 20px; border-radius: 16px; }
    .role-selector { grid-template-columns: 1fr 1fr; gap: 12px; }
    .role-card { padding: 16px; }
    .role-icon { font-size: 32px; }
    .avatar-option { width: 50px; height: 50px; font-size: 24px; }
    .chart-container { height: 200px; gap: 8px; padding: 12px; }
    .bar { font-size: 11px; padding-bottom: 4px; }
    .pie-chart { width: 150px; height: 150px; }
    .chat-container { height: 300px; }
    .chat-message { padding: 10px 14px; max-width: 90%; font-size: 14px; }
}

/* 小屏手机 (小于480px) */
@media (max-width: 480px) {
    .container { padding: 8px; }
    .card { padding: 12px; }
    .btn { padding: 10px 20px; font-size: 13px; }
    .input { padding: 10px 14px; font-size: 13px; }
    .stat-value { font-size: 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .feature-card { padding: 16px 10px; }
    .feature-icon { font-size: 32px; }
    .feature-title { font-size: 14px; }
    .feature-desc { font-size: 12px; }
}

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .features-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

/* 手机设备 (480px - 768px) */
@media (max-width: 768px) and (min-width: 480px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
