:root {
    --primary: #22C993;
    --primary-dark: #0FAF7A;
    --gold: #C6935E;
    --gold-dark: #8B5E3C;
    --orange: #FF6B35;
    --red: #FF4D4F;
    --bg: #F5F7FA;
    --card: #FFFFFF;
    --text: #1A1A1A;
    --text-secondary: #666666;
    --text-light: #999999;
    --border: #EEEEEE;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.page {
    max-width: 540px;
    margin: 0 auto;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* 顶部标题栏 */
.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.header-brand {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.header-slogan {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.header-actions {
    display: flex;
    gap: 16px;
}

.header-action {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
}

.icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 福利条 */
.promo-bar {
    margin: 12px 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--red) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.2);
}

.promo-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.promo-title {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
}

.promo-desc {
    font-size: 12px;
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.promo-btn {
    background: #fff;
    color: var(--red);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    margin-left: 10px;
}

/* VIP 推广条 */
.vip-promo-bar {
    margin: 0 16px 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3A2A1A 0%, #5C4033 100%);
    color: #FFD4A7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vip-promo-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.vip-promo-text {
    display: flex;
    flex-direction: column;
}

.vip-promo-title {
    font-size: 15px;
    font-weight: 700;
}

.vip-promo-desc {
    font-size: 12px;
    opacity: 0.8;
}

.vip-promo-btn {
    background: linear-gradient(135deg, #FFD4A7 0%, #E6B88A 100%);
    color: #3A2A1A;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    margin-left: 10px;
}

/* Banner */
.banner-section {
    margin: 0 16px 12px;
    position: relative;
}

.banner-swiper {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.banner-slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.banner-slide.active {
    opacity: 1;
}

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

.banner-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 24px;
    color: #fff;
}

.banner-fallback-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.banner-fallback-desc {
    font-size: 13px;
    opacity: 0.95;
    margin-bottom: 12px;
}

.banner-fallback-btn {
    display: inline-block;
    width: fit-content;
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.5);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
}

.banner-dot.active {
    width: 14px;
    border-radius: 3px;
    background: #fff;
}

/* 公告 */
.notice-bar {
    margin: 0 16px 12px;
    padding: 10px 14px;
    background: #FFF8F0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notice-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    flex-shrink: 0;
}

.notice-swiper {
    flex: 1;
    height: 22px;
    overflow: hidden;
    position: relative;
}

.notice-item {
    height: 22px;
    line-height: 22px;
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s ease;
}

.notice-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* 快捷入口 */
.entry-grid {
    margin: 0 16px 12px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 8px;
}

.entry-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.entry-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
}

.entry-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 通用区块 */
.section {
    margin: 0 16px 12px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.section-subtitle {
    font-size: 12px;
    color: var(--text-light);
}

.section-more {
    font-size: 13px;
    color: var(--text-light);
}

/* 成长路径 */
.level-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
}

.level-list {
    display: flex;
    gap: 10px;
    width: max-content;
}

.level-item {
    width: 110px;
    padding: 14px;
    background: #F8F9FA;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.level-badge {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.level-name {
    font-size: 14px;
    font-weight: 600;
}

.level-price {
    font-size: 13px;
    color: var(--red);
    font-weight: 600;
}

.level-tag {
    font-size: 11px;
    color: var(--text-light);
}

/* 课程 */
.course-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-item {
    display: flex;
    gap: 12px;
}

.course-cover {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}

.course-cover--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.course-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.course-subtitle {
    font-size: 12px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.course-tags {
    display: flex;
    gap: 6px;
}

.course-tag {
    font-size: 11px;
    color: var(--primary-dark);
    background: #E8F9F3;
    padding: 2px 6px;
    border-radius: 4px;
}

.course-price {
    font-size: 14px;
    color: var(--red);
    font-weight: 700;
}

.course-free {
    font-size: 14px;
    color: var(--primary);
    font-weight: 700;
}

/* 导师 */
.mentor-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
}

.mentor-list {
    display: flex;
    gap: 14px;
    width: max-content;
}

.mentor-item {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mentor-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
}

.mentor-avatar--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}

.mentor-name {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.mentor-title {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* 案例 */
.case-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.case-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.case-cover {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
}

.case-cover--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.case-title {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.case-desc {
    font-size: 12px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* VIP CTA */
.vip-section {
    margin: 0 16px 12px;
    padding: 18px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3A2A1A 0%, #5C4033 100%);
    color: #FFD4A7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vip-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.vip-desc {
    font-size: 12px;
    opacity: 0.85;
}

.vip-btn {
    background: linear-gradient(135deg, #FFD4A7 0%, #E6B88A 100%);
    color: #3A2A1A;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    margin-left: 12px;
}

/* 底部固定栏 */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 540px;
    margin: 0 auto;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

.bottom-bar-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.bottom-bar-text strong {
    color: var(--text);
    font-weight: 700;
}

.bottom-bar-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 22px;
    border: none;
}

/* 弹层 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 280px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.modal-qr {
    width: 160px;
    height: 160px;
    margin: 0 auto 16px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 12px;
}

.modal-close {
    color: var(--text-light);
    font-size: 13px;
    padding: 8px 20px;
}

/* 加载/空态 */
.loading-tip {
    text-align: center;
    padding: 20px 0;
    color: var(--text-light);
    font-size: 13px;
}

.empty-tip {
    text-align: center;
    padding: 20px 0;
    color: var(--text-light);
    font-size: 13px;
}

/* 隐藏滚动条 */
.level-scroll::-webkit-scrollbar,
.mentor-scroll::-webkit-scrollbar {
    display: none;
}

/* 简单图标占位（用 emoji/文字兜底） */
.iconfont {
    font-style: normal;
}
