:root {
    --primary-color: #3b82f6;
    --secondary-color: #10b981;
    --accent-color: #8b5cf6;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --header-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --floating-gradient: linear-gradient(135deg, #60a5fa, #a78bfa);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    padding-top: 3rem;
    padding-bottom: 80px;
    overflow-x: hidden;
}

/* 顶部导航栏 - 浮动设计 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3rem;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--text-primary);
    font-size: 18px;
}

.page-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin: 0 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--text-primary);
    font-size: 18px;
}

/* 课程头部 - 浮动卡片设计 */
.course-header-float {
    background: var(--header-gradient);
    color: white;
    padding: 24px 20px;
    border-radius: 24px;
    margin: 0 20px 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    transform: translateY(-20px);
    z-index: 10;
}

.course-header-float::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.course-header-content {
    position: relative;
    z-index: 1;
}

.course-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.course-tag {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.course-description {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.primary-btn {
    background: white;
    color: var(--primary-color);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 学期导航 - 滑动标签设计 */
.semester-tabs {
    display: flex;
    background: transparent;
    padding: 0 20px;
    margin-bottom: 24px;
    position: relative;
}

.semester-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--border-color);
}

.semester-tab {
    padding: 12px 20px;
    font-weight: 500;
    font-size: 16px;
    color: var(--text-secondary);
    position: relative;
    transition: all 0.3s ease;
}

.semester-tab.active {
    color: var(--primary-color);
}

.semester-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

/* 课程列表 - 流式布局 */
.section-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 20px 20px;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.lessons-stream {
    padding: 0 20px 20px;
}

.lesson-stream-item {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.lesson-stream-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--floating-gradient);
}

.lesson-stream-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.lesson-stream-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.lesson-stream-number {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--floating-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-right: 16px;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.lesson-stream-title {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.lesson-stream-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

.lesson-stream-content {
    margin-bottom: 20px;
}

.lesson-stream-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.lesson-stream-meta {
    display: flex;
    gap: 20px;
}

.stream-meta-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.stream-meta-item i {
    margin-right: 6px;
    color: var(--primary-color);
}

.lesson-stream-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.lesson-stream-week {
    font-size: 13px;
    color: var(--text-secondary);
}

.lesson-stream-tags {
    display: flex;
    gap: 8px;
}

.lesson-stream-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.05);
    color: var(--primary-color);
    font-weight: 500;
}

.lesson-stream-action {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--floating-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.lesson-stream-action:hover {
    transform: scale(1.05);
}

/* 教学资源 - 卡片流设计 */
.resources-stream {
    margin: 0 20px 24px;
}

.resource-stream-item {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.resource-stream-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.resource-stream-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.resource-stream-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 16px;
}

.icon-blue-stream {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.icon-green-stream {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}

.icon-yellow-stream {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.resource-stream-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.resource-stream-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.resource-stream-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.resource-stream-btn {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-blue-stream {
    background: var(--floating-gradient);
    color: white;
}

.btn-green-stream {
    background: linear-gradient(135deg, var(--secondary-color), #34d399);
    color: white;
}

.btn-yellow-stream {
    background: linear-gradient(135deg, #eab308, #facc15);
    color: white;
}

/* 学习建议 - 对话气泡设计 */
.suggestions-bubbles {
    margin: 0 20px 24px;
}

.bubble-item {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.bubble-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.bubble-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.bubble-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 12px;
}

.icon-blue-bubble {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.icon-green-bubble {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}

.bubble-title {
    font-size: 16px;
    font-weight: 700;
}

.bubble-list {
    list-style: none;
}

.bubble-item-list {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-left: 8px;
}

.bubble-item-list:last-child {
    margin-bottom: 0;
}

.bubble-bullet {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-right: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.bubble-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--card-bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

/* 装饰元素 */
.floating-element {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}

.float-1 {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    top: -40px;
    right: -40px;
}

.float-2 {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    bottom: -30px;
    left: -30px;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* 添加.pt-16样式 */
.pt-16 {
    padding-top: 0.5rem;
}