/* 二次元游戏风格 - CBT情绪日记 */

/* 导入可爱的字体 */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800;900&family=Fredoka:wght@300;400;500;600;700&display=swap');

:root {
    /* 二次元游戏主题色板 - 明亮活泼 */
    --primary-pink: #FF6B9D;          /* 樱花粉 */
    --primary-blue: #4ECDC4;          /* 青色 */
    --primary-purple: #A78BFA;        /* 薰衣草紫 */
    --primary-yellow: #FFC107;        /* 明黄色 */
    --primary-orange: #FF9800;        /* 橙色 */

    /* 辅助色 */
    --accent-pink: #FFB6C1;           /* 浅粉 */
    --accent-blue: #89F0E7;           /* 浅青 */
    --accent-purple: #D4BBFF;         /* 浅紫 */
    --accent-green: #7FE5A8;          /* 薄荷绿 */
    --accent-yellow: #FFE082;         /* 浅黄 */

    /* 渐变色 */
    --gradient-sunset: linear-gradient(135deg, #FF6B9D 0%, #FFC107 50%, #FF9800 100%);
    --gradient-ocean: linear-gradient(135deg, #4ECDC4 0%, #A78BFA 100%);
    --gradient-candy: linear-gradient(135deg, #FFB6C1 0%, #89F0E7 50%, #D4BBFF 100%);
    --gradient-game: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-sky: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 100%);

    /* 背景色 */
    --bg-main: #FFF5F8;               /* 淡粉白 */
    --bg-secondary: #F0F9FF;          /* 淡蓝白 */
    --bg-card: #FFFFFF;

    /* 文字颜色 */
    --text-primary: #2D3748;
    --text-secondary: #718096;
    --text-light: #A0AEC0;

    /* 特效颜色 */
    --glow-pink: rgba(255, 107, 157, 0.4);
    --glow-blue: rgba(78, 205, 196, 0.4);
    --glow-purple: rgba(167, 139, 250, 0.4);

    /* 阴影 */
    --shadow-cute: 0 8px 20px rgba(255, 107, 157, 0.2);
    --shadow-game: 0 10px 30px rgba(167, 139, 250, 0.3);
    --shadow-float: 0 15px 35px rgba(78, 205, 196, 0.25);

    /* 圆角 */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-xl: 40px;
    --radius-full: 9999px;

    /* 动画 */
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-main);
    overflow-x: hidden;
    position: relative;
}

/* 动态背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 107, 157, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(167, 139, 250, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 可爱的滚动条 */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-candy);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-main);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-ocean);
}

/* 导航栏 - 游戏风格 */
.navbar {
    background: var(--bg-card) !important;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.15);
    padding: 1rem 0;
    border-bottom: 3px solid transparent;
    border-image: var(--gradient-candy) 1;
    position: relative;
    backdrop-filter: blur(10px);
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-candy);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
    background: var(--gradient-sunset);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s var(--bounce);
}

.navbar-brand:hover {
    transform: scale(1.1) rotate(-2deg);
}

.navbar-brand i {
    color: var(--primary-pink);
    font-size: 2rem;
    animation: heartbeat 1.5s infinite;
    filter: drop-shadow(0 0 10px var(--glow-pink));
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(0.9); }
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 600;
    margin: 0 0.5rem;
    padding: 0.5rem 1.5rem !important;
    border-radius: var(--radius-full);
    transition: all 0.3s var(--bounce);
    position: relative;
}

.nav-link:hover {
    background: var(--gradient-candy);
    color: white !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-cute);
}

.nav-link.active {
    background: var(--gradient-sunset);
    color: white !important;
    box-shadow: var(--shadow-cute);
}

/* 按钮样式 - 游戏化 */
.btn {
    font-weight: 700;
    padding: 0.875rem 2.5rem;
    border-radius: var(--radius-full);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--bounce);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-sunset);
    color: white;
    box-shadow: var(--shadow-cute);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.4);
    color: white;
}

.btn-secondary {
    background: var(--gradient-ocean);
    color: white;
    box-shadow: var(--shadow-game);
}

.btn-secondary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(78, 205, 196, 0.4);
}

.btn-outline {
    background: white;
    color: var(--primary-pink);
    border: 3px solid var(--primary-pink);
}

.btn-outline:hover {
    background: var(--primary-pink);
    color: white;
    transform: translateY(-5px) scale(1.05);
}

