/* ========================================
   爱宠 - 温暖数字猫窝
   版本：2026-03-06 Warm Cat House
   主题：阳光下的猫咪乐园 · 游戏 UI 场景化
   风格：扁平可爱 × 游戏化 × 明亮橘黄
   ======================================== */

/* ========== 色彩系统 ========== */
:root {
    /* 主色 - 暖阳橘（橘猫毛色） */
    --sunny-orange: #FFA726;
    --sunny-orange-light: #FFC068;
    --sunny-orange-dark: #F57C00;
    
    /* 场景色盘 */
    --cream-white: #FFF9F0;      /* 奶油白 - 主背景 */
    --latte-brown: #D7CCC8;       /* 拿铁浅棕 - 木制家具 */
    --terracotta: #E5989B;        /* 陶土粉 - 强调 */
    --sky-blue: #B3E5FC;          /* 浅天蓝 - 强调 */
    
    /* 中性色 */
    --text-dark: #5D4037;
    --text-medium: #8D6E63;
    --text-light: #BCAAA4;
    --border-warm: #EFEBE9;
    
    /* 标签色 */
    --hot-pink: #F48FB1;
    --new-green: #A5D6A7;
    --good-blue: #90CAF9;
    
    /* 阴影 */
    --shadow-soft: 0 8px 24px rgba(255, 167, 38, 0.2);
    --shadow-deep: 0 12px 36px rgba(255, 167, 38, 0.3);
    --glow-inner: inset 0 2px 8px rgba(255, 255, 255, 0.6);
}

/* ========== 基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    /* 奶油白背景 + 微织物纹理 */
    background: 
        linear-gradient(180deg, var(--cream-white) 0%, #FFF3E0 100%);
    min-height: 100vh;
    color: var(--text-dark);
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    letter-spacing: 0.3px;
}

/* 微织物噪点质感 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: -1;
}

/* ========== 头部 - 猫窝场景 ========== */
.header {
    background: linear-gradient(135deg, 
        var(--sunny-orange-light) 0%, 
        var(--sunny-orange) 50%, 
        var(--sunny-orange-dark) 100%);
    color: white;
    padding: 50px 25px 40px;
    text-align: center;
    position: relative;
    /* 柔和内发光 */
    box-shadow: 
        inset 0 3px 12px rgba(255,255,255,0.4),
        0 15px 40px rgba(255, 167, 38, 0.35),
        0 8px 20px rgba(0,0,0,0.08);
    border-radius: 0 0 40px 40px;
    overflow: hidden;
}

/* 阳光光晕装饰 */
.header::after {
    content: '';
    position: absolute;
    top: -40%;
    left: -30%;
    width: 160%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.2) 0%, transparent 60%);
    animation: sunShimmer 12s infinite linear;
}

@keyframes sunShimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 4px;
    text-shadow: 0 3px 15px rgba(0,0,0,0.15);
    position: relative;
}

.header p {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 500;
    position: relative;
}

/* ========== Logo - 毛线球风格 ========== */
.pet-avatar {
    width: 115px;
    height: 115px;
    margin: 0 auto 20px;
    position: relative;
    /* 毛线球渐变 */
    background: linear-gradient(135deg, 
        var(--sunny-orange-light) 0%, 
        var(--sunny-orange) 40%, 
        var(--sunny-orange-dark) 100%);
    border-radius: 50%;
    /* 毛线球质感 - 多层阴影 + 内发光 */
    box-shadow: 
        0 15px 40px rgba(255, 167, 38, 0.45),
        0 8px 20px rgba(0,0,0,0.1),
        inset 0 -5px 15px rgba(0,0,0,0.12),
        inset 0 5px 15px rgba(255,255,255,0.5),
        inset 0 0 0 3px rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: catBreathe 3s ease-in-out infinite;
    border: 3px solid rgba(255,255,255,0.5);
}

/* 毛线球纹理 */
.pet-avatar::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: 
        repeating-radial-gradient(
            circle at 50% 50%,
            transparent 0px,
            transparent 8px,
            rgba(255,255,255,0.1) 9px,
            transparent 10px
        );
    opacity: 0.5;
}

@keyframes catBreathe {
    0%, 100% { 
        transform: translateY(0) scale(1); 
    }
    50% { 
        transform: translateY(-8px) scale(1.03); 
    }
}

.logo-image {
    width: 65%;
    height: 65%;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
    position: relative;
    z-index: 1;
}

/* ========== 资源显示 - 线轴样式 ========== */
.resource-badge {
    position: absolute;
    top: 15px;
    right: 20px;
    background: linear-gradient(135deg, var(--sunny-orange-light), var(--sunny-orange));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 
        0 4px 12px rgba(255, 167, 38, 0.4),
        inset 0 2px 6px rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.resource-icon {
    font-size: 16px;
}

/* ========== 宠物资料卡片 - 新布局 ========== */
.pet-card {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border-radius: 24px;
    padding: 24px;
    margin: 14px;
    box-shadow: 
        0 10px 30px rgba(255, 167, 38, 0.18),
        0 4px 10px rgba(0,0,0,0.05),
        inset 0 2px 8px rgba(255,255,255,0.7);
    border: 1.5px solid rgba(255, 167, 38, 0.15);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 20px;
    align-items: center;
}

/* 顶部彩色装饰线 */
.pet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--sunny-orange), 
        var(--accent-yellow), 
        var(--sunny-orange));
    border-radius: 0 0 3px 3px;
    opacity: 0.7;
}

.pet-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 16px 40px rgba(255, 167, 38, 0.28),
        0 8px 20px rgba(0,0,0,0.08),
        inset 0 2px 8px rgba(255,255,255,0.8);
}

