/* 实验教程页面样式 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    min-height: 100vh;
    cursor: none;
}

/* 顶部标题栏 */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #2c3e50, #2980b9);
    color: white;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
}

.logo {
    height: 40px;
    margin-right: 10px;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: white;
}

/* 搜索框容器 */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #95a5a6;
}

#search-input {
    width: 250px;
    height: 36px;
    padding: 0 20px 0 40px;
    border: none;
    border-radius: 18px;
    background-color: #ecf0f1;
    color: #2c3e50;
    font-size: 14px;
    transition: width 0.3s ease-in-out, background-color 0.2s;
}

#search-input::placeholder {
    color: #95a5a6;
}

#search-input:focus {
    outline: none;
    width: 300px;
    background-color: #fff;
}

/* 主容器 */
.main-container {
    margin-top: 80px;
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
}

/* 教程网格 */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 教程卡片 */
.tutorial-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.tutorial-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 教程图片 */
.tutorial-image {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tutorial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tutorial-card:hover .tutorial-image img {
    transform: scale(1.1);
}

.tutorial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tutorial-card:hover .tutorial-overlay {
    opacity: 1;
}

.tutorial-overlay i {
    font-size: 60px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* 教程内容 */
.tutorial-content {
    padding: 20px;
}

.tutorial-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c3e50;
    line-height: 1.3;
}

.tutorial-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 教程元信息 */
.tutorial-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.tutorial-duration,
.tutorial-level {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.tutorial-duration i,
.tutorial-level i {
    color: #3498db;
}

/* 标签 */
.tutorial-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.tutorial-manager {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        padding: 20px 15px;
        margin-top: 70px;
    }

    .tutorial-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .tutorial-card {
        margin-bottom: 20px;
    }

    .tutorial-image {
        height: 200px;
    }

    .tutorial-content {
        padding: 20px;
    }

    .tutorial-content h2 {
        font-size: 20px;
    }

    .tutorial-description {
        font-size: 14px;
    }

    .tutorial-meta {
        flex-direction: column;
        gap: 10px;
    }

    .header-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 15px;
    }

    .header-title {
        font-size: 16px;
    }

    .logo {
        height: 30px;
    }

    .tutorial-content {
        padding: 15px;
    }

    .tutorial-content h2 {
        font-size: 18px;
    }

    .tutorial-description {
        font-size: 13px;
    }
}

/* 鼠标拖尾特效样式 */
#laser-cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none;
}

.trail-dot {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9998;
    opacity: 1;
    transition: opacity 0.1s linear, transform 0.1s linear;
    animation: trail-fade-out 0.5s linear forwards;
}

@keyframes trail-fade-out {
    from {
        opacity: 1;
        transform: scale(1.1) translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: scale(0.1) translate(-50%, -50%);
    }
}

/* 仅在支持精细指针输入的设备（如鼠标）上显示自定义光标 */
@media (pointer: fine) {
    html {
        cursor: none;
    }
    
    #laser-cursor {
        display: block;
    }
}