/* === 本地字体声明（原 assets/css/local-fonts.css 已内联至此，消除 @import 串行阻塞请求）=== */
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 400;
    src: local('Lato Regular'), local('Lato-Regular'),
         url('assets/fonts/lato-v25-latin-regular.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 700;
    src: local('Lato Bold'), local('Lato-Bold'),
         url('assets/fonts/lato-v25-latin-700.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: 'Noto Serif SC';
    font-style: normal;
    font-weight: 400;
    src: local('Noto Serif SC'), local('NotoSerifSC-Regular'),
         local('Source Han Serif SC'), local('SourceHanSerifSC-Regular');
    font-display: swap;
}
@font-face {
    font-family: 'Noto Serif SC';
    font-style: normal;
    font-weight: 700;
    src: local('Noto Serif SC Bold'), local('NotoSerifSC-Bold'),
         local('Source Han Serif SC Bold'), local('SourceHanSerifSC-Bold');
    font-display: swap;
}
@font-face {
    font-family: 'Lato Fallback';
    src: local('Arial'), local('Helvetica Neue'), local('PingFang SC'), local('Microsoft YaHei');
    font-display: swap;
}
@font-face {
    font-family: 'Noto Serif SC Fallback';
    src: local('SimSun'), local('STSong'), local('宋体'), local('NSimSun'), local('新宋体');
    font-display: swap;
}

/* === 全局与基础样式 === */

:root { 
    --primary-color: #003366; 
    --accent-color: #d19a66; 
    --text-color: #333333; 
    --light-gray: #f8f9fa; 
    --white: #ffffff; 
    --header-height: 70px; 
    --serif-font: 'Noto Serif SC', 'Noto Serif SC Fallback', 'SimSun', '宋体', serif; 
    --sans-font: 'Lato', 'Lato Fallback', 'Arial', 'PingFang SC', 'Microsoft YaHei', sans-serif; 
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: var(--sans-font); 
    margin: 0; 
    background-color: var(--light-gray); 
    color: var(--text-color); 
}
h1, h2, h3, h4 { font-family: var(--serif-font); }
a { 
    text-decoration: none; 
    color: var(--primary-color); 
    transition: color 0.3s; 
}
a:hover { color: var(--accent-color); }
.main-container { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 60px 30px; 
}

/* === 导航栏 (Header) === */
.site-header { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: var(--header-height); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 0 20px; 
    z-index: 1000; 
    transition: all 0.4s; 
}
.navbar { 
    width: 100%; 
    max-width: 1400px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 15px; 
}
.logo { 
    display: flex; 
    align-items: center; 
    font-size: 24px; 
    font-weight: 700; 
    color: var(--white); 
    transition: color 0.4s; 
    flex-shrink: 0; 
}
.logo img { 
    max-height: 40px; 
    margin-right: 10px; 
}
.nav-links { display: flex; align-items: center; }
.nav-links a { 
    color: var(--white); 
    padding: 10px 15px; 
    font-size: 16px; 
    font-weight: 700; 
    transition: color 0.4s; 
}
.user-actions { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-left: auto; 
}
.welcome-user { 
    color: var(--white); 
    white-space: nowrap; 
    font-weight: bold; 
}
.auth-link { 
    font-weight: bold; 
    padding: 8px 16px; 
    border: 2px solid var(--white); 
    border-radius: 5px; 
    color: var(--white); 
}
.menu-toggle { display: none; cursor: pointer; }
.menu-toggle span { 
    display: block; 
    width: 25px; 
    height: 3px; 
    background-color: var(--white); 
    margin: 5px 0; 
    transition: all 0.3s; 
}
/* 滚动后 或 初始白色背景 时的样式 */
.site-header.scrolled, 
.site-header.site-header-solid { 
    background-color: var(--white); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}
.site-header.scrolled .logo, 
.site-header.site-header-solid .logo { color: var(--primary-color); }
.site-header.scrolled .nav-links a, 
.site-header.site-header-solid .nav-links a { color: var(--text-color); }
.site-header.scrolled .welcome-user, 
.site-header.site-header-solid .welcome-user { color: var(--text-color); }
.site-header.scrolled .auth-link, 
.site-header.site-header-solid .auth-link { 
    color: var(--primary-color); 
    border-color: var(--primary-color); 
}
.site-header.scrolled .menu-toggle span, 
.site-header.site-header-solid .menu-toggle span { background-color: var(--primary-color); }
/* 确保导航栏初始状态下下拉菜单文字也能正确显示 */
.nav-links ul ul a {
    color: var(--text-color) !important;
}

/* === 首页专属 (Hero Slideshow) === */
.hero-slideshow {
    height: 85vh; 
    min-height: 500px; 
    position: relative; 
    overflow: hidden; 
    background-color: #333;
}

.hero-slide {
    width: 100%; 
    height: 100%; 
    position: absolute; 
    top: 0; 
    left: 0;
    background-size: cover; 
    background-position: center;
    opacity: 0; 
    transition: opacity 1.2s ease-in-out;
    
    /* 【核心修改】将 slide 自身变为 flex 容器 */
    display: flex;
    /* 垂直方向：对齐到底部 */
    align-items: flex-end; 
    /* 水平方向：对齐到右侧 */
    justify-content: flex-end; 
    
    /* 为内容留出一些边距，避免紧贴边缘 */
    padding: 5vh 5vw; 
}
.hero-slide.active { 
    opacity: 1; 
}
.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* --- 【方案三】渐变透明过渡 --- */
    /* 从顶部40%位置的半透明黑色，渐变到底部的全透明 */
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.22) 40%, 
        rgba(0,0,0,0) 100%
    );
    
    /* 同时，在整个轮播图的底部增加一个微妙的内阴影来分割 */
    box-shadow: inset 0 -5px 10px -5px rgba(0,0,0,0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 500px; /* 限制内容最大宽度 */
    
    /* 【核心修改】确保内容也是右对齐 */
    text-align: right; 
}