/* 大头像 */
.pet-avatar-large {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    background: linear-gradient(135deg, 
        var(--sunny-orange-light) 0%, 
        var(--sunny-orange) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 24px rgba(255, 167, 38, 0.35),
        inset 0 3px 10px rgba(255,255,255,0.5),
        inset 0 -3px 10px rgba(0,0,0,0.08);
    border: 3px solid rgba(255,255,255,0.6);
    animation: softFloat 3s ease-in-out infinite;
}

@keyframes softFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.03); }
}

.pet-avatar-img {
    width: 65%;
    height: 65%;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.2));
}

/* 宠物详情 */
.pet-details {
    flex: 1;
    min-width: 0;
}

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

.pet-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: 1px;
}

.pet-status {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, 
        rgba(0, 210, 160, 0.1) 0%, 
        rgba(0, 184, 148, 0.08) 100%);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #00B894;
    border: 1px solid rgba(0, 184, 148, 0.2);
    flex-shrink: 0;
}

/* 宠物元信息 */
.pet-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg, 
        rgba(255, 167, 38, 0.08) 0%, 
        rgba(255, 217, 61, 0.05) 100%);
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    border: 1px solid rgba(255, 167, 38, 0.15);
    transition: all 0.3s ease;
}

.meta-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, 
        rgba(255, 167, 38, 0.12) 0%, 
        rgba(255, 217, 61, 0.08) 100%);
    border-color: rgba(255, 167, 38, 0.3);
    box-shadow: 0 4px 12px rgba(255, 167, 38, 0.2);
}

.meta-icon {
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* ========== 功能卡片 - 九宫格风格 ========== */
.feature-card {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border-radius: 24px;
    padding: 24px 16px;
    margin: 0;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: visible;
    border: 1.5px solid rgba(255, 167, 38, 0.15);
    box-shadow: 
        0 8px 24px rgba(255, 167, 38, 0.18),
        0 4px 10px rgba(0,0,0,0.05),
        inset 0 2px 8px rgba(255,255,255,0.7);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 16px 40px rgba(255, 167, 38, 0.28),
        0 8px 20px rgba(0,0,0,0.08),
        inset 0 2px 8px rgba(255,255,255,0.8);
}

/* ========== 功能九宫格 ========== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 14px;
}

.feature-card {
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    padding: 24px 16px;
    position: relative;
}

/* 图标 - 毛线球底座 ========== */
.feature-icon {
    font-size: 44px;
    margin-bottom: 14px;
    display: inline-block;
    width: 86px;
    height: 86px;
    line-height: 86px;
    /* 毛线球渐变底座 */
    background: linear-gradient(135deg, 
        var(--sunny-orange-light) 0%, 
        var(--sunny-orange) 100%);
    border-radius: 50%;
    /* 毛线球质感 */
    box-shadow: 
        0 10px 28px rgba(255, 167, 38, 0.35),
        0 5px 12px rgba(0,0,0,0.08),
        inset 0 3px 10px rgba(255,255,255,0.5),
        inset 0 -3px 10px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(255,255,255,0.5);
    position: relative;
}

/* 毛线纹理 */
.feature-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at 50% 50%,
        transparent 0px,
        transparent 6px,
        rgba(255,255,255,0.15) 7px,
        transparent 8px
    );
    opacity: 0.4;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(-10deg);
    box-shadow: 
        0 15px 38px rgba(255, 167, 38, 0.45),
        0 8px 18px rgba(0,0,0,0.1),
        inset 0 3px 10px rgba(255,255,255,0.6),
        inset 0 -3px 10px rgba(0,0,0,0.1);
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

.feature-card p {
    font-size: 12px;
    color: var(--text-medium);
    line-height: 1.5;
}

/* ========== 按钮 - 游戏 UI 风格 ========== */
.action-btn, .submit-btn, .save-btn, .share-btn {
    background: linear-gradient(135deg, 
        #FFB347 0%, 
        #FF9F43 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 16px 36px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    /* 游戏按钮质感 */
    box-shadow: 
        0 8px 24px rgba(255, 167, 38, 0.4),
        0 4px 10px rgba(0,0,0,0.08),
        inset 0 2px 8px rgba(255,255,255,0.3),
        inset 0 -2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 12px;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 问诊提交按钮特殊处理 */
.consultation-container .submit-btn {
    margin-bottom: 120px;
}

/* 光泽扫过 */
.action-btn::before, .submit-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.7s ease;
}

.action-btn:hover::before, .submit-btn:hover::before {
    left: 100%;
}

.action-btn:hover, .submit-btn:hover, .save-btn:hover, .share-btn:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 18px 45px rgba(255, 167, 38, 0.55),
        0 10px 22px rgba(0,0,0,0.12),
        inset 0 3px 10px rgba(255,255,255,0.5),
        inset 0 -3px 10px rgba(0,0,0,0.12);
}

.action-btn:active, .submit-btn:active, .save-btn:active, .share-btn:active {
    transform: translateY(-2px) scale(0.97);
    box-shadow: 
        0 6px 18px rgba(255, 167, 38, 0.35),
        0 3px 8px rgba(0,0,0,0.08),
        inset 0 3px 10px rgba(0,0,0,0.08);
}

