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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fa;
}

/* 应用容器 */
.app-container {
    max-width: 640px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    overflow-x: hidden;
}

/* 顶部导航栏 */
.app-header {
    height: 48px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #f0f2f5;
}

.app-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 主要内容区域 */
.app-main {
    flex: 1;
    padding-bottom: 120px; /* 为底部导航栏和悬浮栏留出充足空间 */
    background-color: #f8f9fa;
}

/* 底部导航栏 */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border-top: 1px solid #f0f2f5;
    height: 65px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.bottom-nav {
    display: flex;
    height: 100%;
    padding: 8px 0;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #909399;
    font-size: 11px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
}

.nav-item.active {
    color: #1677ff;
}

.nav-item .nav-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: currentColor;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 活跃状态的图标动画 */
.nav-item.active .nav-icon {
    transform: translateY(-3px) scale(1.15);
    fill: #1677ff;
}

/* 导航文本动画 */
.nav-item.active span {
    font-weight: 600;
    transform: translateY(-2px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 活跃状态的底部装饰 */
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 4px;
    background: linear-gradient(135deg, #1677ff, #4096ff);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 导航项悬停效果 */
.nav-item:hover {
    color: #1677ff;
    background: rgba(22, 119, 255, 0.03);
}

/* 导航图标SVG样式 */
.nav-item svg {
    width: 100%;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: #1677ff;
    color: #fff;
}

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

.btn-secondary {
    background-color: #fff;
    color: #1677ff;
    border: 2px solid #1677ff;
}

.btn-secondary:hover {
    background-color: #1677ff;
    color: #fff;
    transform: translateY(-2px);
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 6px;
    margin-bottom: 6px;
}

.tag-hot {
    background-color: #fff5f5;
    color: #e74c3c;
}

.tag-new {
    background-color: #e3f2fd;
    color: #2196f3;
}

.tag-free {
    background-color: #e8f5e8;
    color: #4caf50;
}

/* 分隔线 */
.divider {
    height: 8px;
    background-color: #f8f9fa;
    margin: 16px 0;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 首页样式 */
.home-container {
    padding: 0 15px;
}

/* 顶部通知栏 */
.top-notice {
    background: #1677ff;
    color: white;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 14px;
}

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

.notice-icon {
    margin-right: 10px;
    font-size: 16px;
}

.notice-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-more {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

/* 轮播图 */
.banner-slider {
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
}

.slider-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* 权益详情区 */
.benefits-section {
    margin: 20px 0;
}

.benefits-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.benefit-item {
    display: flex;
    align-items: center;
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
}

.benefit-icon {
    font-size: 24px;
    margin-right: 15px;
}

.benefit-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.benefit-content p {
    font-size: 14px;
    color: #666;
}

/* 精品课程预览 */
.courses-preview {
    margin: 20px 0;
}

.courses-preview h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.courses-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.course-cover img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.course-info {
    padding: 15px;
}

.course-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.course-teacher {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.course-duration, .course-level {
    font-size: 13px;
    color: #999;
    margin-bottom: 3px;
}

/* 底部悬浮按钮 */
.fixed-footer {
    position: fixed;
    bottom: 65px;
    left: 0;
    right: 0;
    max-width: 640px;
    margin: 0 auto;
    padding: 4px 16px;
    display: flex;
    gap: 10px;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 99;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.customer-service {
    flex: 0 0 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #1677ff;
}

.customer-service div {
    font-size: 24px;
    margin-bottom: 4px;
}

.customer-service span {
    font-size: 12px;
}

/* 课程页样式 */
.courses-container {
    padding: 0 15px;
}

/* 顶部资产区 */
.assets-section {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.assets-info h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.coupon-count {
    color: #e53e3e;
}

.coupon-link {
    font-size: 14px;
    color: #1677ff;
    text-decoration: none;
}

/* 课程列表 */
.course-meta {
    display: flex;
    gap: 10px;
    margin: 8px 0;
    font-size: 13px;
    color: #999;
}

.course-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.redeem-btn {
    background-color: #fff;
    color: #1677ff;
    border: 1px solid #1677ff;
}

.study-btn {
    background-color: #1677ff;
    color: #fff;
}

/* 个人中心样式 */
.profile-container {
    padding: 0 15px;
}

/* 用户信息卡 */
.user-card {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.user-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 3px;
}

.user-tag {
    font-size: 12px;
    color: #1677ff;
    background-color: rgba(22, 119, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.renew-btn button {
    background-color: #1677ff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* 资产看板 */
.assets-board {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.asset-item {
    flex: 1;
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.asset-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.asset-label {
    font-size: 14px;
    color: #666;
}

/* 功能列表 */
.feature-list {
    margin: 20px 0;
}

.feature-section {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

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

.feature-icon {
    font-size: 20px;
    margin-right: 15px;
    color: #666;
}

.feature-name {
    flex: 1;
    font-size: 15px;
    color: #333;
}

.icon-arrow {
    font-size: 16px;
    color: #999;
}

/* 图标样式 */
.icon {
    font-style: normal;
}

.icon-home:before {
    content: "🏠";
}

.icon-course:before {
    content: "📚";
}

.icon-profile:before {
    content: "👤";
}

.icon-service:before {
    content: "💬";
}

.icon-arrow:before {
    content: "→";
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-main {
        padding-bottom: 120px;
    }
    
    .fixed-footer {
        padding: 4px 16px;
    }
}

@media (max-width: 375px) {
    .app-main {
        padding-bottom: 110px;
    }
    
    .fixed-footer {
        padding: 4px 10px;
        bottom: 65px;
    }
    
    .subscribe-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}