/* 继续教育学习系统 - 自定义样式 */

/* ============================================
   CSS 变量定义
   ============================================ */
:root {
    /* 主色调 - 专业蓝色系 */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    /* 辅助色 - 橙色（强调/CTA） */
    --accent-400: #fb923c;
    --accent-500: #f97316;
    --accent-600: #ea580c;
    
    /* 成功色 */
    --success-500: #22c55e;
    --success-600: #16a34a;
    
    /* 中性色 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* ============================================
   基础样式
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   导航栏样式
   ============================================ */
.logo{
    width: 200px;
}
.logo img{
    display: block;
    width: 200px;
}
.navbar {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--accent-500);
    border-radius: 3px;
}

/* 专技通 AI：独立智能入口 */
.nav-actions {
    gap: 1rem;
    flex-shrink: 0;
}

.nav-actions > a {
    flex-shrink: 0;
    white-space: nowrap;
}

.ai-nav-cta {
    --ai-look-x: 0px;
    --ai-look-y: 0px;
    isolation: isolate;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 136px;
    height: 44px;
    padding: 0 0.8rem;
    overflow: hidden;
    color: #fff !important;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    background: rgba(8, 30, 92, 0.72);
    border: 1px solid rgba(125, 211, 252, 0.8);
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 14px rgba(34, 211, 238, 0.2);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.ai-nav-cta::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: -60%;
    left: -55%;
    width: 34%;
    height: 220%;
    transform: rotate(18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    opacity: 0;
}

.ai-nav-cta::after {
    content: '';
    position: absolute;
    right: 14px;
    bottom: 0;
    left: 14px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22d3ee, transparent);
    opacity: 0.7;
    transform: scaleX(0.62);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ai-nav-cta:hover,
.ai-nav-cta:focus-visible,
.ai-nav-cta.active {
    color: #fff !important;
    background: rgba(8, 32, 104, 0.88);
    border-color: #67e8f9;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 20px rgba(34, 211, 238, 0.4);
    transform: translateY(-1px);
}

.ai-nav-cta:hover::before,
.ai-nav-cta:focus-visible::before {
    animation: ai-nav-hover-scan 0.75s ease-out 1;
}

.ai-nav-cta:hover::after,
.ai-nav-cta:focus-visible::after,
.ai-nav-cta.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.ai-nav-cta:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.ai-nav-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    animation: ai-avatar-float 4.6s ease-in-out infinite;
}

.ai-nav-icon img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    transform: translate(var(--ai-look-x), var(--ai-look-y));
    filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.5));
    animation: ai-avatar-glow 3.2s ease-in-out infinite;
    transition: transform 0.2s ease-out;
}

.ai-nav-cta:hover .ai-nav-icon img,
.ai-nav-cta:focus-visible .ai-nav-icon img {
    transform: translate(var(--ai-look-x), var(--ai-look-y)) scale(1.08) rotate(-5deg);
}

@keyframes ai-avatar-float {
    0%, 100% { transform: translateY(1px); }
    50% { transform: translateY(-1px); }
}

@keyframes ai-avatar-glow {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(34, 211, 238, 0.35)); }
    50% { filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.8)); }
}

.ai-nav-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.ai-nav-ai {
    letter-spacing: .02em;
}

.ai-nav-purpose {
    color: #a5f3fc;
    font-size: 15px;
    font-weight: 600;
}

.ai-nav-status {
    position: relative;
    z-index: 1;
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin-left: auto;
    background: #67e8f9;
    border-radius: 50%;
    box-shadow: 0 0 8px #22d3ee;
    animation: ai-nav-status 2s ease-in-out infinite;
}

.ai-mobile-nav {
    color: rgba(255, 255, 255, 0.78) !important;
    text-decoration: none;
}

.ai-mobile-nav i {
    color: #a5f3fc;
    filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.65));
}

.ai-mobile-nav.active {
    color: #fff !important;
}

@keyframes ai-nav-hover-scan {
    0% { left: -55%; opacity: 0; }
    18% { opacity: 1; }
    100% { left: 130%; opacity: 0; }
}

@keyframes ai-nav-status {
    0%, 100% { opacity: 0.72; transform: scale(0.88); }
    50% { opacity: 1; transform: scale(1.12); }
}