/* ========== 底部导航 - 橙黄协调配色 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding-bottom: env(safe-area-inset-bottom);
    /* 奶油黄渐变背景 */
    background: linear-gradient(180deg, 
        rgba(255, 250, 240, 0.98) 0%, 
        rgba(255, 245, 220, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 8px calc(12px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    /* 顶部橙色边框 */
    box-shadow: 
        0 -6px 20px rgba(255, 167, 38, 0.15),
        0 -3px 8px rgba(0,0,0,0.05);
    border-top: 2px solid rgba(255, 167, 38, 0.3);
    z-index: 1000;
}

/* 手机适配 */
@media (max-width: 480px) {
    .bottom-nav {
        height: 56px;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    }
    
    .nav-icon {
        font-size: 24px;
    }
    
    .nav-item {
        font-size: 10px;
        padding: 6px 10px;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-medium);
    font-size: 11px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.3px;
    position: relative;
    min-width: 60px;
}

.nav-item:hover {
    background: linear-gradient(135deg, 
        rgba(255, 229, 127, 0.3) 0%, 
        rgba(255, 217, 61, 0.2) 100%);
    color: var(--sunny-orange);
}

.nav-item.active {
    color: white;
    background: linear-gradient(135deg, 
        var(--sunny-orange-light) 0%, 
        var(--sunny-orange) 100%);
    box-shadow: 
        0 4px 12px rgba(255, 167, 38, 0.35),
        inset 0 2px 6px rgba(255,255,255,0.4);
}

.nav-icon {
    font-size: 26px;
    margin-bottom: 4px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
}

.nav-item:hover .nav-icon {
    transform: scale(1.18) rotate(-8deg);
}

.nav-item.active .nav-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 8px rgba(255,255,255,0.5));
    animation: yarnBounce 1.5s infinite;
}

@keyframes yarnBounce {
    0%, 100% { transform: translateY(0) scale(1.15); }
    50% { transform: translateY(-5px) scale(1.15); }
}

/* ========== 输入框 - 柔和质感 ========== */
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid var(--border-warm);
    border-radius: 16px;
    font-size: 15px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    color: var(--text-dark);
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.04);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--sunny-orange);
    box-shadow: 
        0 0 0 4px rgba(255, 167, 38, 0.12),
        0 4px 12px rgba(255, 167, 38, 0.18),
        inset 0 2px 6px rgba(255,255,255,0.8);
    background: #FFFFFF;
}

/* ========== 状态指示器 ========== */
.status-dot {
    width: 11px;
    height: 11px;
    background: linear-gradient(135deg, #81C784, #4CAF50);
    border-radius: 50%;
    box-shadow: 
        0 0 0 3px rgba(76, 175, 80, 0.15),
        0 0 14px rgba(76, 175, 80, 0.5);
    animation: softPulse 2s infinite;
}

@keyframes softPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

/* ========== 聊天页面布局 ========== */
.chat-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: linear-gradient(135deg, 
        var(--sunny-orange-light) 0%, 
        var(--sunny-orange) 50%, 
        var(--sunny-orange-dark) 100%);
    color: white;
    padding: 50px 25px 40px;
    text-align: center;
    position: relative;
    box-shadow: 
        inset 0 3px 12px rgba(255,255,255,0.4),
        0 15px 40px rgba(255, 167, 38, 0.35),
        0 8px 20px rgba(0,0,0,0.08);
    border-radius: 0 0 30px 30px;
    flex-shrink: 0;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    padding-bottom: 10px;
}

.chat-input-area {
    display: flex;
    padding: 15px 15px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border-top: 1.5px solid var(--border-warm);
    gap: 10px;
    align-items: center;
    position: sticky;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.chat-header h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 3px;
    text-shadow: 0 3px 15px rgba(0,0,0,0.15);
}

.back-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 28px;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.back-btn:hover {
    opacity: 1;
}



/* 聊天消息 - 毛线球风格 */
.message {
    display: flex;
    margin-bottom: 16px;
    align-items: flex-start;
    animation: messageFadeIn 0.4s ease;
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sunny-orange-light), var(--sunny-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 10px;
    box-shadow: 
        0 4px 12px rgba(255, 167, 38, 0.35),
        inset 0 2px 6px rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.6);
    flex-shrink: 0;
}

.message-content {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    padding: 15px 18px;
    border-radius: 20px;
    box-shadow: 
        0 6px 18px rgba(255, 167, 38, 0.18),
        0 3px 8px rgba(0,0,0,0.05),
        inset 0 2px 6px rgba(255,255,255,0.8);
    max-width: 70%;
    border: 1.5px solid rgba(255, 167, 38, 0.15);
    position: relative;
}

.message-content p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 3px 0;
}

.user-message .message-content {
    background: linear-gradient(135deg, 
        var(--sunny-orange-light) 0%, 
        var(--sunny-orange) 50%, 
        var(--sunny-orange-dark) 100%);
    box-shadow: 
        0 6px 20px rgba(255, 167, 38, 0.4),
        inset 0 2px 8px rgba(255,255,255,0.4),
        inset 0 -2px 8px rgba(0,0,0,0.08);
    border: 1.5px solid rgba(255,255,255,0.4);
}

.user-message .message-content p {
    color: white;
}

/* 输入区域 */
.chat-input-area {
    display: flex;
    padding: 15px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border-top: 1.5px solid var(--border-warm);
    gap: 10px;
    align-items: center;
}

.message-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-warm);
    border-radius: 999px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.04);
}

.message-input:focus {
    border-color: var(--sunny-orange);
    box-shadow: 
        0 0 0 4px rgba(255, 167, 38, 0.12),
        0 4px 12px rgba(255, 167, 38, 0.18),
        inset 0 2px 6px rgba(255,255,255,0.8);
}

