/* studyhtml.css */

/* 基础样式 */
* {
    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-color: #f5f5f5;
    padding-top: 120px; /* 为固定头部留出空间 */
}

/* 固定头部 */
#divToFix {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#divToFix h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

#divToFix p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航菜单 */
.category-nav {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.category-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

.category-nav li {
    margin: 0 15px;
}

.category-nav a {
    text-decoration: none;
    color: #2575fc;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.category-nav a:hover {
    background-color: #f0f7ff;
    color: #1a5fd8;
}

/* 标签区域 */
.tag-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tag-section h2 {
    color: #2575fc;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* 标签卡片 */
.tag-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.tag-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #2575fc;
}

.tag-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.tag-card p {
    color: #666;
    margin-bottom: 15px;
}

.tag-example {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #2575fc;
    margin-top: 10px;
}

/* 标签详情面板 */
.tag-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.detail-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: #333;
}

#detailTitle {
    color: #2575fc;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding-top: 140px;
    }
    
    .tag-grid {
        grid-template-columns: 1fr;
    }
    
    .category-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .category-nav li {
        margin: 5px 0;
    }
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}