/* 页面头部 */
.page-header-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdfa 100%);
    padding: 60px 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.page-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* 分类导航 */
.category-nav-section {
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 0;
}

.category-tab {
    padding: 10px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.category-tab:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 筛选区域 */
.filter-section {
    padding: 24px 0;
    background: var(--bg-secondary);
}

.filter-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    margin-right: 12px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.filter-options {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.filter-select:focus {
    border-color: var(--primary-color);
}

/* 材料列表 */
.materials-section {
    padding: 40px 0;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.material-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.material-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.material-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.material-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.material-info {
    flex: 1;
}

.material-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.material-grade {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.material-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.material-properties {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.property-item {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 8px;
}

.property-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.property-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.material-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.update-time {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.btn-view-detail {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view-detail:hover {
    background: var(--primary-dark);
}

/* 加载更多 */
.load-more {
    text-align: center;
}

.btn-load-more {
    padding: 14px 40px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-load-more:hover {
    background: var(--primary-color);
    color: white;
}

/* 详情模态框 */
.detail-modal {
    max-width: 800px;
    max-height: 90vh;
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-basic {
    display: flex;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.detail-image {
    flex-shrink: 0;
}

.detail-image .material-icon {
    width: 120px;
    height: 120px;
    font-size: 3rem;
}

.detail-info {
    flex: 1;
}

.detail-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.detail-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
}

.detail-properties h4,
.detail-applications h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.property-card {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.property-card .property-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.property-card .property-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.applications-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.application-item {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.detail-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.detail-actions button {
    flex: 1;
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.detail-actions button svg {
    width: 18px;
    height: 18px;
}

.btn-favorite {
    background: white;
    color: var(--text-primary);
}

.btn-favorite:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-compare {
    background: white;
    color: var(--text-primary);
}

.btn-compare:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-export {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-export:hover {
    background: var(--primary-dark);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-options {
        flex-direction: column;
    }

    .materials-grid {
        grid-template-columns: 1fr;
    }

    .detail-basic {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-tags {
        justify-content: center;
    }

    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-actions {
        flex-direction: column;
    }
}