.send-btn {
    background: linear-gradient(135deg, 
        #FFB347 0%, 
        #FF9F43 100%);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 6px 18px rgba(255, 159, 67, 0.5),
        inset 0 2px 6px rgba(255,255,255,0.4);
}

.send-btn:hover {
    transform: scale(1.15);
    box-shadow: 
        0 10px 28px rgba(255, 159, 67, 0.6),
        inset 0 2px 6px rgba(255,255,255,0.5);
}

.send-btn:active {
    transform: scale(1.05);
}

/* 打字动画 */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 10px;
}

.typing-indicator span {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--sunny-orange-light), var(--sunny-orange));
    border-radius: 50%;
    animation: yarnTyping 1.4s infinite;
    box-shadow: 0 3px 8px rgba(255, 167, 38, 0.5);
}

@keyframes yarnTyping {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
    50% { transform: translateY(-10px) scale(1.1); opacity: 1; }
}

/* ========== 加载动画 ========== */
.typing-indicator span {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--sunny-orange-light), var(--sunny-orange));
    border-radius: 50%;
    animation: yarnTyping 1.4s infinite;
    box-shadow: 0 3px 8px rgba(255, 167, 38, 0.5);
}

@keyframes yarnTyping {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
    50% { transform: translateY(-10px) scale(1.1); opacity: 1; }
}

/* ========== 分享按钮 ========== */
.share-section {
    padding: 0 20px 120px;
    text-align: center;
}

.share-btn {
    background: linear-gradient(135deg, var(--sunny-orange-light), var(--sunny-orange));
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 
        0 10px 28px rgba(255, 167, 38, 0.4),
        0 5px 12px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.share-btn:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 18px 48px rgba(255, 167, 38, 0.5),
        0 10px 22px rgba(0,0,0,0.1);
}

/* ========== 问诊页面布局 ========== */
.consultation-container {
    padding: 20px;
    padding-bottom: 100px;
    max-width: 600px;
    margin: 0 auto;
}

.consultation-result {
    margin-bottom: 100px;
}

.form-section {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: 
        0 8px 24px rgba(255, 167, 38, 0.18),
        0 4px 10px rgba(0,0,0,0.05),
        inset 0 2px 8px rgba(255,255,255,0.7);
    border: 1.5px solid rgba(255, 167, 38, 0.15);
}

.form-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.symptom-textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid var(--border-warm);
    border-radius: 16px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.symptom-textarea:focus {
    outline: none;
    border-color: var(--sunny-orange);
    box-shadow: 
        0 0 0 4px rgba(255, 167, 38, 0.12),
        0 4px 12px rgba(255, 167, 38, 0.18),
        inset 0 2px 6px rgba(255,255,255,0.8);
}

/* 症状标签 - 多选优化 */
.symptom-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1.5px solid var(--border-warm);
    box-shadow: 0 4px 10px rgba(255, 167, 38, 0.1);
    user-select: none;
}

.tag-item:hover {
    transform: translateY(-2px);
    border-color: var(--sunny-orange);
    box-shadow: 0 6px 16px rgba(255, 167, 38, 0.25);
    background: linear-gradient(180deg, rgba(255, 167, 38, 0.05) 0%, rgba(255, 249, 240, 0.9) 100%);
}

/* 选中状态 - 通过 JS 添加 class */
.tag-item.checked {
    background: linear-gradient(135deg, 
        rgba(255, 167, 38, 0.15) 0%, 
        rgba(255, 217, 61, 0.1) 100%);
    border-color: var(--sunny-orange);
    border-width: 2px;
    box-shadow: 
        0 6px 18px rgba(255, 167, 38, 0.3),
        inset 0 2px 8px rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.tag-item.checked span {
    font-weight: 700;
    color: var(--sunny-orange-dark);
}

.tag-item input[type="checkbox"] {
    accent-color: var(--sunny-orange);
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.tag-item span {
    pointer-events: none;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed rgba(255, 167, 38, 0.4);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
}

.upload-area:hover {
    border-color: var(--sunny-orange);
    background: rgba(255, 167, 38, 0.05);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.upload-area p {
    color: var(--text-medium);
    font-size: 14px;
}

.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid var(--border-warm);
}

/* 问诊结果 */
.consultation-result {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    margin: 16px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 12px 36px rgba(255, 167, 38, 0.25),
        0 6px 16px rgba(0,0,0,0.08),
        inset 0 2px 8px rgba(255,255,255,0.8);
    border: 1.5px solid rgba(255, 167, 38, 0.2);
}

.result-header {
    background: linear-gradient(135deg, 
        var(--sunny-orange-light) 0%, 
        var(--sunny-orange) 50%, 
        var(--sunny-orange-dark) 100%);
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0 2px 8px rgba(255,255,255,0.4);
}

.result-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.close-btn:hover {
    opacity: 1;
}

.result-content {
    padding: 22px;
    line-height: 1.8;
    font-size: 14px;
    color: var(--text-dark);
}

.result-content p {
    margin: 10px 0;
}

.result-actions {
    padding: 15px 20px;
    border-top: 1.5px solid var(--border-warm);
    display: flex;
    gap: 10px;
    background: linear-gradient(180deg, var(--cream-white) 0%, #FFF9F0 100%);
}

.result-actions button {
    flex: 1;
    padding: 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-actions .action-btn-primary {
    background: linear-gradient(135deg, var(--sunny-orange-light), var(--sunny-orange));
    color: white;
    box-shadow: 
        0 6px 18px rgba(255, 167, 38, 0.4),
        inset 0 2px 6px rgba(255,255,255,0.4);
}

.result-actions .action-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 28px rgba(255, 167, 38, 0.5),
        inset 0 2px 6px rgba(255,255,255,0.5);
}

.result-actions .action-btn-secondary {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    color: var(--sunny-orange);
    border: 1.5px solid rgba(255, 167, 38, 0.3);
}

.result-actions .action-btn-secondary:hover {
    background: rgba(255, 167, 38, 0.08);
    transform: translateY(-2px);
}

/* ========== 档案页面布局 ========== */
.profile-page {
    padding-bottom: 70px;
}

/* ========== 贴士页面布局 ========== */
.tips-page {
    padding-bottom: 70px;
}

.profile-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.profile-section {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: 
        0 8px 24px rgba(255, 167, 38, 0.18),
        0 4px 10px rgba(0,0,0,0.05),
        inset 0 2px 8px rgba(255,255,255,0.7);
    border: 1.5px solid rgba(255, 167, 38, 0.15);
}

.profile-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-medium);
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 14px 17px;
    border: 2px solid var(--border-warm);
    border-radius: 16px;
    font-size: 14px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    color: var(--text-dark);
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.04);
}