@media (max-width: 767px) {
    .ai-nav-cta {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-nav-cta::before,
    .ai-nav-icon,
    .ai-nav-icon img,
    .ai-nav-status {
        animation: none !important;
    }

    .ai-nav-cta,
    .ai-nav-icon img {
        transition: none;
    }

    .ai-nav-icon img {
        transform: none !important;
    }
}

/* ============================================
   卡片样式
   ============================================ */
.card-course {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-100);
}

.card-course:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-course .card-img {
    height: 180px;
    object-fit: cover;
    width: 100%;
}

/* 微课封面完整呈现；角标独立成行，不遮挡原图内文字。 */
.micro-course-cover {
    display: grid;
    grid-template-columns: auto 1fr;
    background: #f3f6fb;
}

.card-course .micro-course-cover .card-img {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    object-position: center;
    transform: none !important;
}

.micro-course-cover > .absolute {
    position: static;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 10px;
    background: #fff;
}

.micro-course-cover > .left-3 { grid-column: 1; padding-right: 0; }
.micro-course-cover > .right-3 { grid-column: 2; justify-content: flex-end; }

.card-course .card-body {
    padding: 1.25rem;
}

.card-course .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-course .card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.card-course .card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-600);
}

.card-course .card-price small {
    font-size: 0.875rem;
    color: var(--gray-400);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

/* ============================================
   按钮样式
   ============================================ */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-600) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-600) 0%, #c2410c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary-600);
    border: 2px solid var(--primary-500);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-500);
    color: white;
}

/* ============================================
   进度条样式
   ============================================ */
.progress-bar-custom {
    background: var(--gray-200);
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
}

.progress-bar-custom .progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--primary-400) 0%, var(--primary-600) 100%);
    transition: width 0.5s ease;
}

.progress-bar-custom.success .progress-fill {
    background: linear-gradient(90deg, var(--success-500) 0%, var(--success-600) 100%);
}

/* ============================================
   标签/徽章样式
   ============================================ */
.badge-custom {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-700);
}