.hero-title { 
    font-size: 48px; 
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5); 
    color: var(--white); 
}
.hero-button { 
    font-size: 18px; 
    color: var(--white); 
    background-color: var(--primary-color); 
    padding: 15px 35px; 
    border-radius: 5px; 
    display: inline-block; 
}
.slide-dots { 
    position: absolute; 
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 5; 
}
.dot { 
    display: inline-block; 
    width: 12px; 
    height: 12px; 
    margin: 0 5px; 
    background-color: rgba(255,255,255,0.5); 
    border-radius: 50%; 
    cursor: pointer; 
}
.dot.active { background-color: var(--white); }

/* === 视频卡片 (通用) === */
.section-title { 
    font-size: 36px; 
    text-align: center; 
    margin-bottom: 40px; 
}
.video-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 30px; 
}
.video-card { 
    background-color: var(--white); 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    transition: all 0.3s; 
}
.video-card:hover { transform: translateY(-8px); }
.video-thumbnail { 
    width: 100%; 
    padding-top: 56.25%; 
    background-size: cover; 
    background-position: center; 
}
.video-info { padding: 20px; }
.video-title { font-size: 18px; }
.video-category { font-size: 14px; color: #888; }

/* === 分类页/搜索页专属 === */
.page-header { 
    padding: 80px 30px; 
    text-align: center; 
    margin-top: var(--header-height); 
    background-color: var(--light-gray); 
    position: relative; 
    color: var(--primary-color); 
}
/* 有背景图片时的特殊样式 */
.page-header.has-bg-image {
    min-height: 40vh; 
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
}
/* 添加一个遮罩层，让文字更清晰 */
.page-header.has-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.0); 
}
.page-header-content {
    position: relative;
    z-index: 2;
}
.page-title { 
    font-size: 42px; 
    color: var(--primary-color); 
    margin: 0; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* === 【核心】播放页专属样式 === */
.watch-layout { 
    display: grid; 
    grid-template-columns: 3fr 1fr; 
    gap: 30px; 
    max-width: 1600px; 
    margin: 0 auto; 
    padding: 40px 30px; 
    margin-top: var(--header-height); 
}
.main-column { 
    background: var(--white); 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}
.video-player-wrapper { 
    width: 100%; 
    background: #000; 
    position: relative; 
    padding-top: 56.25%; 
}
.video-player { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
}
.video-details { 
    padding-top: 25px; 
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}
.video-info-main { flex-grow: 1; }
.video-meta { 
    display: flex; 
    gap: 20px; 
    color: #777; 
    font-size: 14px; 
    margin-bottom: 25px; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 15px; 
}
.video-navigation-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.prev-video-btn,
.next-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: var(--primary-color);
    color: white !important;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
}
.prev-video-btn:hover,
.next-video-btn:hover {
    background-color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}