.form-input:focus {
    outline: none;
    border-color: var(--sunny-orange);
    box-shadow: 
        0 0 0 4px rgba(255, 167, 38, 0.12),
        0 4px 12px rgba(255, 167, 38, 0.18),
        inset 0 2px 6px rgba(255,255,255,0.8);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFA726' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* 表情选择器 */
.emoji-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.emoji-btn {
    font-size: 36px;
    padding: 10px;
    border: 2px solid var(--border-warm);
    border-radius: 12px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 10px rgba(255, 167, 38, 0.1);
}

.emoji-btn:hover {
    transform: scale(1.1);
    border-color: var(--sunny-orange);
    box-shadow: 0 6px 16px rgba(255, 167, 38, 0.25);
}

.emoji-btn.selected {
    border-color: var(--sunny-orange);
    background: rgba(255, 167, 38, 0.1);
    box-shadow: 0 6px 16px rgba(255, 167, 38, 0.3);
}

/* 健康信息 */
.health-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.health-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.health-label {
    font-size: 13px;
    color: var(--text-medium);
    font-weight: 600;
}

/* 问诊历史 */
.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 15px;
    border-bottom: 1.5px solid var(--border-warm);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
}

.history-item:hover {
    background: rgba(255, 167, 38, 0.06);
    transform: translateX(5px);
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
    font-weight: 600;
}

.history-symptoms {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.5;
}

.empty-tip {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
    font-size: 14px;
}

/* 保存按钮 */
.save-btn {
    width: 100%;
    background: linear-gradient(135deg, 
        var(--sunny-orange-light) 0%, 
        var(--sunny-orange) 50%, 
        var(--sunny-orange-dark) 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    box-shadow: 
        0 10px 28px rgba(255, 167, 38, 0.45),
        0 5px 12px rgba(0,0,0,0.1),
        inset 0 3px 10px rgba(255,255,255,0.4),
        inset 0 -3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.5px;
}

.save-btn:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 18px 45px rgba(255, 167, 38, 0.55),
        0 10px 22px rgba(0,0,0,0.12),
        inset 0 3px 10px rgba(255,255,255,0.5),
        inset 0 -3px 10px rgba(0,0,0,0.12);
}

/* ========== 贴士页面布局 ========== */
.tips-page {
    padding-bottom: 80px;
}

.tips-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.tips-categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.tips-categories::-webkit-scrollbar {
    height: 6px;
}

.tips-categories::-webkit-scrollbar-thumb {
    background: var(--sunny-orange);
    border-radius: 3px;
}

.category-btn {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border: 1.5px solid var(--border-warm);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-medium);
    box-shadow: 0 4px 10px rgba(255, 167, 38, 0.1);
}

.category-btn:hover {
    border-color: var(--sunny-orange);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 167, 38, 0.25);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--sunny-orange-light), var(--sunny-orange));
    color: white;
    border-color: var(--sunny-orange);
    box-shadow: 
        0 6px 18px rgba(255, 167, 38, 0.4),
        inset 0 2px 6px rgba(255,255,255,0.4);
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tip-card {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 
        0 8px 24px rgba(255, 167, 38, 0.18),
        0 4px 10px rgba(0,0,0,0.05),
        inset 0 2px 8px rgba(255,255,255,0.7);
    border: 1.5px solid rgba(255, 167, 38, 0.15);
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 32px rgba(255, 167, 38, 0.25),
        0 6px 16px rgba(0,0,0,0.08),
        inset 0 2px 8px rgba(255,255,255,0.8);
}

.tip-card h3 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.3px;
}

.tip-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-medium);
}

.important-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--hot-pink), #F06292);
    color: white;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(244, 143, 177, 0.4);
}

.tip-card.important {
    border-left: 4px solid var(--hot-pink);
    border-radius: 20px;
}

/* ========== 分享页面布局 ========== */
.share-page {
    padding: 20px;
    min-height: calc(100vh - 140px);
}

.share-header {
    text-align: center;
    padding: 35px 20px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border-radius: 24px;
    margin-bottom: 20px;
    box-shadow: 
        0 8px 24px rgba(255, 167, 38, 0.18),
        0 4px 10px rgba(0,0,0,0.05),
        inset 0 2px 8px rgba(255,255,255,0.8);
    border: 1.5px solid rgba(255, 167, 38, 0.15);
}

.share-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 18px;
    animation: catBreathe 3s ease-in-out infinite;
}

.share-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--sunny-orange);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.share-desc {
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.6;
}

