/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 主容器 */
.tutorial-wrapper {
    width: 100%;
    min-height: 100vh;
    padding: 0;
}

.tutorial-container {
    display: flex;
    max-width: 100%;
    margin: 0;
    min-height: 100vh;
    background-color: #fff;
}

/* 左侧导航 */
.left-sidebar {
    width: 280px;
    padding: 25px 15px;
    background-color: #2c3e50;
    color: #fff;
    min-height: 100vh;
}

.main-title {
    font-size: 22px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #3d5166;
    display: flex;
    align-items: center;
}

.main-title i {
    margin-right: 10px;
    color: #3498db;
}

.submenu-list {
    list-style: none;
}

.submenu-item {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.submenu-item i {
    margin-right: 10px;
    color: #bdc3c7;
    width: 20px;
    text-align: center;
}

.submenu-item a {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    padding: 10px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    flex: 1;
}

.submenu-item a:hover, .submenu-item.active a {
    background-color: #34495e;
    color: #fff;
}

/* 右侧内容区 */
.right-content {
    flex: 1;
    padding: 25px;
    background-color: #fff;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.category-title {
    font-size: 22px;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.category-title i {
    margin-right: 10px;
    color: #3498db;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 250px;
    outline: none;
    font-size: 14px;
    transition: border 0.3s;
}

.search-box input:focus {
    border-color: #3498db;
}

.search-box button {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #2980b9;
}

/* 教程列表 */
.tutorial-list {
    margin-bottom: 30px;
}

.tutorial-item {
  display: flex;
    align-items: center;
    padding: 6px 15px;
    margin-bottom: 12px;
    background-color: #f9f9f9;
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 4px solid #3498db;
}

.tutorial-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.file-icon {
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

.file-icon.doc {
    color: #2b579a;
}

.file-icon.pdf {
    color: #e74c3c;
}

.file-icon.html {
    color: #e67e22;
}

.file-icon.jpg {
    color: #27ae60;
}

.file-icon.mp4 {
    color: #9b59b6;
}

.file-icon.other {
    color: #7f8c8d;
}

.tutorial-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
}

.action-buttons {
    display: flex;
    flex-shrink: 0;
}

.action-buttons button {
    padding: 8px 15px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.action-buttons button i {
    margin-right: 5px;
}

.copy-btn {
    background-color: #95a5a6;
    color: white;
}

.copy-btn:hover {
    background-color: #7f8c8d;
}

.view-btn {
    background-color: #3498db;
    color: white;
}

.view-btn:hover {
    background-color: #2980b9;
}

/* 分页导航 */
.pagination {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}

.pagination {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #3498db;
    transition: all 0.3s;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background-color: #f5f5f5;
    border-color: #3498db;
}

.pagination .current {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
    font-weight: bold;
}

.pagination .prev, .pagination .next {
    padding: 8px 12px;
}

/* 预览弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.modal-content {
    position: relative;
    margin: 2.5vh auto;
    width: 95%;
    height: 95vh;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background-color: #e74c3c;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-btn:hover {
    background-color: #c0392b;
    transform: rotate(90deg);
}

#preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #f9f9f9;
}

/* 提示框 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .left-sidebar {
        width: 220px;
    }
    
    .search-box input {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .tutorial-container {
        flex-direction: column;
    }
    
    .left-sidebar {
        width: 100%;
        min-height: auto;
        padding: 15px;
    }
    
    .right-content {
        padding: 15px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box {
        margin-top: 15px;
        width: 100%;
    }
    
    .search-box input {
        width: calc(100% - 50px);
    }
    
    .tutorial-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .action-buttons {
        margin-top: 10px;
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
    
    .action-buttons button {
        margin-left: 5px;
        flex: 1;
        text-align: center;
        justify-content: center;
    }
    
    .pagination a, .pagination span {
        padding: 6px 12px;
        margin: 0 2px;
        min-width: 30px;
    }
}

/* 分页导航样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    font-family: 'Arial', sans-serif;
}

.pagination li {
    list-style: none;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.pagination a, 
.pagination li.active a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    background-color: #fff;
    color: #4a5568;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pagination li.active a {
    background-color: #4299e1;
    color: white;
    border-color: #4299e1;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(66, 153, 225, 0.3);
}

.pagination a i {
    margin: 0 3px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination li {
        margin: 3px;
    }
    
    .pagination a, 
    .pagination li.active a {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 14px;
    }
}

/* 特殊按钮样式 */
.pagination li:first-child a,
.pagination li:last-child a {
    background-color: #edf2f7;
    font-weight: 600;
}

.pagination li:first-child a:hover,
.pagination li:last-child a:hover {
    background-color: #e2e8f0;
}

.pagination li.disabled a {
    color: #a0aec0;
    pointer-events: none;
    background-color: #f7fafc;
}

/* 箭头按钮样式 */
.pagination .prev a::before,
.pagination .next a::after {
    display: inline-block;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.pagination .prev a::before {
    content: "\f104";
    margin-right: 5px;
}

.pagination .next a::after {
    content: "\f105";
    margin-left: 5px;
}

/* 复制提示框样式 */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-size: 14px;
    display: flex;
    align-items: center;
}

.copy-toast.show {
    opacity: 1;
}

.copy-toast::before {
    content: "✓";
    margin-right: 8px;
    font-weight: bold;
}


/* 在现有CSS文件底部添加或修改以下媒体查询代码 */

@media (max-width: 768px) {
    /* 搜索区域100%宽度 */
    .search-box {
        width: 100%;
        margin-top: 15px;
    }
    
    .search-box form {
        display: flex;
        width: 100%;
    }
    
    .search-box input[type="text"] {
        flex: 1;
        width: 100%;
        min-width: auto;
    }
    
    /* 教程标题自动换行 */
    .tutorial-title {
        white-space: normal;
        word-break: break-word;
        overflow: visible;
    }
    
    /* 调整文件信息和操作按钮的布局 */
    .tutorial-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-info {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

/* 公告链接样式 */
.announcement-link {
    display: inline-block;
    margin-left: 15px;
    padding: 4px 12px;
    background-color: #fff8e6;
    color: #e67e22;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    vertical-align: middle;
    transition: all 0.3s;
    border: 1px solid #ffe0b2;
}

.announcement-link:hover {
    background-color: #ffe0b2;
    color: #d35400;
}

.announcement-link i {
    margin-right: 5px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .announcement-link {
        display: block;
        margin: 10px 0 0 0;
        text-align: center;
    }
}