/* 儿童积分乐园 - 可爱卡通风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B9D;
    --primary-light: #FFB6C1;
    --secondary: #7C4DFF;
    --secondary-light: #B388FF;
    --success: #4CAF50;
    --warning: #FF9800;
    --danger: #F44336;
    --bg-gradient: linear-gradient(135deg, #FFE5EC 0%, #E8F4F8 50%, #E5F4FF 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #333;
    --text-light: #666;
    --shadow: 0 10px 30px rgba(255, 107, 157, 0.2);
    --shadow-hover: 0 15px 40px rgba(255, 107, 157, 0.3);
}

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* 背景动画气泡 */
.background-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 182, 193, 0.3));
    animation: float 15s infinite ease-in-out;
}

.bubble:nth-child(1) { width: 100px; height: 100px; left: 10%; top: 20%; animation-delay: 0s; }
.bubble:nth-child(2) { width: 150px; height: 150px; left: 70%; top: 10%; animation-delay: -3s; }
.bubble:nth-child(3) { width: 80px; height: 80px; left: 40%; top: 60%; animation-delay: -6s; }
.bubble:nth-child(4) { width: 120px; height: 120px; left: 80%; top: 50%; animation-delay: -9s; }
.bubble:nth-child(5) { width: 60px; height: 60px; left: 20%; top: 80%; animation-delay: -12s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-30px) rotate(5deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(30px) rotate(-5deg); }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 通用样式 */
.page-header {
    text-align: center;
    margin-bottom: 25px;
}