.share-card {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: 
        0 8px 24px rgba(255, 167, 38, 0.18),
        0 4px 10px rgba(0,0,0,0.05),
        inset 0 2px 8px rgba(255,255,255,0.7);
    border: 1.5px solid rgba(255, 167, 38, 0.15);
}

.share-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

.share-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-method {
    display: flex;
    align-items: center;
    padding: 16px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1.5px solid var(--border-warm);
    box-shadow: 0 4px 10px rgba(255, 167, 38, 0.08);
}

.share-method:hover {
    transform: translateY(-3px);
    border-color: var(--sunny-orange);
    box-shadow: 
        0 8px 20px rgba(255, 167, 38, 0.2),
        inset 0 2px 6px rgba(255,255,255,0.6);
}

.share-method-icon {
    font-size: 36px;
    margin-right: 16px;
}

.share-method-info {
    flex: 1;
}

.share-method-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.share-method-desc {
    font-size: 12px;
    color: var(--text-light);
}

.share-method-action {
    font-size: 22px;
    color: var(--sunny-orange);
}

.share-qr {
    text-align: center;
    padding: 25px;
    background: linear-gradient(180deg, rgba(255, 167, 38, 0.05) 0%, rgba(255, 167, 38, 0.08) 100%);
    border-radius: 18px;
    margin-top: 18px;
    border: 1.5px dashed rgba(255, 167, 38, 0.3);
}

.qr-placeholder {
    width: 180px;
    height: 180px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    margin: 0 auto 18px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--sunny-orange);
    box-shadow: 
        0 8px 24px rgba(255, 167, 38, 0.25),
        inset 0 2px 8px rgba(255,255,255,0.8);
}

.qr-logo {
    width: 90px;
    height: 90px;
}

.share-url {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 13px;
    color: var(--text-medium);
    word-break: break-all;
    margin-top: 12px;
    border: 1.5px solid var(--border-warm);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.04);
}

.copy-btn {
    background: linear-gradient(135deg, var(--sunny-orange-light), var(--sunny-orange));
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 18px;
    box-shadow: 
        0 8px 24px rgba(255, 167, 38, 0.4),
        inset 0 2px 6px rgba(255,255,255,0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.5px;
}

.copy-btn:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 14px 38px rgba(255, 167, 38, 0.5),
        inset 0 2px 6px rgba(255,255,255,0.5);
}

.share-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.feature-item {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    padding: 18px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 
        0 6px 18px rgba(255, 167, 38, 0.15),
        0 3px 8px rgba(0,0,0,0.04),
        inset 0 2px 6px rgba(255,255,255,0.8);
    border: 1.5px solid var(--border-warm);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 10px 28px rgba(255, 167, 38, 0.25),
        0 6px 16px rgba(0,0,0,0.08),
        inset 0 2px 6px rgba(255,255,255,0.9);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.feature-text {
    font-size: 13px;
    color: var(--text-medium);
    font-weight: 600;
}

/* ========== iPhone 17 Pro Max 大屏适配（430px+） ========== */
@media (min-width: 430px) {
    .app-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .header {
        padding: 50px 30px 40px;
        border-radius: 0 0 35px 35px;
    }
    
    .pet-avatar {
        width: 110px;
        height: 110px;
    }
    
    .feature-grid {
        gap: 18px;
        padding: 18px;
    }
    
    .feature-card {
        padding: 26px 20px;
        margin: 0;
    }
    
    .feature-icon {
        width: 86px;
        height: 86px;
        line-height: 86px;
        font-size: 42px;
    }
    
    /* 聊天页面大屏适配 */
    .chat-header {
        padding: 50px 30px 40px;
        border-radius: 0 0 30px 30px;
    }
    
    .chat-input-area {
        padding: 15px 20px;
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
    }
    
    .message-input {
        padding: 15px 20px;
        font-size: 15px;
    }
    
    .send-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .message-content {
        max-width: 70%;
        padding: 16px 18px;
    }
    
    .message-avatar {
        width: 46px;
        height: 46px;
        font-size: 24px;
    }
    
    /* 导航栏大屏适配 */
    .bottom-nav {
        height: 68px;
        padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    }
    
    .nav-item {
        padding: 12px 16px;
        font-size: 12px;
    }
    
    .nav-icon {
        font-size: 28px;
    }
}

/* ========== 手机全面适配 ========== */
@media (max-width: 480px) {
    /* 全局适配 */
    body {
        font-size: 14px;
    }
    
    .app-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* 头部适配 */
    .header {
        padding: 40px 20px 30px;
        border-radius: 0 0 25px 25px;
    }
    
    .header h1 {
        font-size: 28px;
        letter-spacing: 2px;
    }
    
    .pet-avatar {
        width: 90px;
        height: 90px;
        margin-bottom: 15px;
    }
    
    /* 卡片适配 */
    .pet-card, .feature-card {
        margin: 12px;
        padding: 18px;
        border-radius: 20px;
    }
    
    .feature-grid {
        gap: 12px;
        padding: 12px;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        line-height: 70px;
        font-size: 36px;
    }
    
    /* 聊天页面手机适配 */
    .chat-page {
        height: 100vh;
        height: 100dvh;
    }
    
    .chat-header {
        padding: 40px 20px 30px;
        border-radius: 0 0 20px 20px;
    }
    
    .chat-header h1 {
        font-size: 26px;
    }
    
    .chat-container {
        margin-bottom: 56px;
    }
    
    .chat-input-area {
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
    
    .message-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .send-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .message-content {
        max-width: 75%;
        padding: 13px 15px;
    }
    
    .message-avatar {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
    
    /* 问诊页面手机适配 */
    .consultation-container {
        padding: 15px;
    }
    
    .form-section {
        padding: 18px;
        margin-bottom: 14px;
        border-radius: 20px;
    }
    
    .symptom-textarea {
        padding: 13px 15px;
        font-size: 14px;
    }
    
    .tag-item {
        padding: 9px 14px;
        font-size: 12px;
    }
    
    /* 档案页面手机适配 */
    .profile-container {
        padding: 15px;
    }
    
    .profile-section {
        padding: 18px;
        margin-bottom: 14px;
    }
    
    .form-input {
        padding: 13px 15px;
        font-size: 14px;
    }
    
    .emoji-btn {
        font-size: 32px;
        padding: 8px;
    }
    
    /* 贴士页面手机适配 */
    .tips-container {
        padding: 15px;
    }
    
    .tips-categories {
        padding-bottom: 12px;
    }
    
    .category-btn {
        padding: 9px 16px;
        font-size: 12px;
    }
    
    .tip-card {
        padding: 18px;
        margin-bottom: 12px;
    }
    
    /* 分享页面手机适配 */
    .share-page {
        padding: 15px;
    }
    
    .share-header {
        padding: 25px 18px;
    }
    
    .share-logo {
        width: 80px;
        height: 80px;
    }
    
    .share-title {
        font-size: 24px;
    }
    
    .share-method {
        padding: 14px;
    }
    
    .share-method-icon {
        font-size: 32px;
    }
    
    /* 按钮手机适配 */
    .action-btn, .submit-btn, .save-btn {
        padding: 14px 28px;
        font-size: 14px;
        margin: 8px;
    }
    
    /* 导航栏手机适配已在上面定义 */
}

/* 小屏手机适配 */
@media (max-width: 375px) {
    .header h1 { font-size: 24px; }
    .pet-avatar { width: 80px; height: 80px; }
    .feature-icon { width: 64px; height: 64px; line-height: 64px; font-size: 32px; }
    
    .chat-header h1 { font-size: 22px; }
    .message-content { max-width: 80%; }
    .message-input { font-size: 13px; }
}

/* 横屏适配 */
@media (max-height: 500px) and (orientation: landscape) {
    .chat-container {
        margin-bottom: 50px;
    }
    
    .chat-messages {
        max-height: calc(100vh - 150px);
    }
}

/* 微信兼容 */
.wechat-fix * { -webkit-transform-style: flat; }
input, textarea { -webkit-appearance: none; }

/* 阳光光晕背景装饰 */
.sun-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 167, 38, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 229, 127, 0.06) 0%, transparent 50%);
}