.prev-video-btn svg,
.next-video-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.video-description { 
    line-height: 1.8; 
    color: #555; 
    clear: both;
    width: 100%;
}
.video-description img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.video-description-scrollable {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    margin-top: 10px;
    background: #f9f9f9;
}
.video-description-scrollable img {
    max-width: 100%;
    height: auto;
}
.courseware-section { 
    margin-top: 30px; 
    padding-top: 30px; 
    border-top: 1px solid #eee; 
    width: 100%;
    flex-basis: 100%;
}
.courseware-section h3 { font-size: 20px; }
.download-buttons { 
    display: flex; 
    gap: 15px; 
    flex-wrap: wrap; 
}
.download-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    padding: 12px 25px; 
    border-radius: 5px; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 16px; 
    color: white !important; 
}
.download-btn.pdf { background-color: #e74c3c; }
.download-btn.ppt { background-color: #e67e22; }
.download-btn svg { 
    width: 20px; 
    height: 20px; 
    fill: currentColor; 
}
.sidebar-column {
    position: sticky;
    top: 100px;
    align-self: flex-start;
    width: 100%;
}
.related-videos {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}
.related-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}
.related-header h3 {
    font-size: 22px;
    color: #333333;
    margin: 0;
}
.related-list {
    max-height: 65vh;
    overflow-y: auto;
    padding: 20px;
}
.related-list::-webkit-scrollbar {
    width: 6px;
}
.related-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.related-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}
.related-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
.related-video-card {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}
.related-video-card:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.related-thumbnail {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
}
.related-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.related-info h4 {
    font-size: 14px;
    color: #333333;
    margin: 0 0 5px 0;
    font-weight: 500;
}
.related-info .video-duration {
    font-size: 12px;
    color: #666666;
    margin: 0;
}
.related-videos a.current .related-video-card {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
    border-color: #bbdefb;
}
.related-videos a.current .related-info h4 {
    color: #1976d2;
}