.badge-success {
    background: #dcfce7;
    color: var(--success-600);
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.badge-orange {
    background: #ffedd5;
    color: var(--accent-600);
}

/* ============================================
   Hero区域样式
   ============================================ */
.hero-section {
    background: var(--gradient-hero);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* ============================================
   视频播放器样式
   ============================================ */
.video-container {
    position: relative;
    background: #000;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.video-container video {
    width: 100%;
    display: block;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ============================================
   表单样式
   ============================================ */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

/* ============================================
   侧边栏样式
   ============================================ */
.sidebar {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.sidebar-item:hover {
    background: var(--gray-100);
    color: var(--primary-600);
}

.sidebar-item.active {
    background: var(--primary-50);
    color: var(--primary-600);
    font-weight: 600;
}

.sidebar-item i {
    width: 24px;
    margin-right: 0.75rem;
}

/* ============================================
   课程列表项样式
   ============================================ */
.course-list-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    border: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.course-list-item:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-sm);
}

.course-list-item.active {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.course-list-item .course-index {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    font-weight: 600;
    color: var(--gray-600);
    margin-right: 1rem;
    flex-shrink: 0;
}

.course-list-item.completed .course-index {
    background: var(--success-500);
    color: white;
}

.course-list-item.active .course-index {
    background: var(--primary-500);
    color: white;
}

/* ============================================
   统计卡片样式
   ============================================ */
.stat-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-icon.blue {
    background: var(--primary-100);
    color: var(--primary-600);
}

.stat-card .stat-icon.green {
    background: #dcfce7;
    color: var(--success-600);
}

.stat-card .stat-icon.orange {
    background: #ffedd5;
    color: var(--accent-600);
}

.stat-card .stat-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-card .stat-label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ============================================
   流程步骤样式
   ============================================ */
.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.step-connector {
    position: absolute;
    top: 32px;
    left: calc(50% + 40px);
    width: calc(100% - 80px);
    height: 3px;
    background: var(--gray-200);
}

.step-connector::after {
    content: '';
    position: absolute;
    right: -8px;
    top: -4px;
    border: 6px solid transparent;
    border-left-color: var(--gray-200);
}

/* ============================================
   二维码样式
   ============================================ */
.qrcode-box {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.qrcode-box .qrcode-img {
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
    border: 4px solid var(--gray-100);
    border-radius: var(--radius-lg);
}

/* ============================================
   动画
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-pulse-slow {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   响应式调整
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 1.5rem;
    }
    
    .step-connector {
        display: none;
    }
}

/* ============================================
   滚动条美化
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============================================
   链接卡片样式
   ============================================ */
.link-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
}

.link-card .link-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ============================================
   表格样式
   ============================================ */
.table-custom {
    width: 100%;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-custom th {
    background: var(--gray-50);
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
}

.table-custom td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
}

.table-custom tr:last-child td {
    border-bottom: none;
}

.table-custom tr:hover td {
    background: var(--gray-50);
}

/* ============================================
   Footer样式
   ============================================ */
.footer {
    background: var(--gray-800);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: white;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* ============================================
   专技通 AI 数字人悬浮入口
   ============================================ */
.ai-mascot-widget {
    --ai-mascot-width: 160px;
    position: fixed;
    /* 1280px 内容容器含 32px 内边距；在内容右侧留 16px 间隔。 */
    right: max(24px, calc(50vw - 794px), env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 950;
    display: flex;
    width: 170px;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

.ai-mascot-bubble {
    position: relative;
    display: flex;
    align-items: flex-start;
    box-sizing: border-box;
    width: 150px;
    margin: 0;
    padding: 10px 28px 10px 12px;
    color: var(--primary-800);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--primary-200);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(30, 64, 175, 0.12);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: auto;
}

.ai-mascot-question {
    color: var(--gray-500);
    font-weight: 400;
}

.ai-mascot-message {
    color: var(--primary-800) !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.65;
    text-decoration: none;
}

.ai-mascot-message:hover {
    color: var(--primary-600) !important;
}

.ai-mascot-dismiss {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 28px;
    height: 28px;
    color: var(--gray-400);
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.ai-mascot-dismiss:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

.ai-mascot-message:focus-visible,
.ai-mascot-dismiss:focus-visible,
.ai-mascot-character:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.95);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.5);
}

.ai-mascot-character {
    display: block;
    width: var(--ai-mascot-width);
    line-height: 0;
    transform-origin: 50% 100%;
    animation: ai-mascot-float 4.2s ease-in-out infinite;
    pointer-events: auto;
}

.ai-mascot-character img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 16px rgba(15, 23, 42, 0.2));
    transition: transform 0.22s ease, filter 0.22s ease;
}

.ai-mascot-character:hover img,
.ai-mascot-character:focus-visible img {
    animation: ai-mascot-greet 0.85s ease-in-out 1;
    transform: scale(1.04) rotate(-1deg);
    filter: drop-shadow(0 16px 22px rgba(37, 99, 235, 0.28));
}

.ai-mascot-widget.bubble-collapsed .ai-mascot-bubble {
    display: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

@keyframes ai-mascot-greet {
    0%, 100% { transform: scale(1.04) rotate(-1deg); }
    30% { transform: scale(1.04) rotate(-4deg); }
    65% { transform: scale(1.04) rotate(2deg); }
}

@keyframes ai-mascot-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(0.8deg); }
}

@media (max-width: 1439px) {
    .ai-mascot-widget {
        --ai-mascot-width: 144px;
        right: 18px;
        bottom: 16px;
    }

}

@media (max-width: 1023px) {
    .ai-mascot-widget {
        --ai-mascot-width: 128px;
        right: 14px;
        bottom: 12px;
        gap: 10px;
    }

}

@media (max-width: 767px) {
    .ai-mascot-widget {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-mascot-character,
    .ai-mascot-character img {
        animation: none !important;
        transform: none !important;
    }

    .ai-mascot-bubble,
    .ai-mascot-character img {
        transition: none;
    }
}


/* 七项主导航为微课入口预留空间；窄屏菜单可横向滚动。 */
@media (min-width: 768px) and (max-width: 1535px) {
    .navbar .nav-link { padding-left: .75rem !important; padding-right: .75rem !important; }
}
@media (min-width: 768px) and (max-width: 1279px) {
    .navbar .nav-link { padding-left: .5rem !important; padding-right: .5rem !important; }
}