/* 系统解析区域样式 */
.system-analysis {
    margin: 0;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-bottom: 2px solid rgba(255, 179, 71, 0.2);
    display: none;
}

.analysis-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.analysis-icon {
    font-size: 20px;
}

.analysis-title {
    font-size: 15px;
    font-weight: 700;
    color: #FFB347;
}

.analysis-time {
    margin-left: auto;
    font-size: 12px;
    color: #999;
}

.analysis-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 保存按钮区域 */
.save-section {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(255, 167, 38, 0.1);
}

.save-btn-large {
    background: linear-gradient(135deg, #FFB347 0%, #FF9F43 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(255, 159, 67, 0.3);
    transition: all 0.3s ease;
}

.save-btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 159, 67, 0.4);
}

.save-icon {
    font-size: 22px;
}

.save-text {
    font-size: 16px;
}

/* 照片上传样式 */
.upload-area {
    border: 2px dashed rgba(255, 167, 38, 0.4);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF9F0 100%);
}

.upload-area:hover {
    border-color: #FF9F43;
    background: rgba(255, 167, 38, 0.05);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.upload-area p {
    color: #666;
    font-size: 14px;
}

.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid rgba(255, 167, 38, 0.2);
}

.photo-analysis {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 16px;
    border: 2px solid rgba(255, 179, 71, 0.2);
}

.analysis-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.analysis-icon {
    font-size: 24px;
}

.analysis-title {
    font-size: 16px;
    font-weight: 700;
    color: #FFB347;
}

.analysis-content {
    font-size: 14px;
    color: #333;
    line-height: 1.8;
}

/* ========== 突出显示功能（聊天） ========== */
.featured-card {
    grid-column: span 2;
    background: linear-gradient(180deg, 
        rgba(255, 179, 71, 0.1) 0%, 
        rgba(255, 159, 67, 0.08) 100%);
    border: 2px solid rgba(255, 179, 71, 0.3);
    box-shadow: 
        0 8px 24px rgba(255, 179, 71, 0.25),
        inset 0 2px 10px rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: visible;
}

.featured-card .feature-icon {
    width: 70px;
    height: 70px;
    line-height: 70px;
    font-size: 40px;
    background: linear-gradient(135deg, #FFC068, #FFB347);
    box-shadow: 
        0 6px 20px rgba(255, 179, 71, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.6);
}

.featured-card h3 {
    font-size: 20px;
    color: #FF9F43;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 16px 40px rgba(255, 179, 71, 0.4),
        0 8px 20px rgba(0,0,0,0.1),
        inset 0 2px 10px rgba(255, 255, 255, 1);
}

/* HOT/NEW 标签 */
.hot-tag, .new-tag {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #FF6B6B, #FF5252);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    animation: tag-pulse 2s ease-in-out infinite;
}

.new-tag {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.4);
}

@keyframes tag-pulse {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.1);
    }
}

/* 聊天页面输入框 - 确保样式存在 */
.chat-input-area {
    display: flex;
    padding: 15px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--cream-white) 100%);
    border-top: 1.5px solid var(--border-warm);
    gap: 10px;
    align-items: center;
}