/* === 页脚 (Footer) === */
.site-footer { 
    background-color: #222529; 
    color: #a9b3c1; 
    padding: 60px 30px; 
}
.footer-grid { 
    max-width: 1400px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 40px; 
}
.footer-column h4 { color: var(--white); }
.footer-column ul { list-style: none; padding: 0; }
.footer-column a { color: #a9b3c1; }
.footer-bottom { 
    text-align: center; 
    margin-top: 50px; 
    padding-top: 30px; 
    border-top: 1px solid #393e46; 
}

/* === 导航栏下拉菜单样式（右侧滑开式级联菜单） === */
.nav-links > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.nav-links > ul > li {
    position: relative;
}
.nav-links a {
    display: block;
}
/* 二级菜单：在触发它的文字【正下方】下拉展开（贴齐文字底边，不再右偏移） */
.nav-links ul ul {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    background-color: var(--white);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 0 0 5px 5px;
    padding: 10px 0;
    min-width: 180px;
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* 鼠标离开后：先保持 0.25 秒完全不动，再 0.12 秒淡出，0.4 秒后彻底隐藏 */
    transition: opacity 0.12s ease 0.25s, visibility 0s linear 0.4s;
    z-index: 1001;
}
/* 菜单悬停保持（父项 hover 或菜单自身 hover 都保持显示，进入时立即淡入） */
.nav-links ul > li:hover > ul,
.nav-links ul ul:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.12s ease;
}
/* 靠屏幕右边缘的一级菜单（理科综合/文科综合）：下拉菜单右对齐防止出屏 */
.nav-links > ul > li:nth-last-child(-n+2) > ul {
    left: auto;
    right: 0;
    border-radius: 0 0 5px 5px;
}
.nav-links ul ul a {
    padding: 10px 20px;
    color: var(--text-color);
    white-space: nowrap;
}
.nav-links ul ul a:hover {
    background-color: var(--light-gray);
}
/* 三级子菜单：在父菜单项右侧展开（保持级联） */
.nav-links ul ul li {
    position: relative;
}
.nav-links ul ul ul {
    top: 0;
    left: 100%;
    border-radius: 0 5px 5px 5px;
}
/* 二级菜单靠右的项（最后两项）三级菜单向左展开防止出屏 */
.nav-links ul ul li:nth-last-child(-n+2) > ul {
    left: auto;
    right: 100%;
    border-radius: 5px 0 5px 5px;
}
/* 确保下拉菜单在导航栏滚动后也能正确显示 */
.site-header.scrolled .nav-links ul ul,
.site-header.site-header-solid .nav-links ul ul {
    background-color: var(--white);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.site-header.scrolled .nav-links ul ul a,
.site-header.site-header-solid .nav-links ul ul a {
    color: var(--text-color);
}
.site-header.scrolled .nav-links ul ul a:hover,
.site-header.site-header-solid .nav-links ul ul a:hover {
    background-color: var(--light-gray);
}

/* === 悬浮课程简介窗口样式 === */
.floating-description {
    position: fixed;
    width: 600px;
    height: 500px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    right: 30px;
    bottom: 30px;
    transition: all 0.3s ease;
}
.floating-header {
    padding: 15px;
    background: #3498db;
    color: white;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.floating-title {
    font-size: 16px;
    font-weight: 600;
}
.floating-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}
.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}
.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}
.floating-content {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}
.floating-content img {
    max-width: 100%;
    border-radius: 5px;
    margin: 10px 0;
}
.floating-footer {
    padding: 10px 15px;
    background: #f8f9fa;
    text-align: center;
    font-size: 12px;
    color: #6c757d;
}
/* 最小化状态 */
.floating-description.minimized {
    height: 40px;
    width: 200px;
}
.floating-description.minimized .floating-content,
.floating-description.minimized .floating-footer {
    display: none;
}

/* === 缩放控制按钮样式 === */
.zoom-controls {
    display: flex;
    gap: 5px;
    margin-left: 10px;
    align-items: center;
}
.zoom-btn {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}
.zoom-level {
    font-size: 12px;
    color: white;
    margin: 0 5px;
    min-width: 40px;
    text-align: center;
}
/* 修复后的缩放容器 */
.zoom-container {
    overflow: auto;
    height: 100%;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}
.zoom-content {
    transition: transform 0.3s ease;
    transform-origin: 0 0;
    width: 100%;
    min-height: 100%;
}

/* === 浮动按钮样式 === */
.toggle-floating-btn {
    position: fixed;
    right: 30px;
    bottom: 80px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    border: none;
    font-size: 20px;
}
.toggle-floating-btn:hover {
    background: #2980b9;
}