.back-link, .back-btn {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 1.1em;
    margin-bottom: 15px;
    padding: 8px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.back-btn:hover {
    background: var(--primary);
    color: white;
}

h1 {
    font-size: 2em;
    color: var(--primary);
    text-shadow: 2px 2px 0 #fff, 4px 4px 0 var(--primary-light);
    margin-bottom: 10px;
}

h2 {
    font-size: 1.5em;
    color: var(--text-dark);
    margin-bottom: 15px;
}

/* 主页样式 */
.main-header {
    text-align: center;
    padding: 30px 0;
}

.main-header h1 {
    font-size: 2.5em;
    margin: 15px 0;
}

.stars {
    font-size: 1.5em;
    letter-spacing: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: var(--text-light);
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 30px;
    background: white;
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 1.1em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.nav-btn:hover, .nav-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.welcome-banner {
    background: linear-gradient(135deg, #FFF5F5, #F0F8FF);
    border-radius: 25px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.banner-emoji {
    font-size: 3em;
}

.banner-text h2 {
    color: var(--primary);
    margin-bottom: 5px;
}

.banner-text p {
    color: var(--text-light);
}

/* 孩子卡片 */
.kids-showcase {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.kid-card {
    background: var(--card-bg);
    border-radius: 30px;
    padding: 30px;
    width: 300px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.kid-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.kid-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.kid-card.selected {
    transform: scale(1.05);
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.3), transparent);
    transform: translate(-50%, -50%);
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.avatar-container {
    position: relative;
    margin-bottom: 15px;
}

.avatar {
    font-size: 5em;
}

.level-badge {
    position: absolute;
    bottom: 0;
    right: 20px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

.kid-name {
    font-size: 1.8em;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.kid-age {
    color: var(--text-light);
    font-size: 1.1em;
    margin-bottom: 15px;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.stat {
    text-align: center;
}

.stat-icon {
    font-size: 1.5em;
    display: block;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-light);
}

.progress-bar {
    background: #eee;
    border-radius: 10px;
    height: 20px;
    position: relative;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s;
}

.progress-text {
    font-size: 0.8em;
    color: var(--text-light);
}

.play-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.2em;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.4);
}

/* 功能卡片 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.feature-card h3 {
    color: var(--text-dark);
    margin-bottom: 5px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9em;
}

.main-footer {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
    font-size: 1.2em;
}

/* 详情页样式 */
.section-title {
    text-align: center;
    margin: 30px 0 20px;
    font-size: 1.5em;
}

.section-title.add-title {
    color: var(--success);
}

.section-title.sub-title {
    color: var(--danger);
}

/* 宠物区域 */
.pet-section {
    margin-bottom: 20px;
}

.pet-card {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border-radius: 25px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    justify-content: center;
}

.pet-avatar {
    font-size: 5em;
}

.pet-info {
    flex: 1;
    min-width: 200px;
}

.pet-info h3 {
    font-size: 1.5em;
    color: var(--text-dark);
}

.pet-level {
    color: var(--secondary);
    font-weight: bold;
    margin-bottom: 10px;
}

.pet-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.pet-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
}

.stat-bar {
    width: 80px;
    height: 10px;
    background: #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s;
}

.stat-fill.hunger {
    background: linear-gradient(90deg, #FF9800, #FFC107);
}

.stat-fill.happiness {
    background: linear-gradient(90deg, #E91E63, #FF4081);
}

.pet-exp-bar {
    margin-top: 10px;
}

.exp-bar {
    height: 12px;
    background: #ddd;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 5px;
}

.exp-fill {
    background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s;
}

.pet-actions {
    display: flex;
    gap: 10px;
}

.pet-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 20px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.pet-btn.feed {
    background: linear-gradient(135deg, #FF9800, #FFC107);
    color: white;
}

.pet-btn.play {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: white;
}

.pet-btn:hover {
    transform: scale(1.05);
}

/* 签到区域 */
.checkin-section {
    margin-bottom: 20px;
}

.checkin-card {
    background: white;
    border-radius: 25px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
}

.checkin-btn {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
    border: none;
    padding: 20px 50px;
    border-radius: 30px;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.checkin-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.checkin-success {
    color: var(--success);
}

.checkin-icon {
    font-size: 3em;
}

.checkin-points {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
}

.streak-info {
    margin-top: 15px;
    color: var(--text-light);
}

/* 积分显示 */
.points-display {
    margin-bottom: 20px;
}

.points-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 25px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    color: white;
    box-shadow: var(--shadow);
}

.points-icon {
    font-size: 4em;
}

.points-value {
    font-size: 3em;
    font-weight: bold;
}

.points-label {
    font-size: 1.2em;
    opacity: 0.9;
}

.level-badge-large {
    background: white;
    color: var(--primary);
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 1.5em;
    font-weight: bold;
}

/* 行为按钮 */
.behaviors-section {
    margin-bottom: 20px;
}

.behaviors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.behavior-btn {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.behavior-btn:hover {
    transform: translateY(-5px) scale(1.05);
}

.behavior-btn.add {
    border: 3px solid var(--success);
}

.behavior-btn.add:hover {
    background: #E8F5E9;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.behavior-btn.sub {
    border: 3px solid var(--danger);
}

.behavior-btn.sub:hover {
    background: #FFEBEE;
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.3);
}

.behavior-icon {
    font-size: 2em;
}

.behavior-name {
    font-size: 0.95em;
    color: var(--text-dark);
    text-align: center;
}

.behavior-points {
    font-size: 1.1em;
    font-weight: bold;
}

.behavior-btn.add .behavior-points {
    color: var(--success);
}

.behavior-btn.sub .behavior-points {
    color: var(--danger);
}

/* ========== 自定义加减积分 ========== */
.custom-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-top: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-toggle.add {
    color: #2E7D32;
    background: rgba(76, 175, 80, 0.08);
    border: 1.5px dashed rgba(76, 175, 80, 0.4);
}

.custom-toggle.sub {
    color: #C62828;
    background: rgba(244, 67, 54, 0.08);
    border: 1.5px dashed rgba(244, 67, 54, 0.4);
}

.custom-toggle:hover {
    opacity: 0.85;
}

.custom-toggle .toggle-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

.custom-form {
    margin-top: 10px;
    padding: 16px;
    background: #FAFAFA;
    border-radius: 12px;
    border: 1px solid #E0E0E0;
}

.custom-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.custom-row label {
    font-size: 14px;
    font-weight: 600;
    min-width: 40px;
    color: var(--text-dark);
}

.custom-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #E0E0E0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s;
}

.custom-row input:focus {
    outline: none;
    border-color: #4A90D9;
}

.custom-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-submit.add {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
}

.custom-submit.add:hover {
    background: linear-gradient(135deg, #388E3C, #4CAF50);
}

.custom-submit.sub {
    background: linear-gradient(135deg, #F44336, #EF5350);
    color: white;
}

.custom-submit.sub:hover {
    background: linear-gradient(135deg, #C62828, #F44336);
}

/* 成就区域 */
.achievements-section {
    margin-bottom: 20px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.achievement-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.achievement-card.locked {
    opacity: 0.7;
}

.achievement-card.achieved {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border: 2px solid #FFD700;
}

.achievement-icon {
    font-size: 2.5em;
}

.achievement-info h4 {
    color: var(--text-dark);
    margin-bottom: 5px;
}

.achievement-info p {
    font-size: 0.85em;
    color: var(--text-light);
}

.achievement-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.progress-bar-mini {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

.achieved-badge {
    color: var(--success);
    font-weight: bold;
    font-size: 0.9em;
}

.view-more-btn {
    display: block;
    text-align: center;
    color: var(--primary);
    text-decoration: none;
    padding: 15px;
    font-size: 1.1em;
}

/* 兑换区域 */
.rewards-section {
    margin-bottom: 20px;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.reward-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.reward-card:hover {
    transform: translateY(-5px);
}

.reward-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.reward-name {
    color: var(--text-dark);
    margin-bottom: 5px;
}

.reward-cost {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.exchange-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.exchange-btn:hover {
    transform: scale(1.05);
}

.exchange-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 记录链接 */
.records-link {
    text-align: center;
    margin: 30px 0;
}

.records-btn {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: 25px;
    font-size: 1.1em;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.records-btn:hover {
    background: var(--primary);
    color: white;
}

/* 记录页面 */
.records-stats {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px 40px;
    border-radius: 20px;
    text-align: center;
}

.records-list {
    background: white;
    border-radius: 25px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.record-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.record-item.add {
    background: #E8F5E9;
    border-left: 4px solid var(--success);
}

.record-item.sub {
    background: #FFEBEE;
    border-left: 4px solid var(--danger);
}

.record-item.exchange {
    background: #E3F2FD;
    border-left: 4px solid var(--secondary);
}

.record-icon {
    font-size: 2em;
    margin-right: 15px;
}

.record-content {
    flex: 1;
}

.record-reason {
    color: var(--text-dark);
    font-size: 1.1em;
}

.record-time {
    color: var(--text-light);
    font-size: 0.85em;
}

.record-points {
    font-size: 1.5em;
    font-weight: bold;
}

.record-item.add .record-points {
    color: var(--success);
}

.record-item.sub .record-points, .record-item.exchange .record-points {
    color: var(--danger);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

/* 排行榜 */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px;
}

.podium-item {
    text-align: center;
    background: white;
    border-radius: 25px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.podium-item.first {
    order: 2;
    transform: scale(1.1);
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.podium-item.second {
    order: 1;
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
}

.podium-item.third {
    order: 3;
    background: linear-gradient(135deg, #CD7F32, #B87333);
}

.crown {
    font-size: 2em;
    display: block;
    margin-bottom: 5px;
}

.podium-avatar {
    font-size: 3em;
}

.podium-name {
    font-size: 1.3em;
    color: #333;
    margin: 10px 0;
}

.podium-points {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.podium-medal {
    font-size: 2em;
    margin-top: 10px;
}

.ranking-list {
    background: white;
    border-radius: 25px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    transition: all 0.3s;
}

.ranking-item:hover {
    background: #f0f0f0;
}

.ranking-number {
    font-size: 1.5em;
    min-width: 50px;
    text-align: center;
}

.ranking-avatar {
    font-size: 2em;
    margin-right: 15px;
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-size: 1.2em;
    color: var(--text-dark);
}

.ranking-level {
    font-size: 0.9em;
    color: var(--text-light);
}

.ranking-points {
    text-align: right;
}

.points-num {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
    display: block;
}

.points-label {
    font-size: 0.85em;
    color: var(--text-light);
}

/* 成就页面 */
.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.achievement-full-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.achievement-full-card.locked {
    opacity: 0.7;
}

.achievement-full-card.achieved {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border: 2px solid #FFD700;
}

.achievement-icon-large {
    font-size: 3em;
}

.achievement-details {
    flex: 1;
}

.achievement-details h3 {
    color: var(--text-dark);
    margin-bottom: 5px;
}

.achievement-details p {
    color: var(--text-light);
    font-size: 0.95em;
}

.achieved-info {
    color: var(--success);
    margin-top: 10px;
    font-weight: bold;
}

.achievement-progress-full {
    margin-top: 10px;
}

.progress-bar-full {
    height: 12px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill-full {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 6px;
    transition: width 0.5s;
}

.progress-label {
    font-size: 0.9em;
    color: var(--text-light);
}

/* 闪动消息 */
.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 15px 25px;
    border-radius: 15px;
    margin-bottom: 10px;
    font-size: 1.1em;
    animation: slideIn 0.3s ease;
    text-align: center;
}

.flash.success {
    background: #D4EDDA;
    color: #155724;
    border: 2px solid #C3E6CB;
}

.flash.warning {
    background: #FFF3CD;
    color: #856404;
    border: 2px solid #FFEAA7;
}

.flash.error {
    background: #F8D7DA;
    color: #721C24;
    border: 2px solid #F5C6CB;
}

.flash.info {
    background: #D1ECF1;
    color: #0C5460;
    border: 2px solid #BEE5EB;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 移动端优先响应式设计 ==================== */

/* 基础移动端优化 */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 14px;
    }
    
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    h1 { 
        font-size: 1.6em; 
        margin-bottom: 15px;
    }
    
    h2 { 
        font-size: 1.3em; 
        margin-bottom: 12px;
    }
    
    .main-header h1 {
        font-size: 1.8em;
        margin: 10px 0;
    }
    
    .main-header {
        padding: 20px 0;
    }
    
    .stars {
        font-size: 1.2em;
        letter-spacing: 5px;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    /* 导航优化 */
    .main-nav {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .nav-btn {
        padding: 10px 20px;
        font-size: 0.95em;
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    /* 欢迎横幅 */
    .welcome-banner {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .banner-emoji {
        font-size: 2.5em;
    }
    
    /* 孩子卡片 */
    .kid-card {
        width: 100%;
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .avatar {
        font-size: 4em;
    }
    
    .kid-name {
        font-size: 1.5em;
    }
    
    .stats-bar {
        gap: 10px;
    }
    
    .stat-value {
        font-size: 1.3em;
    }
    
    /* 功能卡片 */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        font-size: 2.5em;
    }
    
    /* 宠物区域 */
    .pet-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .pet-avatar {
        font-size: 4em;
    }
    
    .pet-stats {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .pet-stat {
        width: 100%;
        justify-content: center;
    }
    
    .stat-bar {
        width: 120px;
    }
    
    .pet-actions {
        justify-content: center;
        width: 100%;
        margin-top: 15px;
    }
    
    .pet-btn {
        padding: 12px 20px;
        font-size: 0.95em;
        flex: 1;
    }
    
    /* 签到区域 */
    .checkin-card {
        padding: 20px;
    }
    
    .checkin-btn {
        padding: 15px 30px;
        font-size: 1.1em;
        width: 100%;
    }
    
    /* 积分显示 */
    .points-card {
        padding: 20px;
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .points-icon {
        font-size: 3em;
    }
    
    .points-value {
        font-size: 2.5em;
    }
    
    /* 行为按钮 */
    .behaviors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .behavior-btn {
        padding: 15px 10px;
    }
    
    .behavior-icon {
        font-size: 1.8em;
    }
    
    .behavior-name {
        font-size: 0.9em;
    }
    
    /* 成就区域 */
    .achievements-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 12px;
    }
    
    .achievement-card {
        padding: 15px;
    }
    
    /* 兑换区域 */
    .rewards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .reward-card {
        padding: 15px;
    }
    
    .reward-icon {
        font-size: 2.5em;
    }
    
    /* 统计卡片 */
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card-mini {
        padding: 12px;
    }
    
    .stat-card-mini .stat-num {
        font-size: 1.5em;
    }
    
    /* 排行榜 */
    .podium {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .podium-item {
        order: unset !important;
        transform: none !important;
        width: 90%;
        margin-bottom: 10px;
    }
    
    .podium-avatar {
        font-size: 2.5em;
    }
    
    /* 记录页面 */
    .records-list {
        padding: 15px;
    }
    
    .record-item {
        padding: 12px;
        flex-direction: column;
        text-align: center;
    }
    
    .record-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .record-points {
        margin-top: 10px;
    }
    
    /* 成就页面 */
    .achievement-full-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .achievement-icon-large {
        font-size: 2.5em;
    }
    
    /* 底部 */
    .main-footer {
        padding: 20px;
        font-size: 1em;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    body {
        padding: 8px;
        font-size: 13px;
    }
    
    h1 { 
        font-size: 1.4em; 
    }
    
    h2 { 
        font-size: 1.2em; 
    }
    
    .main-nav {
        flex-direction: column;
    }
    
    .nav-btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .behaviors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .behavior-btn {
        padding: 12px 8px;
    }
    
    .rewards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-card-mini {
        padding: 10px;
    }
    
    .stat-card-mini .stat-num {
        font-size: 1.3em;
    }
    
    .kid-card {
        padding: 15px;
    }
    
    .avatar {
        font-size: 3.5em;
    }
    
    .play-btn {
        padding: 12px 30px;
        font-size: 1.1em;
        width: 100%;
    }
}

/* 横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .kid-card {
        width: calc(50% - 10px);
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .behaviors-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .rewards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .kid-card:hover,
    .feature-card:hover,
    .behavior-btn:hover,
    .reward-card:hover,
    .pet-btn:hover,
    .checkin-btn:hover,
    .nav-btn:hover,
    .play-btn:hover {
        transform: none;
    }
    
    .kid-card:active,
    .feature-card:active,
    .behavior-btn:active,
    .reward-card:active,
    .pet-btn:active,
    .checkin-btn:active,
    .nav-btn:active,
    .play-btn:active {
        transform: scale(0.98);
    }
    
    /* 增加触摸目标大小 */
    .behavior-btn,
    .pet-btn,
    .checkin-btn,
    .nav-btn,
    .play-btn,
    .exchange-btn {
        min-height: 44px;
    }
    
    .back-btn {
        padding: 12px 25px;
    }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .kid-card,
    .feature-card,
    .pet-card,
    .checkin-card,
    .points-card,
    .reward-card,
    .achievement-card,
    .record-item,
    .ranking-item,
    .podium-item,
    .achievement-full-card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .kid-card:hover,
    .feature-card:hover,
    .reward-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f0f0f0;
        --text-light: #b0b0b0;
        --card-bg: rgba(40, 40, 40, 0.95);
        --bg-gradient: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #2a2a2a 100%);
    }
    
    body {
        background: var(--bg-gradient);
        color: var(--text-dark);
    }
    
    .kid-card,
    .feature-card,
    .checkin-card,
    .reward-card,
    .achievement-card,
    .record-item,
    .ranking-item,
    .podium-item,
    .achievement-full-card,
    .stat-card-mini {
        background: var(--card-bg);
    }
    
    .pet-card {
        background: linear-gradient(135deg, #3a3a2a, #2a2a1a);
    }
    
    .points-card {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
    }
    
    .progress-bar,
    .stat-bar,
    .exp-bar,
    .progress-bar-mini,
    .progress-bar-full {
        background: #444;
    }
    
    .back-btn,
    .nav-btn,
    .records-btn {
        background: #333;
        color: var(--primary-light);
    }
    
    .back-btn:hover,
    .nav-btn:hover,
    .records-btn:hover {
        background: var(--primary);
        color: white;
    }
}

/* 等级升级动画 */
@keyframes levelUp {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(124, 77, 255, 0.6); }
    30% { transform: scale(1.15); box-shadow: 0 0 30px 10px rgba(124, 77, 255, 0.4); }
    60% { transform: scale(0.95); box-shadow: 0 0 20px 5px rgba(255, 215, 0, 0.4); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(124, 77, 255, 0); }
}

.level-up-effect {
    animation: levelUp 1.2s ease-out;
}

/* 成就解锁动画 */
@keyframes unlockAchievement {
    0% { opacity: 0; transform: translateY(20px) scale(0.8); }
    50% { opacity: 1; transform: translateY(-5px) scale(1.05); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.achievement-full-card.just-unlocked {
    animation: unlockAchievement 0.6s ease-out;
    border: 3px solid #FFD700 !important;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5) !important;
}

/* 宠物退化提示 */
@keyframes petHungry {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(3deg); }
    75% { transform: rotate(-3deg); }
}

.pet-stat.low {
    animation: petHungry 0.5s infinite;
}

/* 积分变化动画 */
@keyframes pointsPopup {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-60px) scale(1.3); }
}

.points-popup {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    font-size: 2em;
    font-weight: bold;
    animation: pointsPopup 1.2s ease-out forwards;
}

.points-popup.positive {
    color: var(--success);
}

.points-popup.negative {
    color: var(--danger);
}

/* 渐变彩带背景（高分成就） */
.achievement-full-card.golden {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 25%, #FFF8E1 50%, #FFECB3 75%, #FFF8E1 100%) !important;
    background-size: 200% 200%;
    animation: goldenShine 2s linear infinite;
}

@keyframes goldenShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* 统计卡片样式 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card-mini {
    background: white;
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.stat-card-mini:hover {
    transform: translateY(-3px);
}

.stat-card-mini.sub {
    border: 2px solid var(--danger);
}

.stat-card-mini .stat-icon {
    font-size: 1.5em;
    display: block;
    margin-bottom: 5px;
}

.stat-card-mini .stat-num {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary);
    display: block;
}

.stat-card-mini.sub .stat-num {
    color: var(--danger);
}

.stat-card-mini .stat-label {
    font-size: 0.9em;
    color: var(--text-light);
    display: block;
}

/* 签到按钮样式 */
.btn-reward {
    background: rgba(255, 255, 255, 0.3);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    margin-left: 10px;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card-mini {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card-mini .stat-num {
        font-size: 1.5em;
    }
}
/* ==================== 积分兑换中心样式 ==================== */

.exchange-center {
    margin-bottom: 30px;
}

.exchange-header {
    text-align: center;
    margin-bottom: 25px;
}

.exchange-header h1 {
    color: var(--primary);
    margin-bottom: 10px;
}

.exchange-balance {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.balance-amount {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
}

.balance-label {
    font-size: 1.1em;
    opacity: 0.9;
}

.exchange-categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.category-btn {
    background: white;
    border: 2px solid var(--primary-light);
    border-radius: 20px;
    padding: 10px 25px;
    font-size: 1em;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.exchange-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.exchange-item {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.exchange-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.exchange-item.hot {
    border: 2px solid #FF6B6B;
}

.exchange-item.new {
    border: 2px solid #4ECDC4;
}

.hot-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FF6B6B;
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4ECDC4;
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.exchange-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.exchange-name {
    font-size: 1.1em;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: bold;
}

.exchange-description {
    font-size: 0.9em;
    color: var(--text-light);
    margin-bottom: 12px;
    min-height: 40px;
}

.exchange-cost {
    font-size: 1.3em;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 15px;
}

.exchange-cost span {
    font-size: 0.9em;
    color: var(--text-light);
    margin-left: 5px;
}

.exchange-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.exchange-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 15px;
    padding: 10px 20px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.exchange-btn:hover {
    transform: scale(1.05);
}

.exchange-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.exchange-btn.disabled:hover {
    transform: none;
}

.details-btn {
    background: white;
    border: 2px solid var(--primary-light);
    color: var(--primary);
    border-radius: 15px;
    padding: 10px 15px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
}

.details-btn:hover {
    background: var(--primary-light);
    color: white;
}

.exchange-history {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.history-header h3 {
    color: var(--text-dark);
}

.clear-history {
    background: #FFEBEE;
    color: var(--danger);
    border: 2px solid var(--danger);
    border-radius: 15px;
    padding: 8px 15px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-history:hover {
    background: var(--danger);
    color: white;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.history-item:last-child {
    border-bottom: none;
}

.history-icon {
    font-size: 1.8em;
    margin-right: 15px;
    color: var(--primary);
}

.history-details {
    flex: 1;
}

.history-name {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.history-time {
    font-size: 0.85em;
    color: var(--text-light);
}

.history-cost {
    font-weight: bold;
    color: var(--danger);
}

.no-history {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.no-history-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

/* 移动端积分兑换中心优化 */
@media (max-width: 768px) {
    .exchange-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .exchange-item {
        padding: 15px;
    }
    
    .exchange-icon {
        font-size: 2.5em;
    }
    
    .exchange-cost {
        font-size: 1.2em;
    }
    
    .exchange-actions {
        flex-direction: column;
    }
    
    .exchange-btn,
    .details-btn {
        width: 100%;
    }
    
    .exchange-categories {
        gap: 10px;
    }
    
    .category-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .exchange-balance {
        padding: 15px;
    }
    
    .balance-amount {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .exchange-grid {
        grid-template-columns: 1fr;
    }
    
    .exchange-categories {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==================== 增强宠物模块样式 ==================== */

.pet-enhanced {
    margin-bottom: 30px;
}

.pet-header {
    text-align: center;
    margin-bottom: 25px;
}

.pet-header h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

.pet-status {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.pet-info-enhanced {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pet-avatar-enhanced {
    font-size: 5em;
    position: relative;
}

.pet-level-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

.pet-details {
    flex: 1;
    min-width: 200px;
}

.pet-name {
    font-size: 1.8em;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.pet-type {
    color: var(--text-light);
    font-size: 1em;
    margin-bottom: 15px;
}

.pet-stats-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.pet-stat-enhanced {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.stat-label-enhanced {
    font-size: 0.9em;
    color: var(--text-light);
    margin-bottom: 8px;
    display: block;
}

.stat-value-enhanced {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
    display: block;
}

.stat-progress {
    margin-top: 10px;
}

.pet-actions-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.pet-action-btn {
    background: white;
    border: none;
    border-radius: 15px;
    padding: 15px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.pet-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.pet-action-btn.feed {
    background: linear-gradient(135deg, #FF9800, #FFC107);
    color: white;
}

.pet-action-btn.play {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: white;
}

.pet-action-btn.train {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
}

.pet-action-btn.rest {
    background: linear-gradient(135deg, #2196F3, #03A9F4);
    color: white;
}

.pet-action-icon {
    font-size: 2em;
}

.pet-action-label {
    font-size: 0.9em;
    font-weight: bold;
}

.pet-action-cost {
    font-size: 0.8em;
    opacity: 0.9;
}

.pet-missions {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.missions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.missions-header h3 {
    color: var(--text-dark);
}

.refresh-missions {
    background: var(--primary-light);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 8px 15px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
}

.refresh-missions:hover {
    background: var(--primary);
}

.missions-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.mission-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mission-icon {
    font-size: 2em;
    color: var(--primary);
}

.mission-details {
    flex: 1;
}

.mission-name {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.mission-description {
    font-size: 0.9em;
    color: var(--text-light);
    margin-bottom: 8px;
}

.mission-reward {
    font-size: 0.9em;
    color: var(--success);
    font-weight: bold;
}

.mission-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mission-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 15px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s;
}

.mission-btn:hover {
    transform: scale(1.05);
}

.mission-btn.completed {
    background: var(--success);
}

/* 移动端宠物模块优化 */
@media (max-width: 768px) {
    .pet-info-enhanced {
        flex-direction: column;
        text-align: center;
    }
    
    .pet-avatar-enhanced {
        font-size: 4em;
    }
    
    .pet-stats-enhanced {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .pet-actions-enhanced {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .pet-action-btn {
        padding: 12px;
    }
    
    .pet-action-icon {
        font-size: 1.8em;
    }
    
    .missions-list {
        grid-template-columns: 1fr;
    }
    
    .mission-item {
        flex-direction: column;
        text-align: center;
    }
    
    .mission-icon {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .pet-stats-enhanced {
        grid-template-columns: 1fr;
    }
    
    .pet-actions-enhanced {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pet-action-btn {
        padding: 10px;
    }
    
    .pet-action-label {
        font-size: 0.85em;
    }
}

/* ==================== 通用工具类 ==================== */

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 骨架屏 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--text-dark);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9em;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-dark) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 空状态 */
.empty-state-enhanced {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-light);
}

.empty-icon-enhanced {
    font-size: 4em;
    margin-bottom: 20px;
    display: block;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.empty-description {
    font-size: 1em;
    margin-bottom: 25px;
}

.empty-action {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 20px;
    padding: 12px 30px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.empty-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    background: white;
    border: 2px solid var(--primary-light);
    border-radius: 10px;
    padding: 8px 15px;
    font-size: 0.9em;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover {
    background: var(--primary-light);
    color: white;
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    background: white;
    color: var(--text-dark);
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 8px;
}

.badge.success {
    background: #E8F5E9;
    color: var(--success);
}

.badge.warning {
    background: #FFF3CD;
    color: var(--warning);
}

.badge.danger {
    background: #F8D7DA;
    color: var(--danger);
}

.badge.info {
    background: #D1ECF1;
    color: #0C5460;
}

.badge.primary {
    background: var(--primary-light);
    color: var(--primary);
}

/* 卡片网格布局 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.grid-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* 移动端卡片网格优化 */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .grid-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}