.btn-light {
    background: white;
    color: var(--primary-pink);
    box-shadow: var(--shadow-float);
}

.btn-outline-light {
    background: transparent;
    color: white;
    border: 3px solid white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-pink);
}

/* Hero区域 - 梦幻游戏风格 */
.hero-section {
    background: var(--gradient-sky);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* 漂浮的装饰元素 */
.hero-section::before,
.hero-section::after {
    content: '⭐';
    position: absolute;
    font-size: 3rem;
    animation: twinkle 3s infinite, float 6s infinite;
    opacity: 0.6;
}

.hero-section::before {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.hero-section::after {
    bottom: 20%;
    right: 15%;
    animation-delay: 1.5s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: var(--gradient-sunset);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.8s var(--bounce);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-weight: 500;
    animation: slideInUp 0.8s var(--bounce);
}

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

/* 功能卡片 - 可爱游戏卡片 */
.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-cute);
    transition: all 0.4s var(--bounce);
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 4px solid transparent;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-candy);
    border-radius: var(--radius-xl);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 20px 50px rgba(255, 107, 157, 0.3);
}

/* 星星装饰 */
.feature-card::after {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0;
    transform: scale(0) rotate(0deg);
    transition: all 0.4s var(--bounce);
}

.feature-card:hover::after {
    opacity: 1;
    transform: scale(1) rotate(360deg);
}

.feature-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-candy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: all 0.4s var(--bounce);
    position: relative;
    box-shadow: var(--shadow-cute);
}

.feature-icon::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: var(--gradient-sunset);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(360deg);
    box-shadow: 0 10px 30px var(--glow-pink);
}

.feature-card:hover .feature-icon::before {
    opacity: 1;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.feature-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* 表单容器 - 游戏登录框风格 */
.form-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-game);
    margin: 2rem auto;
    max-width: 500px;
    position: relative;
    border: 5px solid transparent;
    background-clip: padding-box;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl);
    padding: 5px;
    background: var(--gradient-candy);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.form-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 2rem;
    background: var(--gradient-sunset);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.form-title::after {
    content: '✨';
    position: absolute;
    right: -40px;
    top: -10px;
    font-size: 2rem;
    animation: twinkle 2s infinite;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label::before {
    content: '💖';
    font-size: 1.2rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 3px solid #E0E0E0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s var(--bounce);
    background: white;
    font-weight: 500;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 4px var(--glow-pink);
    transform: translateY(-2px);
}

.form-control.is-invalid {
    border-color: #FF5252;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.invalid-feedback {
    color: #FF5252;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
    font-weight: 600;
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* 复选框 - 可爱风格 */
.form-check {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid var(--primary-pink);
    border-radius: 8px;
    transition: all 0.3s var(--bounce);
    cursor: pointer;
}

.form-check-input:checked {
    background: var(--gradient-sunset);
    border-color: var(--primary-pink);
    transform: scale(1.1);
}

.form-check-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 0.75rem;
    cursor: pointer;
}

/* 警告提示 - 游戏化 */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: currentColor;
}

.alert-success {
    background: linear-gradient(135deg, rgba(127, 229, 168, 0.2) 0%, rgba(127, 229, 168, 0.1) 100%);
    color: #00C853;
    border-left: 5px solid #00C853;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(255, 82, 82, 0.2) 0%, rgba(255, 82, 82, 0.1) 100%);
    color: #FF5252;
    border-left: 5px solid #FF5252;
}

/* 加载动画 - 可爱旋转 */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* 装饰性元素 */
.emotion-decoration {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-candy);
    opacity: 0.15;
    animation: float 8s infinite ease-in-out;
    pointer-events: none;
}

.emotion-decoration:nth-child(1) {
    width: 150px;
    height: 150px;
    animation-delay: 0s;
}

.emotion-decoration:nth-child(2) {
    width: 100px;
    height: 100px;
    animation-delay: 2s;
}

.emotion-decoration:nth-child(3) {
    width: 120px;
    height: 120px;
    animation-delay: 4s;
}

/* 页脚 */
footer {
    background: var(--gradient-game) !important;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-candy);
}

/* 动画效果 */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

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

.animate-float {
    animation: gentleFloat 4s ease-in-out infinite;
}

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

/* 粒子效果背景 */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    opacity: 0.5;
    animation: particleFloat 10s infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .form-container {
        margin: 1rem;
        padding: 2rem;
    }

    .feature-card {
        margin-bottom: 2rem;
    }

    .btn {
        padding: 0.75rem 2rem;
        font-size: 0.9rem;
    }
}

