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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

a:hover {
    color: #e74c3c;
}

.clearfix::after {
    content: '';
    display: block;
    clear: both;
}

.wm-container {
    width: 1200px;
    margin: 0 auto;
}

.portal-top-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}

.portal-top-bar .wm-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-top-bar-left span {
    margin-right: 20px;
}

.portal-top-bar-right a {
    color: #fff;
    margin-left: 20px;
}

.portal-top-bar-right a:hover {
    color: #ffd700;
}

.portal-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px 0;
}

.portal-header .wm-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-logo a {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
}

.portal-logo img {
    max-height: 50px;
    margin-right: 10px;
}

.portal-search {
    display: flex;
    width: 500px;
}

.portal-search input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #667eea;
    border-right: none;
    border-radius: 25px 0 0 25px;
    font-size: 14px;
    outline: none;
}

.portal-search button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

.portal-search button:hover {
    transform: scale(1.05);
}

.portal-hot-words {
    margin-top: 8px;
    font-size: 12px;
}

.portal-hot-words a {
    color: #666;
    margin-right: 15px;
}

.portal-hot-words a:hover {
    color: #667eea;
}

.portal-search-box {
    width: 550px;
}

.portal-nav {
    background: #2c3e50;
    margin-top: 10px;
}

.portal-nav ul {
    display: flex;
    list-style: none;
}

.portal-nav li {
    position: relative;
}

.portal-nav a {
    display: block;
    padding: 15px 25px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.portal-nav a:hover,
.portal-nav li.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.portal-nav li:first-child a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.portal-main {
    padding: 20px 0;
}

.portal-hero {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.portal-category-left,
.portal-category-right {
    width: 220px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.portal-category-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

.portal-category-list {
    padding: 10px;
}

.portal-category-list a {
    display: block;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    transition: all 0.3s;
}

.portal-category-list a:hover {
    background: #f8f9fa;
    padding-left: 20px;
    color: #667eea;
}

.portal-category-list a:last-child {
    border-bottom: none;
}

.portal-carousel {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    height: 320px;
}

.portal-carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.portal-carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.portal-carousel-item.active {
    opacity: 1;
}

.portal-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 30px 20px 20px;
    color: #fff;
}

.portal-carousel-caption h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.portal-carousel-caption p {
    font-size: 14px;
    opacity: 0.9;
}

.portal-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 60px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.portal-carousel-nav:hover {
    background: rgba(0,0,0,0.6);
}

.portal-carousel-prev {
    left: 10px;
}

.portal-carousel-next {
    right: 10px;
}

.portal-carousel-dots {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.portal-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.portal-carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
}

.portal-section {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.portal-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #667eea;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.portal-section-title {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    position: relative;
    padding-left: 15px;
}

.portal-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.portal-section-more {
    color: #667eea;
    font-size: 14px;
}

.portal-section-more:hover {
    color: #764ba2;
}

.portal-section-body {
    padding: 20px;
}

.portal-book-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.portal-book-item {
    text-align: center;
    transition: transform 0.3s;
}

.portal-book-item:hover {
    transform: translateY(-5px);
}

.portal-book-cover {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.portal-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-book-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-book-author {
    font-size: 12px;
    color: #999;
}

.portal-two-col {
    display: flex;
    gap: 20px;
}

.portal-col-main {
    flex: 1;
}

.portal-col-side {
    width: 300px;
}

.portal-rank-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.portal-rank-item:last-child {
    border-bottom: none;
}

.portal-rank-num {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: #eee;
    color: #666;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.portal-rank-item:nth-child(1) .portal-rank-num {
    background: #e74c3c;
    color: #fff;
}

.portal-rank-item:nth-child(2) .portal-rank-num {
    background: #f39c12;
    color: #fff;
}

.portal-rank-item:nth-child(3) .portal-rank-num {
    background: #3498db;
    color: #fff;
}

.portal-rank-info {
    flex: 1;
}

.portal-rank-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-rank-author {
    font-size: 12px;
    color: #999;
}

.portal-rank-hits {
    font-size: 12px;
    color: #e74c3c;
}

.portal-update-table {
    width: 100%;
    border-collapse: collapse;
}

.portal-update-table th,
.portal-update-table td {
    padding: 12px 8px;
    text-align: left;
    font-size: 13px;
}

.portal-update-table th {
    background: #f8f9fa;
    color: #666;
    font-weight: 500;
}

.portal-update-table tr:nth-child(even) {
    background: #fafafa;
}

.portal-update-table tr:hover {
    background: #f0f7ff;
}

.portal-update-table .portal-update-category {
    color: #667eea;
    font-weight: 500;
}

.portal-update-table .portal-update-chapter {
    color: #333;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-update-table .portal-update-time {
    color: #999;
}

.portal-footer {
    background: #2c3e50;
    color: #999;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.portal-footer-top {
    display: flex;
    justify-content: space-between;
    padding-bottom: 30px;
    border-bottom: 1px solid #3d4f63;
}

.portal-footer-col {
    width: 23%;
}

.portal-footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}

.portal-footer-col ul {
    list-style: none;
}

.portal-footer-col li {
    margin-bottom: 10px;
}

.portal-footer-col a {
    color: #999;
    font-size: 13px;
}

.portal-footer-col a:hover {
    color: #667eea;
}

.portal-footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 13px;
}

.portal-footer-bottom p {
    margin-bottom: 8px;
}
