* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

body {
    padding-top: 80px;
    background: #f5f5f5;
    line-height: 1.6;
}

nav {
    background: #1a237e;
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #fff;
    font-size: 1.8rem;
    font-style: italic;
    margin-left: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    margin-right: 2rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px #0000001a;
}

h2 {
    color: #3949ab;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3949ab;
    font-size: 1.5rem;
}

footer {
    background: #1a237e;
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px #0000001a;
    padding: 1.5rem;
    text-align: center;
}

.card h3 {
    color: #3949ab;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.card p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.card .button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #3949ab;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
}

.card .button:hover {
    background: #303f9f;
}

@media (max-width: 768px) {
    nav {
        padding: 0.8rem;
    }

    .logo {
        font-size: 1.5rem;
        margin-left: 1rem;
    }

    .nav-links {
        display: none;
    }

    body {
        padding-top: 60px;
    }

    .container {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.6rem;
    }
}

/* EA List and Shared Accounts Table */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px #0000001a;
}

thead {
    background: #3949ab;
    color: #fff;
}

thead th {
    padding: 0.8rem;
    text-align: left;
    font-size: 1rem;
}

tbody tr {
    border-bottom: 1px solid #ddd;
}

tbody td {
    padding: 0.8rem;
    font-size: 0.95rem;
    color: #333;
}

tbody tr:hover {
    background: #f5f5f5;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #fff;
}

.status-badge.active {
    background: #4caf50;
}

.status-badge.pending {
    background: #ff9800;
}

/* Download List */
.download-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Ensure 4 items in one row */
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Download List for 3 Items per Row */
.download-list.row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Ensure 3 items in one row */
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.download-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    text-align: left; /* Align text to the left */
    box-shadow: 0 2px 4px #0000001a;
    min-width: 0; /* Prevent items from exceeding their container */
}

.download-item a {
    color: #1a237e;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.download-item a:hover {
    text-decoration: underline;
}

.update-time {
    color: #666;
    font-size: 0.9rem;
}

.download-count {
    color: #999;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.download-count::before {
    content: "↓";
    font-size: 0.8rem;
}

.download-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .download-list {
        grid-template-columns: repeat(2, 1fr); /* 2 items per row on smaller screens */
    }

    .download-list.row-3 {
        grid-template-columns: repeat(2, 1fr); /* 2 items per row on smaller screens */
    }
}

@media (max-width: 480px) {
    .download-list {
        grid-template-columns: 1fr; /* 1 item per row on very small screens */
    }

    .download-list.row-3 {
        grid-template-columns: 1fr; /* 1 item per row on very small screens */
    }
}

/* Article List */
.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px #0000001a;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px #0000001a;
}

.article-title {
    font-size: 1.4rem;
    color: #3949ab;
    text-decoration: none;
    font-weight: bold;
}

.article-title:hover {
    text-decoration: underline;
}

.article-summary {
    color: #666;
    margin: 0.5rem 0;
    font-size: 1rem;
}

.article-meta {
    color: #999;
    font-size: 0.9rem;
}

/* Pagination */
.pagelist {
    display: flex;
    justify-content: center; /* Center the pagination */
    align-items: center; /* Vertically align items */
    gap: 0.5rem; /* Add spacing between page links */
    margin-top: 1.5rem;
}

.pagelist a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    color: #3949ab;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.pagelist a:hover {
    background: #3949ab;
    color: #fff;
}

.pagelist a.active {
    background: #3949ab;
    color: #fff;
    font-weight: bold;
    pointer-events: none; /* Disable clicking on the active page */
}
/* More Link */
.more-link {
    font-size: 0.9rem;
    color: #3949ab;
    text-decoration: none;
    float: right;
    margin-top: -1.5rem;
}

.more-link:hover {
    text-decoration: underline;
}

/* Section Title Link */
.section-title-link {
    text-decoration: none;
    color: #3949ab;
    font-weight: bold;
}

.section-title-link:hover {
    text-decoration: underline;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between; /* Ensure title and More button are on opposite ends */
    align-items: center; /* Vertically align items */
    margin-bottom: 1rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #3949ab;
    line-height: 1.5; /* Ensure consistent vertical alignment */
}

.more-link {
    font-size: 0.9rem;
    color: #3949ab;
    text-decoration: none;
    font-weight: bold;
    line-height: 1.5; /* Match the line-height of the title */
}

.more-link:hover {
    text-decoration: underline;
}
