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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2rem;
}

/* 语言切换按钮样式 */
.language-switcher {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

/* 下拉式语言选择器 */
.lang-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.lang-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2, #667eea);
}

.lang-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

/* 为屏幕阅读器隐藏的标签 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 头部折叠/展开切换按钮 */
.header-toggle {
    margin-left: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.header-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 保持头部导航图标与文字垂直居中且高度统一 */
.nav-link i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0;
}

.dropdown-link:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateX(5px);
}

.dropdown-link i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

/* 主要内容样式 */
.main {
    padding: 2rem 0;
    padding-top: 7rem; /* 预留头部高度，避免内容被遮挡 */
}

/* 头部折叠状态：缩小内边距并隐藏导航 */
.header.collapsed .container {
    padding: 0.5rem 20px;
}

.header.collapsed .nav {
    display: none;
}

.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-title i {
    font-size: 1.8rem;
}

/* 内容卡片样式 */
.content-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.content-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    font-weight: 500;
}

.feature i {
    font-size: 1.5rem;
}

/* 视频网格样式 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.video-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.video-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.video-container {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: #f8f9fa;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    border-radius: 10px;
}

.video-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 图片上传区域样式 */
.image-upload-area {
    margin-bottom: 2rem;
}

.upload-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px dashed #667eea;
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-box:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #764ba2;
    transform: translateY(-2px);
}

.upload-box i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
    display: block;
}

.upload-box p {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: 500;
}

/* 图片画廊样式 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.image-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.image-item:hover {
    transform: translateY(-5px);
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.image-item .image-name {
    font-weight: 500;
    color: #333;
    text-align: center;
}

/* 步骤容器样式 */
.steps-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 25px;
    top: 60px;
    width: 2px;
    height: calc(100% + 1rem);
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.step-content h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.step-content p {
    color: #666;
    line-height: 1.6;
}

/* 页脚样式 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .nav-list {
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-list {
        gap: 0.5rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    /* 移动端下拉菜单样式 */
    .dropdown-menu {
        position: fixed;
        top: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        width: 90vw;
        max-width: 300px;
    }
    
    .dropdown:hover .dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }
    
    .dropdown-toggle {
        font-size: 0.8rem;
    }
    
    .dropdown-arrow {
        font-size: 0.6rem;
    }
    
    /* 移动端激活状态 */
    .dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    
    .dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .step-item::after {
        display: none;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .video-card {
        padding: 1rem;
    }
    
    .upload-box {
        padding: 2rem 1rem;
    }
    
    /* 图文布局响应式 */
    .image-text-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .image-placeholder {
        min-height: 150px;
    }
    
    .image-placeholder i {
        font-size: 2rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.6s ease-out;
}

/* 视频控制按钮样式优化 */
video::-webkit-media-controls-panel {
    /* background-color: rgba(0, 0, 0, 0.2); */
    /* backdrop-filter: blur(5px); */
}

video::-webkit-media-controls-play-button,
video::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-timeline {
    filter: brightness(1.5);
}

/* 视频加载状态 */
.video-container.loading::before {
    content: '加载中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #667eea;
    font-size: 1.1rem;
    z-index: 10;
}

/* 视频悬停效果 */
.video-container:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* 图文说明区域样式 */
.image-text-container {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    align-items: flex-start;
}

.image-placeholder {
    flex: 1;
    min-height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.3s ease;
}

.image-placeholder:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #007bff;
}

.image-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.image-placeholder p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.text-content {
    flex: 1;
}

.text-content h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.text-content ul {
    margin: 0;
    padding-left: 1.5rem;
}

.text-content li {
    margin-bottom: 0.5rem;
    color: #6c757d;
    line-height: 1.6;
}

/* 分步骤图文布局样式 */
.step-image-text {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    align-items: flex-start;
}

.step-image {
    flex: 1;
    max-width: 400px;
}

.step-img {
    width: 400px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.step-text {
    flex: 1;
}

.step-text p {
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.6;
}

.step-text ul {
    margin: 0;
    padding-left: 1.5rem;
}

.step-text li {
    margin-bottom: 0.5rem;
    color: #666;
    line-height: 1.5;
}

/* 视频教程区域样式 */
.video-section {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.video-card h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

/* 响应式设计 - 分步骤布局 */
@media (max-width: 768px) {
    .step-image-text {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .step-image {
        max-width: 100%;
    }
    
    .step-img {
        width: 100%;
        max-width: 100%;
    }
    
    .video-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .step-image-text {
        gap: 1rem;
    }
    
    .step-img {
        width: 100%;
        max-width: 100%;
    }
    
    .video-section {
        padding: 1rem;
    }
    
    .video-section h3 {
        font-size: 1.3rem;
    }
}

/* 图片放大模态框样式 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1600px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: modalZoomIn 0.3s ease-out;
}

.modal-caption {
    color: white;
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 图片放大动画 */
@keyframes modalZoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 步骤图片悬停提示 */
.step-img {
    position: relative;
}

.step-img::after {
    content: '点击放大';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.step-img:hover::after {
    opacity: 1;
}

/* 响应式设计 - 模态框 */
@media (max-width: 768px) {
    .modal-content {
        padding: 10px;
    }
    
    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .modal-image {
        max-height: 85vh;
    }
    
    .modal-caption {
        font-size: 1rem;
        margin-top: 10px;
    }
}

/* UI 增强样式（追加覆盖） */
html {
    scroll-behavior: smooth;
}

.section-title::after {
    content: '';
    display: block;
    width: 64px;
    height: 4px;
    margin-top: 6px;
    border-radius: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}


.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 使步骤图片的悬停提示支持国际化 */
.step-img::after {
    content: attr(data-hover-text);
}

/* 下拉选项可读性修复：避免白底白字 */
.lang-select option {
    color: #ffffff;
    background-color: #2b2c49; /* 深色背景，确保白字可读 */
}

.lang-select option:checked {
    color: #ffffff;
    background-color: #667eea; /* 选中项与整体风格一致 */
}

/* 部分环境下 option:hover 不生效，兼容支持的平台 */
.lang-select option:hover {
    color: #ffffff;
    background-color: #764ba2;
}

/* 自定义语言下拉组件样式，视觉与按钮统一 */
.lang-dropdown {
    position: relative;
    top:-5px;
}

.lang-toggle {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.lang-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 120px;
    background: #2b2c49;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 6px;
    display: none;
    z-index: 1000;
    text-align: center;
    list-style: none;
    margin: 0;
}

.lang-menu.open { display: block; }

.lang-item {
    padding: 8px 12px;
    list-style: none;
    border-radius: 8px;
    cursor: pointer;
}

.lang-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lang-item[aria-selected="true"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* 语言下拉字体与间距收紧（与标题比例更协调） */
.lang-toggle {
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem;
    border-radius: 22px;
    gap: 6px; /* 缩小图标与文字间距 */
}

.lang-item {
    font-size: 0.82rem;
    padding: 6px 10px;
}

/* 语言下拉箭头尺寸缩小，不影响其它下拉箭头 */
.lang-dropdown .dropdown-arrow {
    font-size: 0.6rem;
}

/* 展开时旋转箭头，匹配导航交互风格 */
.lang-dropdown .lang-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* 固定在页面右上角显示（用于 index.html） */
.lang-dropdown.fixed {
    position: fixed;
    right: 72px; /* 与右侧悬浮按钮错开 */
    top: 16px;
    z-index: 1000;
}