/* === 滚动条样式 === */
.video-description-scrollable::-webkit-scrollbar,
.floating-content::-webkit-scrollbar,
.zoom-container::-webkit-scrollbar,
.related-videos::-webkit-scrollbar {
    width: 8px;
}
.video-description-scrollable::-webkit-scrollbar-track,
.floating-content::-webkit-scrollbar-track,
.zoom-container::-webkit-scrollbar-track,
.related-videos::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.video-description-scrollable::-webkit-scrollbar-thumb,
.floating-content::-webkit-scrollbar-thumb,
.zoom-container::-webkit-scrollbar-thumb,
.related-videos::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
.video-description-scrollbar-thumb:hover,
.floating-content::-webkit-scrollbar-thumb:hover,
.zoom-container::-webkit-scrollbar-thumb:hover,
.related-videos::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
/* 推荐视频滚动条美化 */
.related-videos::-webkit-scrollbar {
    width: 8px;
}
.related-videos::-webkit-scrollbar-track {
    background: transparent;
}
.related-videos::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
}
.related-videos:hover::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.related-videos:hover::-webkit-scrollbar-thumb {
    background: #ccc;
}
.related-videos::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* === 响应式设计 === */
@media (max-width: 768px) {
    .nav-links, .user-actions { display: none; }
    .menu-toggle { display: block; }
    .nav-links.active { 
        display: flex; 
        flex-direction: column; 
        width: 100%; 
        background-color: var(--white); 
        position: absolute; 
        top: var(--header-height); 
        left: 0; 
        padding: 10px 0; 
        box-shadow: 0 5px 10px rgba(0,0,0,0.1); 
    }
    .nav-links.active a { 
        color: var(--text-color); 
        width: 100%; 
        text-align: center; 
        padding: 15px 0; 
    }
    /* 移动端：子菜单改为纵向展开（点击展开，hover 也可） */
    .nav-links ul ul {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: none;
        margin-top: 0;
        box-shadow: none;
        border-radius: 0;
        min-width: 0;
        width: 100%;
        background-color: #f4f7f9;
        padding: 0;
    }
    .nav-links ul > li:hover > ul { display: block; }
    .nav-links ul ul ul { padding-left: 15px; }
    .floating-description {
        width: 300px;
        right: 20px;
        bottom: 20px;
    }
}
@media (max-width: 1024px) {
    .watch-layout { grid-template-columns: 1fr; }
    .sidebar-column { margin-top: 40px; }
}
@media (max-width: 576px) {
    .floating-description {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
    .zoom-controls {
        display: none;
    }
}
@media (max-height: 800px) {
    .video-description-scrollable {
        max-height: 250px;
    }
}
@media (max-height: 600px) {
    .video-description-scrollable {
        max-height: 200px;
    }
}

/* === 悬浮窗 - 指引提示样式 === */
.floating-tooltip {
    position: fixed;
    bottom: 85px; /* 放在切换按钮的上方 */
    right: 20px;
    background-color: var(--primary-color, #003366);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2001; /* 确保在最顶层 */
    opacity: 0; /* 默认透明 */
    transform: translateY(10px); /* 默认在下方一点 */
    pointer-events: none; /* 防止它阻挡鼠标点击 */
    white-space: nowrap;
    
    /* 入场和出场动画 */
    animation: tooltip-fade-in-out 6s forwards; 
}
/* 指引提示的小箭头 */
.floating-tooltip::after {
    content: '';
    position: absolute;
    top: 100%; /* 箭头在底部 */
    right: 25px; /* 对准按钮的位置 */
    margin-left: -5px;
    border-width: 6px;
    border-style: solid;
    border-color: var(--primary-color, #003366) transparent transparent transparent;
}
/* 定义动画关键帧 */
@keyframes tooltip-fade-in-out {
    0% { opacity: 0; transform: translateY(10px); }
    10% { opacity: 1; transform: translateY(0); } /* 快速淡入并上移 */
    80% { opacity: 1; transform: translateY(0); } /* 保持显示 */
    100% { opacity: 0; transform: translateY(10px); } /* 缓慢淡出并下移 */
}

/* === 悬浮窗 - 缩放功能专属样式 === */
.floating-controls .zoom-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 10px;
}
.zoom-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.zoom-level {
    font-size: 14px;
    padding: 0 5px;
    min-width: 50px;
    text-align: center;
}
.zoom-container {
    flex-grow: 1;
    overflow: auto; /* 当内容缩放后超出时，显示滚动条 */
    padding: 10px;
    transition: padding 0.3s;
}
.zoom-content {
    transform-origin: top left; /* 设置缩放的原点为左上角 */
    transition: transform 0.2s ease-out;
}
