/* 全局样式 */
:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6e82fe;
    --accent-color: #f86f03;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #f5f7fa;
    --card-bg: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* 顶部导航栏 */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.logo-icon {
    margin-right: 10px;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    position: relative;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--dark);
    transition: color 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(74, 108, 247, 0.1);
}

/* 搜索框 */
.search-container {
    position: relative;
    margin: 20px 0;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    padding-left: 45px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
}

/* 介绍文字 */
.intro-text {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.intro-text h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.intro-text p {
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--light-text);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 10px auto;
}

.intro-text .action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    margin-top: 10px;
    transition: var(--transition);
}

.intro-text .action-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.intro-text .action-button i {
    font-size: 18px;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    margin: 20px 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: var(--light-text);
    cursor: pointer;
    transition: var(--transition);
}

.breadcrumb-item:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    margin: 0 10px;
    color: var(--light-text);
}

/* 分类区域 */
.section-title {
    margin: 20px 0;
    color: var(--text-color);
    font-weight: 600;
}

/* 分类卡片网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* 分类卡片 */
.category-card {
    display: flex;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    padding: 20px;
    align-items: center;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

/* 分类图标 */
.category-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: #f0f4ff;
    color: var(--primary-color);
    font-size: 1.5rem;
    border-radius: 12px;
    margin-right: 15px;
    flex-shrink: 0;
}

/* 分类信息 */
.category-info {
    flex-grow: 1;
}

/* 分类标题 */
.category-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* 分类描述 */
.category-desc {
    font-size: 0.9rem;
    color: var(--light-text);
    line-height: 1.4;
}

/* 分类数量 */
.category-count {
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-top: 5px;
    font-weight: 500;
}

/* SVG画廊 */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.svg-item {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
}

.svg-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.svg-preview {
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    overflow: hidden;
    position: relative;
}

.svg-preview svg {
    max-width: 100%;
    max-height: 100%;
}

/* SVG加载中状态 */
.svg-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.svg-loading i {
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* SVG加载错误状态 */
.svg-error {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    color: #e74c3c;
    font-size: 0.9rem;
}

.svg-info {
    padding: 15px;
}

.svg-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svg-path {
    font-size: 0.8rem;
    color: var(--light-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-svg-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    color: var(--light-text);
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 50px auto;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light-text);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--accent-color);
}

/* 标签页 */
.tabs {
    display: flex;
    margin: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-right: 10px;
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

.svg-full {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 300px;
    background-color: #f9f9f9;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    overflow-y: auto;
    max-height: 600px;
}

.svg-full svg {
    max-width: 100%;
    max-height: none;
}

.svg-code {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: monospace;
    white-space: pre-wrap;
    margin-bottom: 20px;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-button {
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-button:hover {
    background-color: var(--secondary-color);
}

.copy-success {
    display: none;
    background-color: #4caf50;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-left: 5px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .category-grid, .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .category-grid, .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-between;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .modal-content {
        width: 95%;
        margin: 30px auto;
    }
}

@media (max-width: 576px) {
    .category-grid, .gallery {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
        justify-content: center;
    }
}

/* 关于页面样式 */
.about-info {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin: 20px 0;
    width: 100%;
}

.about-section {
    margin-bottom: 30px;
}

.about-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.about-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.about-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.about-section a:hover {
    text-decoration: underline;
} 