/* 定义少儿APP的主题色彩 */
:root {
    --primary-color: #FF6B6B; /* 主色调：温暖友好的粉红色 */
    --secondary-color: #4ECDC4; /* 辅助色：清新的蓝绿色 */
    --accent-color: #FFD166; /* 强调色：明亮的黄色 */
    --success-color: #6BCB77; /* 成功色：柔和的绿色 */
    --warning-color: #FFB347; /* 警告色：橙色 */
    --danger-color: #FF6B6B; /* 危险色：鲜明的红色 */
    --text-primary: #333333; /* 主要文本颜色 */
    --text-secondary: #666666; /* 次要文本颜色 */
    --background-light: #FFFFFF; /* 背景浅色 */
    --background-medium: #F7F9FC; /* 中等背景色 */
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 卡片阴影 */
}

/* 自定义动画效果 */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-soft {
    animation: bounce 2s infinite ease-in-out;
}

/* 自定义按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-radius: 9999px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border-radius: 9999px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(78, 205, 196, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(78, 205, 196, 0.4);
}

/* 自定义卡片样式 */
.kid-card {
    background-color: var(--background-light);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* 底部导航栏 */
.bottom-nav {
    background-color: var(--background-light);
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 15px);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(229, 231, 235, 0.5);
}

/* 导航项样式 */
.nav-item {
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-item:active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

.nav-item.active .nav-icon-container {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.nav-icon-container {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    will-change: transform;
}

.nav-item:hover .nav-icon-container {
    transform: translateY(-5px);
}

/* 自定义徽章 */
.badge {
    background-color: var(--accent-color);
    color: var(--text-primary);
    border-radius: 9999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 单词卡片特效 */
.word-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background-color: white;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.word-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* 进度条样式 */
.progress-bar {
    height: 10px;
    border-radius: 5px;
    background-color: #E9ECEF;
    overflow: hidden;
}

.progress-value {
    height: 100%;
    border-radius: 5px;
    background-color: var(--primary-color);
    transition: width 0.5s ease-in-out;
}

/* 奖励星星样式 */
.star {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin: 0 0.2rem;
    filter: drop-shadow(0 0 2px rgba(255, 209, 102, 0.5));
}

/* 自定义iPhone底部横条 */
.iphone-home-indicator {
    width: 120px;
    height: 5px;
    background-color: #D1D5DB;
    border-radius: 100px;
    margin: 8px auto;
}

/* 页面容器 */
.page-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: var(--background-medium);
    position: relative;
}

/* 页面内容区域 - 考虑底部导航的高度 */
.page-content {
    flex: 1;
    padding: 1rem 1.5rem;
    padding-bottom: 6rem; /* 为增高的底部导航留出更多空间 */
    overflow-y: auto;
}

/* 自定义滚动条 */
.page-content::-webkit-scrollbar {
    width: 4px;
}

.page-content::-webkit-scrollbar-track {
    background: transparent;
}

.page-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* 标题字体 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', 'Helvetica', sans-serif;
}

/* 角标提示 */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 创建感觉更像应用的状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* 动物图标旋转动画 */
.animal-icon {
    transition: transform 0.5s ease;
}

.animal-icon:hover {
    transform: rotate(15deg) scale(1.1);
} 