/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

/* Category Navigation */
.category-nav {
    background: var(--bg-white);
    padding: 10px 2%;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 6px;
}
.breadcrumbs {
    margin-bottom: 10px;
    padding: 5px 8px;
    background-color: var(--bg-medium);
    border-radius: 6px;
}
.breadcrumbs ol {
    display: inline-flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}
.breadcrumbs li {
    display: inline-flex;
    align-items: center;
}
.breadcrumbs li:not(:first-child)::before {
    content: "/";          
    /* 或者 content: "›";  向前箭头 */
    margin: 0 6px;
    color: #666;
}
.breadcrumbs li:last-child span[name="name"] {
    font-weight: bold;
    color: #333;
}
.breadcrumbs li a {
    color: var(--text-dark);
    text-decoration: none;
}
.breadcrumbs li a:hover {
    color: var(--primary-color);
}
/* Header Styles */
.nav h1 {
    font-size: 24px;
    margin-bottom: 15px;
}

.nav h1 a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav h1 a:hover {
    color: #007bff;
}

/* Navigation Link */
.nav-link {
    list-style: none;
    margin-bottom: 15px;
}

.nav-link li h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.nav-link li h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link li h2 a:hover {
    color: #007bff;
}

/* Line Separator */
.line {
    height: 1px;
    background-color: #e0e0e0;
    margin: 20px 0;
}

/* Category Title */
.container h2 {
    font-size: 20px;
    color: #007bff;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

/* Content Link List */
.content-link {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.content-link li {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    min-height: 100px;
    max-height: 100px;
    display: flex;
    flex-direction: column;
    /* Hide empty cards */
    visibility: visible;
    opacity: 1;
}

/* Hide empty cards and cards with only whitespace or empty tags */


/* Debug styles (disabled by default) */
/*
.content-link li:empty {
    background-color: #ffeeee;
    border: 2px solid #ff0000;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-link li:empty:before {
    content: 'EMPTY CARD';
    color: #ff0000;
    font-weight: bold;
    font-size: 14px;
}*/

.content-link li h3:empty:after {
    content: 'Empty Title';
 
    font-style: italic;
}

.linktips:empty:after {
    content: 'No Description';
 
    font-style: italic;
}

.content-link li:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-color: #007bff;
}

.content-link li h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #222;
}

/* Link Styles */
.text-con {
    color: #222;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.text-con:hover {
    color: #0056b3;
    text-decoration: none;
    transform: translateX(3px);
    display: inline-block;
}

/* Link Tips */
.linktips {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 5px;
    line-height: 1.3;
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
}

.content-link li {
    position: relative;
    z-index: 1;
    transition: z-index 0.3s ease;
}

.content-link li:hover {
    z-index: 1000;
}

.content-link li:hover .linktips {
    overflow: visible;
    -webkit-line-clamp: unset;
    max-height: 250px;
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1001;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInUp 0.3s forwards;
    border: 1px solid #eaeaea;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .content-link {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .container {
        padding: 15px;
        margin: 10px;
    }
}

.pagination {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 8px; /* 控制分页项间距 */
    flex-wrap: wrap;
}
.pagination span {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: 500;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    min-width: 36px;
    text-align: center;
}

.page-btn:hover:not(.disabled) {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.page-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: 500;
}

.page-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f8f9fa;
    color: #999;
}
.back-button {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    min-width: 36px;
    text-align: center;
}
.pagination  a {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    margin: 0 3px; /* 增加左右间距 */
}

.pagination a:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination a.current {
    background: #007bff;
    color: white;
    border-color: #007bff;
    cursor: default;
}