.message-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-warm);
    border-radius: 999px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.message-input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.1);
}

.send-btn {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-orange));
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.3);
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 159, 67, 0.4);
}

.send-btn:active {
    transform: scale(1.05);
}

/* ========== 宠圈页面样式 ========== */
.pet-circle-page {
    padding-bottom: 80px;
}

.pet-circle-page .header {
    background: linear-gradient(135deg, #FFB347, #FF9F43);
    color: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: 0 0 30px 30px;
    position: relative;
}

.pet-circle-page .pet-avatar-small {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 10px;
}

.pet-circle-page .container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* 发布输入区域 */
.post-input-section {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.15);
}

.post-input {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid #FFE5D0;
    border-radius: 15px;
    font-size: 15px;
    resize: vertical;
    outline: none;
    transition: all 0.3s;
    background: #FFF9F0;
}

.post-input:focus {
    border-color: #FF9F43;
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.1);
}

.post-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.post-actions .action-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 20px;
    border: 2px solid #FFE5D0;
    background: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.post-actions .action-btn.primary {
    background: linear-gradient(135deg, #FFB347, #FF9F43);
    color: white;
    border-color: #FF9F43;
}

.post-actions .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.2);
}

/* 动态列表 */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.15);
    transition: all 0.3s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 159, 67, 0.25);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FFB347, #FF9F43);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.post-info {
    flex: 1;
}

.post-author {
    font-size: 14px;
    font-weight: 600;
    color: #5D4037;
}

.post-time {
    font-size: 12px;
    color: #BCAAA4;
    margin-top: 2px;
}

.post-content {
    font-size: 15px;
    line-height: 1.8;
    color: #5D4037;
    margin-bottom: 15px;
    white-space: pre-wrap;
}

/* 朋友圈风格图片网格 */
.post-images-grid {
    display: grid;
    gap: 4px;
    margin: 12px 0;
    grid-template-columns: repeat(3, 1fr);
}

.post-images-grid .grid-image {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #f5f5f5;
}

.post-images-grid .grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.post-images-grid .grid-image:hover img {
    transform: scale(1.03);
}

/* 单图 - 大图展示 */
.post-images-grid[data-count="1"] {
    grid-template-columns: 1fr;
}

.post-images-grid[data-count="1"] .grid-image {
    max-width: 320px;
    aspect-ratio: auto;
    max-height: 320px;
}

.post-images-grid[data-count="1"] .grid-image img {
    object-fit: contain;
}

/* 2 图 - 并排 */
.post-images-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 400px;
}

.post-images-grid[data-count="2"] .grid-image {
    max-height: 200px;
}

/* 3 图以上 - 3 列布局 */
.post-images-grid[data-count="3"],
.post-images-grid[data-count="4"],
.post-images-grid[data-count="5"],
.post-images-grid[data-count="6"],
.post-images-grid[data-count="7"],
.post-images-grid[data-count="8"],
.post-images-grid[data-count="9"] {
    grid-template-columns: repeat(3, 1fr);
}

.post-images-grid[data-count="3"] .grid-image,
.post-images-grid[data-count="4"] .grid-image,
.post-images-grid[data-count="5"] .grid-image,
.post-images-grid[data-count="6"] .grid-image,
.post-images-grid[data-count="7"] .grid-image,
.post-images-grid[data-count="8"] .grid-image,
.post-images-grid[data-count="9"] .grid-image {
    max-height: 120px;
}

.post-footer {
    display: flex;
    gap: 8px;
    padding: 15px 0 5px;
    border-top: 1px solid #FFE5D0;
    justify-content: center;
}

/* 统一按钮样式 - 用于动态详情页 */
.post-footer .action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.post-footer .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.post-footer .action-btn:active {
    transform: translateY(0);
}

.post-footer .btn-icon {
    font-size: 18px;
    line-height: 1;
}

.post-footer .btn-text {
    font-size: 13px;
}

/* 点赞按钮 - 暖红色 */
.post-footer .like-btn {
    background: linear-gradient(135deg, #FFF5F5, #FFE5E5);
    color: #FF6B6B;
}

.post-footer .like-btn:hover {
    background: linear-gradient(135deg, #FFE5E5, #FFD0D0);
    color: #FF5252;
}

/* 评论按钮 - 暖橙色 */
.post-footer .comment-btn {
    background: linear-gradient(135deg, #FFF9F0, #FFE5D0);
    color: #FF9F43;
}

.post-footer .comment-btn:hover {
    background: linear-gradient(135deg, #FFE5D0, #FFD0B8);
    color: #FF8A30;
}

/* 分享按钮 - 暖蓝色 */
.post-footer .share-btn {
    background: linear-gradient(135deg, #F0F8FF, #E0F0FF);
    color: #5B9BD5;
}

.post-footer .share-btn:hover {
    background: linear-gradient(135deg, #E0F0FF, #D0E5FF);
    color: #4A8CC4;
}

/* 删除按钮 - 浅红色 */
.post-footer .delete-btn {
    background: linear-gradient(135deg, #FFF5F5, #FFE5E5);
    color: #FF6B6B;
    padding: 10px 14px;
}

.post-footer .delete-btn:hover {
    background: linear-gradient(135deg, #FFE5E5, #FFD0D0);
    color: #FF5252;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: #999;
}

.empty-icon {
    font-size: 100px;
    margin-bottom: 20px;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state p {
    font-size: 15px;
    line-height: 1.8;
}

/* Emoji 图标优化 */
.nav-icon, .btn-icon, .empty-icon {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Color Emoji", "Apple Color Emoji", sans-serif;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
}