/* 可爱的列表样式 */
.list-unstyled li {
    padding: 0.5rem 0;
    font-weight: 600;
    color: var(--text-secondary);
}

.list-unstyled li i {
    color: var(--accent-green);
    font-size: 1.2rem;
}

/* 数字徽章 - 游戏化 */
.bg-primary {
    background: var(--gradient-sunset) !important;
}

/* 特殊效果文字 */
.text-gray-800 {
    color: var(--text-primary);
}

.text-gray-600 {
    color: var(--text-secondary);
}

.lead {
    font-weight: 600;
    font-size: 1.2rem;
}

.display-5 {
    font-weight: 900;
}

/* Dropdown菜单 */
.dropdown-menu {
    border-radius: var(--radius-md);
    border: 3px solid var(--accent-pink);
    box-shadow: var(--shadow-cute);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s;
    padding: 0.75rem 1rem;
}

.dropdown-item:hover {
    background: var(--gradient-candy);
    color: white;
    transform: translateX(5px);
}

.dropdown-divider {
    border-top: 2px solid var(--accent-pink);
    opacity: 0.3;
}

/* 漂浮表情符号 */
.floating-emoji {
    position: absolute;
    font-size: 3rem;
    animation: floatEmoji 6s ease-in-out infinite;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

@keyframes floatEmoji {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
        opacity: 1;
    }
}

/* 彩色泡泡 */
.bubble {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-candy);
    opacity: 0.2;
    animation: bubbleFloat 10s ease-in-out infinite;
    z-index: 0;
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-50px) scale(1.2);
    }
}

/* 标签徽章 */
.badge-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: white;
    border-radius: var(--radius-full);
    font-weight: 700;
    color: var(--primary-pink);
    box-shadow: var(--shadow-cute);
    animation: slideInDown 0.8s var(--bounce);
}

/* 渐变文字 */
.gradient-text {
    background: var(--gradient-sunset);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* 统计数据 */
.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-sunset);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* 角色展示区 */
.character-showcase {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 主角色卡片 */
.character-card {
    text-align: center;
    animation: gentleFloat 4s ease-in-out infinite;
}

.character-avatar {
    position: relative;
    margin: 0 auto 1.5rem;
    width: 200px;
    height: 200px;
}

.avatar-circle {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-float);
    border: 5px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.avatar-circle::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: var(--gradient-candy);
    border-radius: 50%;
    z-index: -1;
    animation: spin 3s linear infinite;
}

/* 角色闪光 */
.character-sparkle {
    position: absolute;
    font-size: 2rem;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.sparkle-2 {
    bottom: 15%;
    left: 5%;
    animation-delay: 0.7s;
}

.sparkle-3 {
    top: 20%;
    left: -10%;
    animation-delay: 1.4s;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
}

.character-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.character-desc {
    color: var(--text-secondary);
    font-weight: 600;
}

/* 小角色 */
.mini-character {
    position: absolute;
    font-size: 3rem;
    cursor: pointer;
    animation: miniFloat 3s ease-in-out infinite;
    transition: transform 0.3s var(--bounce);
    z-index: 2;
}

.mini-character:hover {
    transform: scale(1.3) rotate(15deg);
}

.mini-character:hover .character-tooltip {
    opacity: 1;
    transform: translateY(-5px);
}

.character-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-sunset);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: var(--shadow-cute);
    pointer-events: none;
}

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

/* 脉冲动画按钮 */
.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-cute);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(255, 107, 157, 0.5);
    }
}

/* ============================================
   日记页面样式
   ============================================ */

/* 日记列表页 - Diary List Page */
.diary-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.diary-page {
    padding-bottom: 4rem;
    position: relative;
}

.diary-layout .diary-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 245, 248, 0.95));
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: 0 15px 45px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(255, 107, 157, 0.2);
    position: relative;
    overflow: hidden;
}

.diary-layout .diary-panel::before,
.diary-layout .diary-panel::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.25), transparent 60%);
    top: -40px;
    right: -40px;
    filter: blur(4px);
}

.diary-layout .diary-panel::after {
    top: auto;
    bottom: -60px;
    left: -60px;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.3), transparent 60%);
}

