/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    text-align: center;
    margin-bottom: 1rem;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 主要内容区域 */
main {
    /*max-width: 1200px;*/
    margin: 0 auto;
    padding: 0 0;
}

/* 英雄区域 */
.hero {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease;
}

.hero h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.category-card h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: center;
}

.category-card h3 a {
    color: white;
    text-decoration: none;
}

.category-card h3 a:hover {
    text-decoration: underline;
}

.category-card .count {
    padding: 1rem;
    text-align: center;
    font-weight: bold;
    color: #667eea;
}

/* 分页 */
.pagination {
    text-align: center;
    margin: 1rem 0;
}

.pagination button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: #5a6fd8;
}

.pagination button.active {
    background: #764ba2;
}

.pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 系统网格 */
.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.system-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.system-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.system-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.system-card:hover img {
    transform: scale(1.1);
}

.system-card .info {
    padding: 1rem;
}

.system-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.system-card p {
    color: #666;
    font-size: 0.9rem;
}

/* 系统列表项 */
.system-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.system-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.system-item h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.system-item h3 a {
    text-decoration: none;
    color: inherit;
}

.system-item h3 a:hover {
    text-decoration: underline;
}

.system-item p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

/* 系统列表 */
.system-list {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.system-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.system-item:last-child {
    border-bottom: none;
}

.system-item:hover {
    background-color: #f9f9f9;
    transform: translateX(5px);
}

.system-item h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

/* 系统详情 */
.system-detail {
    background: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.system-info {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.function-intro {
    background-color: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 0 4px 4px 0;
}

.function-intro p {
    font-size: 1rem;
    line-height: 1.6;
    color: #495057;
}

.image-gallery {
    margin-top: 2rem;
}

.gallery-container {
    display: block;
}

/* 图片卡片全宽显示 */
.image-card.full-width {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
}

.image-wrapper {
    width: 100%;
    text-align: center;
    background-color: #f8f9fa;
    padding: 1rem;
    box-sizing: border-box;
    display: block;
    overflow: auto;
   /* max-height: 80vh;*/
}

.image-wrapper img {
    max-width: none;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    cursor: pointer;
}

.image-card.full-width .caption {
    padding: 1rem;
    background: white;
    text-align: center;
}

.image-card.full-width .caption h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.image-card.full-width .caption p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

/* 图片放大显示 */
.image-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: pointer;
    overflow: auto;
}

.image-fullscreen img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    margin: auto;
}

.image-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.image-card img {
    /*width: 100%;
    height: 250px;*/
    object-fit: cover;
    transition: all 0.3s ease;
}

.image-card:hover img {
    transform: scale(1.05);
}

.image-card .caption {
    padding: 1rem;
}

.image-card .caption h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.image-card .caption p {
    color: #666;
    font-size: 0.9rem;
}

/* 图片查看器样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    margin: 2% auto;
    padding: 20px;
    width: 95%;
    max-width: 95vw;
    background-color: transparent;
    animation: zoomIn 0.3s ease;
    text-align: center;
    height: 95vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover,
.close:focus {
    color: white;
}

.modal-img {
    max-width: 95vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.modal-caption {
    text-align: center;
    padding: 10px;
    font-weight: bold;
    color: white;
    background-color: rgba(0,0,0,0.7);
    border-radius: 4px;
    margin-top: 10px;
    max-width: 95vw;
}

/* 图片导航已移除 */

/* 搜索框样式 */
.search-box {
    margin: 1rem 0;
    text-align: center;
}

.search-box input {
    padding: 0.5rem;
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

/* 页脚 */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-grid, .system-grid, .gallery-container {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 0.25rem 0;
    }
    
    .search-box input {
        width: 90%;
    }
    
    /* 移动端系统详情优化 */
    .system-detail {
        padding: 1rem;
    }
    
    .image-card.full-width .caption h4 {
        font-size: 1rem;
    }
    
    .image-card.full-width .caption p {
        font-size: 0.8rem;
    }
    
    .system-info {
        padding: 1rem 0;
    }
    
    .system-info h2 {
        font-size: 1.3rem;
    }
    
    .system-info p {
        font-size: 0.9rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .breadcrumb {
        font-size: 0.9rem;
    }
}