

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    background-color: var(--bg-dark);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
     height: calc(100vh - 60px); /* 改为减去头部高度，而不是增加 */
    box-sizing: border-box; /* 添加box-sizing确保padding不影响总高度 */
}

/* Examples Section */
.examples-section {
    margin-top: 1rem;
    position: relative;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-left: 1rem;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 3px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

.view-all-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.view-all-link:hover {
    text-decoration: underline;
}

.video-container {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: #000;
    border-radius: 10px 10px 0 0;
}

.example-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.example-info {
    padding: 0.3rem;
    display: flex;
    flex-direction: column;
    position: relative;
    flex-grow: 1;
}

.example-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.example-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* 热门示例区域样式 */
.hot-examples-section {
    margin-top: 1.5rem;
}

/* 瀑布流布局 */
.hot-examples-container {
    column-count: 3; /* 三列瀑布流 */
    column-gap: 0.5rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.hot-example-card {
    break-inside: avoid;
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    display: inline-block;
    width: 100%;
    margin-bottom: 1rem;
}

.hot-example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.hot-video-container {
    height: 100%;
    position: relative;
    background: linear-gradient(45deg, #2a2a2a, #1a1a1a);
    overflow: hidden;
}

.hot-example-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hot-example-info {
    padding: 0rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.hot-example-name {
    font-weight: 500;
    margin-bottom: 0rem;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.hot-example-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* 加载动画 */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    padding: 1rem;
    width: 100%;
    grid-column: 1 / -1;
}

.loading-spinner.hidden {
    display: none;
}

/* 无更多内容提示 */
.no-more {
    text-align: center;
    color: var(--text-secondary);
    padding: 1rem;
    width: 100%;
    grid-column: 1 / -1;
    display: none;
    justify-content: center;
}


.social-login {
    margin-top: 1.5rem;
    text-align: center;
}

.social-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-divider::before,
.social-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--card-border);
    margin: 0 0.5rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
}

.social-icon:hover {
    background-color: rgba(255, 42, 109, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}




/* 修复输入框背景色问题 */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover, 
.form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.05) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.form-input:autofill,
.form-input:autofill:hover, 
.form-input:autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.05) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* 确保输入框在所有状态下保持正确样式 */
.form-input,
.form-input:focus,
.form-input:active,
.form-input:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
}


@media (max-width: 900px) {
    .sidebar {
        width: 70px;
    }
    
    .nav-item span {
        display: none;
    }
    
    .main-content {
        margin-left: 0px;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .hot-examples-container {
        column-count: 1;
    }
    
    .nav-item.new_prj .new-project-card {
        width: 300px;
        left: 70px;
    }
    
    .nav-item.new_prj .new-project-categories {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    header {
        padding: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .function-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .example-card {
        min-width: 160px;
    }
}

/* 添加微妙的背景动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.feature-card:hover .card-icon {
    animation: float 2s ease-in-out infinite;
}

/* 以下是从template-video.html中提取的相关CSS样式，已移动到文件末尾 */