.diary-panel + .diary-panel {
    margin-top: 1.5rem;
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 107, 157, 0.2);
    color: var(--primary-pink);
    margin-bottom: 0.75rem;
    font-weight: 700;
    box-shadow: inset 0 0 10px rgba(255, 107, 157, 0.2);
}

.panel-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.panel-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.today-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.today-date {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-purple);
}

.today-weekday {
    display: block;
    color: var(--primary-blue);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    letter-spacing: 1px;
}

.diary-input .input-group-text {
    background: rgba(255, 107, 157, 0.2);
    border: none;
    color: var(--primary-pink);
    backdrop-filter: blur(8px);
}

.diary-input .form-control {
    border-left: none;
    border-color: rgba(78, 205, 196, 0.3);
    box-shadow: inset 0 0 0 1px rgba(78, 205, 196, 0.15);
}

.diary-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.diary-stat {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    text-align: center;
    border: 1px dashed rgba(78, 205, 196, 0.3);
    box-shadow: var(--shadow-cute);
}

.diary-stat p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.diary-stat h3 {
    margin: 0.35rem 0 0.15rem;
    font-size: 1.8rem;
    color: var(--primary-purple);
    font-weight: 700;
}

.diary-stat span {
    font-size: 0.75rem;
    color: var(--text-light);
}

.emotion-cloud {
    background: rgba(255, 182, 193, 0.15);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    border: 1px dashed rgba(167, 139, 250, 0.3);
}

.emotion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.emotion-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.emotion-list strong {
    font-weight: 700;
    color: var(--primary-pink);
}

.journal-board {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(240, 249, 255, 0.95));
    border-radius: var(--radius-xl);
    padding: 2.3rem;
    box-shadow: 0 35px 60px rgba(78, 205, 196, 0.25);
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.board-header h2 {
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    background: var(--gradient-sunset);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.journal-timeline {
    position: relative;
    margin-left: 1.25rem;
}

.journal-timeline::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 12px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 107, 157, 0), rgba(255, 107, 157, 0.8), rgba(78, 205, 196, 0));
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.45);
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    align-items: flex-start;
}

.timeline-axis {
    width: 90px;
    text-align: center;
    flex-shrink: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.date-badge {
    background: var(--gradient-ocean);
    color: #fff;
    border-radius: 0.85rem;
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.35rem;
    box-shadow: var(--shadow-cute);
}

.date-badge .day {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.date-badge .month {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.timeline-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: 0 15px 35px rgba(255, 107, 157, 0.15);
    border: 1px solid rgba(255, 107, 157, 0.15);
    flex: 1;
    transition: transform 0.3s var(--smooth), box-shadow 0.3s var(--smooth);
}

.timeline-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(167, 139, 250, 0.25);
}

.timeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.timeline-actions .btn {
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    border: none;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-cute);
}

