/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f8f8;
    color: #333;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-y: auto;
}

/* 导航栏样式 */
.nav-title {
    font-size: 18px;
    font-weight: 600;
}

/* 卡片样式 */
.card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 评级样式 */
.rating-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rating-label {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    min-width: 30px;
}

/* 手机容器样式 */
.phone-container {
    width: 390px; /* iPhone 15 Pro 宽度 */
    height: 844px; /* iPhone 15 Pro 高度 */
    background-color: white;
    border-radius: 44px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin: 0px;
    display: inline-block;
}

/* 状态栏样式 */
.status-bar {
    height: 44px;
    background-color: #000;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-size: 14px;
}

/* 标签栏样式 */
.tab-bar {
    height: 83px;
    background-color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid #e0e0e0;
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #8e8e93;
    font-size: 10px;
}

.tab-item.active {
    color: #007aff;
}

.tab-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.content-area {
    height: calc(844px - 44px - 83px);
    overflow: hidden;
}

/* 首页样式 */
.character-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

/* 轮播图样式 */
.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
}

.carousel-slides {
    position: relative;
    height: 200px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: none;
}

.carousel-slide.active {
    opacity: 1;
    display: block;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    text-align: left;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.carousel-indicator.active {
    background-color: white;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* 陪伴页面样式 */
.character-container {
    height: 300px;
    background: linear-gradient(180deg, #e0f2fe 0%, #f8f8f8 100%);
    border-radius: 0 0 24px 24px;
    position: relative;
}

.interaction-bubble {
    background-color: white;
    border-radius: 20px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: 80%;
    margin-bottom: 12px;
}

.user-bubble {
    background-color: #007aff;
    color: white;
    border-radius: 20px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: 80%;
    margin-left: auto;
    margin-bottom: 12px;
}

.interaction-options {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    padding: 12px 16px;
}

.option-button {
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    margin-right: 8px;
    white-space: nowrap;
}

/* 成长页面样式 */
.skill-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-badge {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border: 2px solid #f0f0f0;
}

/* 技能书样式 */
.category-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}
.category-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}
.category-tab {
    padding: 10px 20px;
    white-space: nowrap;
    position: relative;
    color: #666;
}
.category-tab.active {
    color: #007aff;
    font-weight: 600;
}
.category-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background-color: #007aff;
    border-radius: 3px;
}

/* 二级筛选样式 */
.subcategory-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}
.subcategory-tabs::-webkit-scrollbar {
    display: none;
}
.subcategory-tab {
    padding: 6px 12px;
    margin: 0 4px;
    border-radius: 16px;
    white-space: nowrap;
    font-size: 13px;
    background-color: #f0f0f0;
    color: #666;
}
.subcategory-tab.active {
    background-color: #007aff;
    color: white;
}

/* 内容项样式 */
.content-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
}
.content-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}
.free-badge {
    background-color: #e6f7ff;
    color: #0091ff;
}
.premium-badge {
    background-color: #fff3e0;
    color: #ff9800;
}
.added-badge {
    background-color: #e8f5e9;
    color: #4caf50;
}

/* 个人中心页面样式 */
.profile-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 0 0 24px 24px;
    padding: 20px;
    color: white;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 40px;
    border: 3px solid white;
    object-fit: cover;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}