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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    padding-bottom: 60px;
}

/* 头部导航栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title {
    font-size: 18px;
    font-weight: bold;
}

.header-icons span {
    margin-left: 15px;
    font-size: 18px;
}

.header-back {
    font-size: 18px;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #999;
}

.nav-item.active {
    color: #ff6b6b;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 3px;
}

.nav-text {
    font-size: 12px;
}

/* 主要内容区域 */
.main-content {
    padding: 1px;
}

/* 首页样式 */
.banner {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    border-radius: 10px;
    padding: 1px;
    margin-bottom: 20px;
    color: white;
    text-align: center;
}

.banner h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.category-section {
    margin-bottom: 20px;
}

.category-section h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.category-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 10px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
}

.category-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.category-name {
    font-size: 12px;
}

.course-section {
    margin-bottom: 20px;
}

.course-section h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.course-list {
    display: grid;
    grid-gap: 15px;
}

.course-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.course-image {
    height: 120px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.course-title {
    padding: 10px;
    font-weight: bold;
    font-size: 14px;
}

.course-tags {
    display: flex;
    padding: 0 10px;
    margin-bottom: 5px;
}

.tag {
    background-color: #ffebee;
    color: #f44336;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
}

.difficulty {
    font-size: 12px;
    color: #666;
}

.course-info,
.course-meta {
    display: flex;
    justify-content: space-between;
    padding: 0 10px 10px;
    font-size: 12px;
    color: #666;
}

.material {
    color: #4caf50;
    font-size: 12px;
}

.no-material {
    color: #999;
    font-size: 12px;
}

.points-section {
    margin-bottom: 20px;
}

.points-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.points-content h3 {
    margin-bottom: 5px;
}

.points-button {
    background-color: #ffd166;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
}

/* 课程中心样式 */
.search-bar {
    display: flex;
    padding: 15px 0;
    background-color: white;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
}

.search-bar button {
    padding: 10px 15px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 20px;
}

.category-filter {
    background-color: white;
    padding: 10px 0;
    margin-bottom: 15px;
}

.category-filter-list {
    display: flex;
    overflow-x: auto;
    padding: 0 10px;
}

.filter-item {
    padding: 5px 15px;
    margin-right: 10px;
    background-color: #f5f5f5;
    border-radius: 15px;
    font-size: 14px;
    white-space: nowrap;
}

.filter-item.active {
    background-color: #ff6b6b;
    color: white;
}

/* 课程详情样式 */
.course-detail .course-cover {
    height: 200px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

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

.course-header {
    background-color: white;
    padding: 15px;
    margin-bottom: 15px;
}

.course-header h1 {
    font-size: 18px;
    margin-bottom: 10px;
}

.course-stats {
    display: flex;
    margin-bottom: 10px;
}

.course-stats span {
    margin-right: 15px;
    font-size: 14px;
    color: #666;
}

.course-price .original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
}

.course-price .discount-price {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 18px;
}

.course-actions {
    display: flex;
    padding: 0 15px 15px;
    background-color: white;
    margin-bottom: 15px;
    gap: 10px;
}

.favorite-btn, .learn-btn, .share-btn {
    flex: 1;
    padding: 12px;
    border-radius: 5px;
    border: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn {
    background-color: #f5f5f5;
    color: #666;
    margin-right: 10px;
}

.favorite-btn.favorited {
    background-color: #ff6b6b;
    color: white;
}

.learn-btn {
    background-color: #ff6b6b;
    color: white;
    margin-right: 10px;
}

.share-btn {
    background-color: #4a90e2;
    color: white;
}

.favorite-btn:hover, .learn-btn:hover, .share-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.favorite-btn:active, .learn-btn:active, .share-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.course-content {
    background-color: white;
    padding: 15px;
    margin-bottom: 15px;
}

.course-content h2, .course-content h3 {
    margin: 15px 0 10px;
}

.course-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.video-container {
    margin: 15px 0;
}

.video-placeholder {
    height: 200px;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.video-placeholder:hover {
    background-color: #555;
}

.tutorial-steps .step {
    display: flex;
    margin-bottom: 20px;
}

.step-number {
    width: 24px;
    height: 24px;
    background-color: #ff6b6b;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-right: 10px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-image {
    height: 120px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin-bottom: 10px;
    border-radius: 5px;
}

.assignment-section {
    background-color: white;
    padding: 15px;
    margin-bottom: 15px;
}

.assignment-desc {
    margin-bottom: 15px;
}

.assignment-desc p {
    margin-bottom: 5px;
    color: #666;
}

.upload-btn {
    width: 100%;
    padding: 12px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
}

.comments-section {
    background-color: white;
    padding: 15px;
}

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

.more-link {
    color: #ff6b6b;
    font-size: 14px;
}

.comment-item {
    display: flex;
    margin-bottom: 15px;
}

.user-avatar {
    font-size: 30px;
    margin-right: 10px;
}

.comment-content {
    flex: 1;
}

.user-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.comment-rating {
    margin-bottom: 5px;
    font-size: 14px;
}

.comment-text {
    margin-bottom: 5px;
    color: #666;
    line-height: 1.4;
}

.comment-date {
    font-size: 12px;
    color: #999;
}

.add-comment textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    resize: none;
}

.add-comment button {
    padding: 10px 20px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 5px;
    float: right;
}

/* 粘土课程分类菜单样式 */
.category-menu {
    background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.category-menu .menu-level {
    margin-bottom: 25px;
}

.category-menu .menu-level:last-child {
    margin-bottom: 0;
}

.category-menu h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #5d4037;
    padding-bottom: 8px;
    border-bottom: 3px solid #d7ccc8;
    position: relative;
}

.category-menu h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
    border-radius: 3px;
}

.category-menu .menu-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 10px 0;
}

.category-menu .menu-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    padding: 12px 5px;
    border-radius: 12px;
    font-size: 14px;
    color: #5d4037;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    border: 1px solid #efebe9;
    text-align: center;
    font-weight: 500;
}

.category-menu .menu-item:hover {
    background: linear-gradient(135deg, #ff7b7b 0%, #ff9e6d 100%);
    color: white;
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
}

.category-menu .menu-item:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    transition: all 0.1s ease;
}

/* 更多按钮特殊样式 */
.category-menu .menu-item:last-child {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    font-weight: bold;
}

/* 个人中心样式 */
.user-profile {
    background-color: white;
    padding: 20px;
    margin-bottom: 15px;
}

.user-info {
    display: flex;
    align-items: center;
}

.avatar {
    font-size: 50px;
    margin-right: 15px;
}

.user-details {
    flex: 1;
}

.username {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.user-id {
    color: #999;
    font-size: 14px;
}

.points-display {
    text-align: center;
}

.points-label {
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.points-value {
    font-size: 20px;
    font-weight: bold;
    color: #ff6b6b;
}

.profile-menu .menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background-color: white;
    padding: 20px 0;
    margin-bottom: 15px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.menu-text {
    font-size: 12px;
}

.menu-list {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

.menu-row {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.menu-row:last-child {
    border-bottom: none;
}

.menu-row .menu-icon {
    font-size: 18px;
    margin-right: 10px;
}

.menu-row .menu-text {
    flex: 1;
    font-size: 16px;
}

.menu-arrow {
    color: #ccc;
}