.timeline-content {
    line-height: 1.7;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.timeline-tags span {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(78, 205, 196, 0.12);
    border: 1px solid rgba(78, 205, 196, 0.35);
    color: var(--primary-blue);
    font-size: 0.8rem;
    margin-right: 0.35rem;
}

.timeline-images {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.timeline-thumb {
    width: 90px;
    height: 90px;
    border-radius: 0.75rem;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-float);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.timeline-thumb:hover {
    transform: scale(1.05);
    border-color: var(--primary-purple);
}

.more-images {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 0.75rem;
    border: 2px dashed rgba(167, 139, 250, 0.4);
    color: var(--primary-purple);
    font-weight: 600;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 0.35rem;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #92400e;
}

.status-done {
    background: rgba(34, 197, 94, 0.2);
    color: #0f5132;
}

.status-warning {
    background: rgba(248, 113, 113, 0.2);
    color: #b91c1c;
}

.status-neutral {
    background: rgba(78, 205, 196, 0.25);
    color: var(--primary-blue);
}

.timeline-skeleton {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-skeleton-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.badge-skeleton {
    width: 70px;
    height: 80px;
    border-radius: 1rem;
    background: linear-gradient(90deg, #f4f4f5 25%, #e4e4e7 50%, #f4f4f5 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.card-skeleton {
    flex: 1;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

.skeleton-line {
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f4f4f5 25%, #e4e4e7 50%, #f4f4f5 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    margin-bottom: 0.5rem;
}

.skeleton-line.w-90 { width: 90%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-45 { width: 45%; }

.diary-empty {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px dashed rgba(148, 163, 184, 0.6);
}

.diary-pagination .page-link {
    border-radius: 999px !important;
    margin: 0 0.2rem;
    padding: 0.5rem 1rem;
}

@media (max-width: 992px) {
    .timeline-item {
        flex-direction: column;
    }

    .timeline-axis {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        justify-content: flex-start;
    }

    .journal-timeline::before {
        display: none;
    }
}


.diary-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.diary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.diary-content {
    line-height: 1.6;
    color: #374151;
    margin-bottom: 1rem;
}

.diary-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #6b7280;
}

.emotion-tag {
    display: inline-block;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    margin: 0 0.25rem 0.5rem 0;
}

.search-filters {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.5rem;
    height: 1rem;
    margin-bottom: 0.5rem;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.diary-images {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.diary-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 2px solid #e5e7eb;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.diary-thumbnail:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.more-images {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 0.5rem;
    border: 2px dashed #9ca3af;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 日记编辑页 - Diary Edit Page */
.diary-editor {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.emotion-selector {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.emotion-button {
    background: white;
    border: 2px solid #f59e0b;
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emotion-button:hover {
    background: #fef3c7;
    transform: translateY(-2px);
}

.emotion-button.selected {
    background: #f59e0b;
    color: white;
    border-color: #d97706;
}

.diary-content {
    min-height: 300px;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.diary-content:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.cbt-prompts {
    background: #f8fafc;
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

.word-count {
    text-align: right;
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.auto-save {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
}

.emotion-intensity {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.intensity-slider {
    flex: 1;
}

.intensity-value {
    min-width: 60px;
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

.image-preview-area {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.image-preview-item {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.image-preview-item:hover {
    transform: scale(1.05);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.image-remove-btn:hover {
    background: rgba(220, 38, 38, 1);
}

.image-upload-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

/* 日记详情页 - Diary Detail Page */
.diary-detail {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.diary-detail .diary-header {
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.diary-detail .diary-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    white-space: pre-wrap;
    margin-bottom: 2rem;
}

.emotion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.emotion-tags .emotion-tag {
    display: inline-block;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.analysis-section {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.emotion-dimension {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #3b82f6;
}

.dimension-label {
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.dimension-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: #3b82f6;
}

.dimension-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.dimension-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1e40af);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.cbt-insights {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.insight-item {
    border-left: 4px solid #667eea;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.insight-title {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.confidence-meter {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.confidence-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.pending-analysis {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.diary-images-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.diary-image-full {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.diary-image-full:hover {
    transform: scale(1.02);
}

/* ============================================
   日记列表页 - 游戏风格 (新增)
   ============================================ */

/* Hero区域 - 日记主题 */
.diary-hero-section {
    position: relative;
    background: linear-gradient(135deg, #FFF5F8 0%, #F0F9FF 100%);
    padding: 3rem 0;
    overflow: hidden;
    min-height: 400px;
}

.diary-hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.diary-hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.diary-character {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 搜索面板 */
.search-panel {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(167, 139, 250, 0.1);
    transition: all 0.3s ease;
}

.search-panel:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: rgba(167, 139, 250, 0.2);
}

/* 游戏风格日记卡片 */
.diary-card-game {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary-pink);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.diary-card-game::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.1), transparent);
    border-radius: 50%;
    transform: translate(30%, -30%);
    pointer-events: none;
    z-index: 0;
}

.diary-card-game:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.2);
    border-left-color: var(--primary-purple);
}

.diary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed rgba(167, 139, 250, 0.2);
}

.diary-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.diary-actions {
    display: flex;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(167, 139, 250, 0.1);
    color: var(--primary-purple);
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--primary-purple);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.btn-icon.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-icon.btn-danger:hover {
    background: #ef4444;
    color: white;
}

.diary-content-preview {
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.diary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.emotion-tag-game {
    display: inline-block;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.emotion-tag-game:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(253, 230, 138, 0.4);
}

/* 空状态 - 游戏风格 */
.empty-state-game {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.empty-character {
    position: relative;
    display: inline-block;
    font-size: 6rem;
    color: var(--primary-pink);
    margin-bottom: 2rem;
    animation: heartbeat 2s ease-in-out infinite;
}

.empty-state-game h3 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.empty-state-game p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* 错误状态 */
.error-state-game {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.error-state-game h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-state-game p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* 加载卡片 */
.loading-card {
    opacity: 0.6;
    pointer-events: none;
}

/* 分页 - 游戏风格 */
.pagination-game {
    gap: 0.5rem;
}

.pagination-game .page-item .page-link {
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    color: var(--primary-purple);
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    font-weight: 600;
}

.pagination-game .page-item .page-link:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

.pagination-game .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

/* 导航栏Logo emoji */
.navbar-logo-emoji {
    display: inline-block;
    font-size: 1.5rem;
    margin-right: 0.5rem;
    animation: heartbeat 1.5s ease-in-out infinite;
    transform-origin: center;
    -webkit-text-fill-color: initial;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

/* 日记avatar特殊样式 */
.diary-avatar {
    background: linear-gradient(135deg, #FFB6C1 0%, #FF6B9D 50%, #A78BFA 100%) !important;
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.4) !important;
    font-size: 4rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diary-avatar:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(255, 107, 157, 0.5) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .diary-hero-title {
        font-size: 2rem;
    }

    .diary-hero-subtitle {
        font-size: 1rem;
    }

    .diary-character {
        margin-top: 2rem;
    }

    .search-panel {
        padding: 1.5rem;
    }

    .diary-card-game {
        padding: 1rem;
    }

    .diary-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .diary-actions {
        width: 100%;
        justify-content: flex-end;
    }
}


/* ==================== 日记新建页面 - 步骤式引导样式 ==================== */

/* 步骤进度指示器 */
.stepper-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: white;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.step-item.active .step-circle {
    background: var(--gradient-sunset);
    color: white;
    transform: scale(1.2);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.3);
}

.step-item.completed .step-circle {
    background: var(--primary-purple);
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.step-item.active .step-label {
    color: var(--primary-pink);
    font-weight: 700;
}

.step-item.completed .step-label {
    color: var(--primary-purple);
}

.step-line {
    width: 60px;
    height: 3px;
    background: #e5e7eb;
    margin: 0 1rem;
    transition: background 0.3s ease;
}

.step-item.completed + .step-line {
    background: var(--primary-purple);
}

/* 步骤卡片 */
.step-card {
    display: none;
    background: white;
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
    margin-top: 2rem;
}

.step-card.active {
    display: block;
}

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

.step-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-card-header.compact {
    text-align: left;
    margin-bottom: 1.5rem;
}

.character-avatar-small {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.step-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: var(--gradient-sunset);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.step-card-body {
    min-height: 300px;
}

.step-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f3f4f6;
}

/* 步骤1：情绪网格 */
.emotion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.emotion-btn-game {
    background: white;
    border: 3px solid #e5e7eb;
    border-radius: 20px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.emotion-btn-game:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--primary-pink);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.2);
}

.emotion-btn-game.selected {
    background: linear-gradient(135deg, #FFE5EC 0%, #FFF0F5 100%);
    border-color: var(--primary-pink);
    border-width: 4px;
    transform: scale(1.1);
    box-shadow: 0 12px 28px rgba(255, 107, 157, 0.3);
}

.emotion-emoji {
    font-size: 3rem;
}

.emotion-btn-game.selected .emotion-emoji {
    animation: heartbeat 1s infinite;
}

.emotion-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.selected-emotions-preview {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    padding: 1.5rem;
}

.preview-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.emotion-tag-selected {
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

/* AI助手面板（桌面端） */
.ai-assistant-panel {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: 30px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.ai-panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f3f4f6;
}

.ai-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-candy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

.ai-title h4 {
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
}

.ai-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ai-panel-body {
    min-height: 300px;
}

.ai-loading {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-secondary);
}

.ai-analysis-result {
    animation: fadeIn 0.5s ease;
}

.analysis-section {
    margin-bottom: 2rem;
}

.analysis-section h5 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.analysis-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 15px;
    padding: 1rem;
    border-left: 4px solid var(--primary-blue);
}

.analysis-card p {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.distortion-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.distortion-item {
    background: #fef3c7;
    border-radius: 15px;
    padding: 1rem;
    border-left: 4px solid #fbbf24;
}

.distortion-badge {
    display: inline-block;
    background: #fbbf24;
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.distortion-desc {
    margin: 0;
    color: #92400e;
    font-size: 0.95rem;
}

.suggestion-list {
    margin: 0;
    padding-left: 1.5rem;
}

.suggestion-list li {
    margin: 0.75rem 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.game-recommendation {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-radius: 15px;
    padding: 1rem;
    border-left: 4px solid var(--primary-pink);
}

.game-recommendation p {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.analysis-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.ai-error {
    text-align: center;
    padding: 2rem 0;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.ai-error h5 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.ai-error p {
    color: var(--text-secondary);
}

/* 步骤2：触发事件 */
.step-textarea {
    border: 3px solid #e5e7eb;
    border-radius: 20px;
    padding: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
    transition: all 0.3s ease;
    resize: vertical;
}

.step-textarea:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
    outline: none;
}

.char-counter {
    text-align: right;
    font-size: 0.9rem;
    color: #6b7280;
}

.quick-templates {
    margin-top: 2rem;
}

.template-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.template-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-template {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #fbbf24;
    color: #92400e;
    border-radius: 15px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-template:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.3);
    background: linear-gradient(135deg, #fde68a, #fbbf24);
}

/* 步骤3：Emoji强度滑块 */
.emoji-intensity-slider {
    padding: 2rem 0;
}

.intensity-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
}

.intensity-current {
    font-size: 1.3rem;
    color: var(--primary-pink);
}

.emoji-track {
    position: relative;
    height: 80px;
    background: #f3f4f6;
    border-radius: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    margin: 2rem 0;
}

.emoji-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #10b981;
    border-radius: 40px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 0;
}

.emoji-selector {
    position: relative;
    z-index: 1;
    width: 60px;
    height: 60px;
    border: 3px solid white;
    border-radius: 50%;
    background: white;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.emoji-selector:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.emoji-selector.selected {
    transform: scale(1.5);
    border-width: 4px;
    border-color: var(--primary-pink);
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.4);
    animation: pulse 1.5s infinite;
}

.intensity-value-display {
    text-align: center;
}

.value-number {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient-sunset);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.value-label {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

/* 步骤4：日记编写 */
.diary-summary {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fbbf24 100%);
    border-radius: 20px;
    padding: 1rem 1.5rem;
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-label {
    font-weight: 600;
    color: #92400e;
}

.summary-value {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.emotion-tag-summary {
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #92400e;
    border: 2px solid #fbbf24;
}

.intensity-emoji {
    font-size: 1.5rem;
}

.intensity-text {
    color: #92400e;
    font-weight: 600;
}

.diary-textarea {
    border: 3px solid #e5e7eb;
    border-radius: 20px;
    padding: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 400px;
}

.diary-textarea:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
    outline: none;
}

.diary-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.word-counter {
    color: var(--text-secondary);
    font-weight: 500;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.image-preview-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1;
    border: 3px solid #e5e7eb;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove-image:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* AI助手抽屉（移动端） */
.ai-drawer-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    max-height: 70vh;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.ai-drawer-mobile.show {
    transform: translateY(0);
}

.drawer-handle {
    padding: 1rem;
    text-align: center;
    cursor: grab;
}

.handle-bar {
    width: 40px;
    height: 5px;
    background: #d1d5db;
    border-radius: 3px;
    margin: 0 auto;
}

.drawer-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.ai-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-candy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.drawer-header h5 {
    flex: 1;
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-close-drawer {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-drawer:hover {
    background: #e5e7eb;
    transform: scale(1.1);
}

.drawer-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* 响应式设计 */
@media (max-width: 991px) {
    .stepper-progress {
        padding: 1.5rem 0;
    }

    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-line {
        width: 30px;
        margin: 0 0.5rem;
    }

    .step-card {
        padding: 2rem 1.5rem;
    }

    .step-title {
        font-size: 1.5rem;
    }

    .character-avatar-small {
        font-size: 3rem;
    }

    .emotion-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .emotion-btn-game {
        padding: 1rem 0.5rem;
    }

    .emotion-emoji {
        font-size: 2.5rem;
    }

    .emoji-track {
        height: 60px;
    }

    .emoji-selector {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }

    .value-number {
        font-size: 3rem;
    }
}

@media (max-width: 575px) {
    .step-card {
        padding: 1.5rem 1rem;
    }

    .step-title {
        font-size: 1.3rem;
    }

    .emotion-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .emotion-btn-game {
        padding: 0.75rem 0.5rem;
    }

    .emotion-emoji {
        font-size: 2rem;
    }

    .emotion-label {
        font-size: 0.9rem;
    }

    .diary-summary {
        flex-direction: column;
        gap: 1rem;
    }

    .step-card-footer {
        flex-direction: column;
    }

    .step-card-footer button {
        width: 100%;
    }
}

/* ==========================================
   🎮 CBT挑战任务卡片 - 二次元游戏风格
   ========================================== */

.challenges-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.challenge-item {
    position: relative;
    background: linear-gradient(135deg, #fff 0%, #fef3c7 100%);
    border-radius: 25px;
    padding: 2rem 2.5rem;
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: visible;
}

.challenge-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #FF6B9D 0%, #FFC107 50%, #FF9800 100%);
    border-radius: 20px 20px 0 0;
}

.challenge-item::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2.5rem;
    opacity: 0;
    transform: rotate(-15deg) scale(0);
    transition: all 0.4s ease;
}

.challenge-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.4);
    border-color: #FFC107;
}

.challenge-item:hover::after {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.challenge-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.challenge-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF6B9D, #FF9800);
    color: white;
    font-weight: 700;
    border-radius: 50%;
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(255, 107, 157, 0.3);
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.challenge-title {
    flex: 1;
    font-size: 1.3rem;
    font-weight: 700;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    line-height: 1.4;
}

.challenge-title::before {
    content: '🎯';
    font-size: 1.5rem;
}

.challenge-reward {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(135deg, #fbbf24, #fde047);
    color: #92400e;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(251, 191, 36, 0.3);
    white-space: nowrap;
}

.challenge-desc {
    color: #78350f;
    line-height: 1.8;
    margin: 0;
    font-size: 1.05rem;
    padding-left: 0;
    margin-top: 0.5rem;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.challenge-item {
    animation: slideIn 0.5s ease-out;
}

.challenge-item:nth-child(1) { animation-delay: 0.1s; }
.challenge-item:nth-child(2) { animation-delay: 0.2s; }
.challenge-item:nth-child(3) { animation-delay: 0.3s; }
.challenge-item:nth-child(4) { animation-delay: 0.4s; }

/* ==========================================
   ✨ AI分析完成页面 - 二次元游戏风格
   ========================================== */

.ai-analysis-result {
    position: relative;
    padding: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

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

.analysis-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.analysis-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #FFB6C1 0%, #89F0E7 50%, #D4BBFF 100%);
}

.analysis-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.analysis-section h5 {
    color: #A78BFA;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-message-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 15px;
    padding: 1.5rem;
    border-left: 4px solid #f59e0b;
    position: relative;
}

.user-message-box::before {
    content: '💝';
    position: absolute;
    top: -10px;
    right: 1rem;
    font-size: 2rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

.user-message-box p {
    color: #78350f;
    line-height: 1.8;
    margin: 0;
}

.game-tip {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 15px;
    border-left: 4px solid #A78BFA;
    animation: slideIn 0.5s ease-out 0.3s both;
}

.game-tip p {
    margin: 0;
    color: #4c1d95;
    font-size: 0.95rem;
    font-weight: 600;
}

.game-tip i {
    color: #A78BFA;
}

/* 认知扭曲列表 */
.distortion-list {
    display: grid;
    gap: 1rem;
}

.distortion-item {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    border-left: 4px solid #ef4444;
    transition: all 0.3s ease;
}

.distortion-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.distortion-badge {
    display: inline-block;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.distortion-desc {
    color: #7f1d1d;
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 操作按钮区域 */
.analysis-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px dashed #e5e7eb;
}

.analysis-actions .btn {
    border-radius: 25px;
    padding: 0.8rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.analysis-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.analysis-actions .btn-primary {
    background: linear-gradient(135deg, #FF6B9D 0%, #FFC107 50%, #FF9800 100%);
    border: none;
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

.analysis-actions .btn-secondary {
    background: linear-gradient(135deg, #4ECDC4 0%, #A78BFA 100%);
    border: none;
    color: white;
}

.analysis-actions .btn-outline {
    background: white;
    border: 2px solid #A78BFA;
    color: #A78BFA;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .ai-analysis-result {
        padding: 1rem;
    }

    .analysis-section {
        padding: 1.5rem;
    }

    .analysis-actions {
        flex-direction: column;
    }

    .analysis-actions .btn {
        width: 100%;
    }

    .challenge-item {
        padding: 1.5rem 1.2rem;
        padding-top: 3.5rem;
    }

    .challenge-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }

    .challenge-number {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .challenge-title {
        font-size: 1.1rem;
    }

    .challenge-title::before {
        font-size: 1.2rem;
    }

    .challenge-reward {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .challenge-desc {
        padding-left: 0;
        font-size: 1rem;
    }
}
