
/* ========================================
   首页优化样式 - 学霸3985
   ======================================== */

/* 全局禁用首字变大 */
article::first-letter, .content-section::first-letter, .featured-news::first-letter, .featured-news-body::first-letter, .article-detail-content::first-letter { 
    float: none !important; 
    font-size: inherit !important; 
    line-height: inherit !important; 
    margin: 0 !important; 
    padding: 0 !important; 
}

/* 导航栏 */
.topnav {
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 8px 0;
}

.navbar-brand {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-logo {
    height: 32px;
    width: auto;
    border-radius: 4px;
}

.active > .nav-link {
    color: #03a87c !important;
    font-weight: 600;
}

.nav-link:hover {
    color: #03a87c !important;
}

/* 主容器 */
.main-wrapper {
    padding-top: 70px;
    padding-bottom: 30px;
}

/* 置顶文章 */
.top-article {
    background: #f8fffe;
    border-left: 4px solid #03a87c;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}

.top-badge {
    display: inline-block;
    background: #03a87c;
    color: #fff;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 8px;
}

.top-article h1 {
    font-size: 1.2rem;
    margin: 0 0 8px;
    line-height: 1.5;
}

.top-article h1 a {
    color: #212529;
    text-decoration: none;
}

.top-article h1 a:hover {
    color: #03a87c;
}

.top-meta {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

/* 内容区块 */
.content-section {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.section-head {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #03a87c;
}

.section-head i {
    color: #03a87c;
    margin-right: 8px;
}

/* 文章列表 */
.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-list li {
    border-bottom: 1px solid #f1f3f5;
}

.article-list li:last-child {
    border-bottom: none;
}

.article-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    gap: 12px;
}

.article-list a:hover .article-title {
    color: #03a87c;
}

.article-title {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-date {
    font-size: 12px;
    color: #adb5bd;
    white-space: nowrap;
}

/* 侧边栏 */
.sidebar-box {
    background: #fff;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.sidebar-head {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #03a87c;
}

.sidebar-head i {
    color: #03a87c;
    margin-right: 6px;
}

/* 教辅列表 - 紧凑版 */
.book-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.book-list li {
    border-bottom: 1px solid #f5f5f5;
}

.book-list li:last-child {
    border-bottom: none;
}

.book-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    text-decoration: none;
}

.book-list a:hover .book-title {
    color: #03a87c;
}

.book-list img {
    width: 36px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.book-list .book-info {
    flex: 1;
    min-width: 0;
}

.book-list .book-title {
    display: block;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-list .book-date {
    display: block;
    font-size: 11px;
    color: #adb5bd;
    margin-top: 2px;
}

/* 快捷入口 */
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-links a {
    display: inline-block;
    padding: 6px 14px;
    background: #f8f9fa;
    color: #333;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.quick-links a:hover {
    background: #03a87c;
    color: #fff;
}

/* 热门学校 */
.school-tabs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.school-group {
    padding-bottom: 12px;
    border-bottom: 1px dashed #e9ecef;
}

.school-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.school-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.school-level {
    font-size: 14px;
    font-weight: 600;
    color: #03a87c;
    text-decoration: none;
}

.school-level:hover {
    color: #028a66;
    text-decoration: underline;
}

.more-link {
    font-size: 12px;
    color: #6c757d;
    text-decoration: none;
}

.more-link:hover {
    color: #03a87c;
}

.school-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.school-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f8f9fa;
    color: #333;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #e9ecef;
}

.school-tag:hover {
    background: #03a87c;
    color: #fff;
    border-color: #03a87c;
    text-decoration: none;
}

/* 响应式 */
@media (max-width: 991px) {
    .main-wrapper {
        padding-top: 60px;
    }
}

@media (max-width: 767px) {
    .article-title {
        white-space: normal;
    }
    
    .article-date {
        display: none;
    }
}

/* 水印 - 全站table自动添加，约20行居中显示一次，45度倾斜 */
table {
    position: relative;
    overflow: hidden;
}

table::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='600'%3E%3Ctext x='50%25' y='280' font-size='18' fill='%23000' fill-opacity='0.2' font-weight='bold' font-family='Arial' text-anchor='middle' dominant-baseline='middle' transform='rotate(-45 400 300)'%3E学霸3985%3C/text%3E%3Ctext x='50%25' y='340' font-size='16' fill='%23000' fill-opacity='0.2' font-family='Arial' text-anchor='middle' dominant-baseline='middle' transform='rotate(-45 400 300)'%3Exueba3985.com%3C/text%3E%3C/svg%3E");
    background-repeat: repeat-y;
    background-position: center;
}

/* 隐藏旧的text-watermark */
.text-watermark {
    display: none;
}

/* ========================================
   全站通用样式
   ======================================== */

/* 面包屑导航 */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 16px;
    font-size: 13px;
}

.breadcrumb-item a {
    color: #6c757d;
}

.breadcrumb-item a:hover {
    color: #03a87c;
}

.breadcrumb-item.active {
    color: #333;
}

/* 文章详情页 */
.article-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-detail-meta {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.article-detail-meta span {
    margin-right: 20px;
}

.article-detail-meta i {
    margin-right: 5px;
}

.article-detail-content {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
}

.article-detail-content p {
    margin-bottom: 16px;
}

/* 分类页置顶文章 */
.featured-news {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.featured-news-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.featured-news-body {
    padding: 16px;
}

.featured-news-body h3 {
    font-size: 1.1rem;
    margin: 0 0 8px;
    line-height: 1.4;
}

.featured-news-body h3 a {
    color: #212529;
    text-decoration: none;
}

.featured-news-body h3 a:hover {
    color: #03a87c;
}

.featured-news-meta {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

/* 教辅列表页 */
.books-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.book-item-card {
    border-bottom: 1px solid #f1f3f5;
    padding-bottom: 12px;
}

.book-item-card:last-child {
    border-bottom: none;
}

.book-item-card a {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.book-item-card a:hover .book-item-title {
    color: #03a87c;
}

.book-item-img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.book-item-info {
    flex: 1;
}

.book-item-title {
    font-size: 14px;
    color: #333;
    margin: 0 0 6px;
    line-height: 1.4;
}

.book-item-price {
    font-size: 15px;
    font-weight: 600;
    color: #e74c3c;
    margin: 0;
}

/* 学校页面通用样式 */
.school-page-container {
    padding-top: 70px;
    padding-bottom: 30px;
}

/* 列表组优化 */
.list-group-item.active {
    background-color: #03a87c;
    border-color: #03a87c;
}

.list-group-item-action:hover {
    color: #03a87c;
}

/* 导航标签优化 */
.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 16px;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #03a87c;
}

.nav-tabs .nav-link.active {
    color: #03a87c;
    border-bottom-color: #03a87c;
    background: transparent;
}

/* 下拉菜单优化 */
.dropdown-item:hover {
    background-color: #f8fffe;
    color: #03a87c;
}

/* 表格优化 */
.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 14px;
}

.table td {
    font-size: 14px;
    vertical-align: middle;
}

.table a {
    color: #03a87c;
}

.table a:hover {
    color: #028a66;
}

/* 徽章优化 */
.badge-dark {
    background-color: #212529;
}

.badge-light {
    background-color: #f8f9fa;
    color: #333;
}

/* 警告框优化 */
.alert-primary {
    background-color: #f8fffe;
    border-color: #03a87c;
    color: #333;
}

/* 学校页面切换按钮 - 高级感 */
.school-switcher {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
}

.school-switcher .dropdown {
    flex: 1;
    margin-bottom: 0;
}

.school-switcher .btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    border: none;
    transition: all 0.3s ease;
}

.school-switcher .btn-level {
    background: linear-gradient(135deg, #03a87c 0%, #028a66 100%);
    border-radius: 8px 0 0 8px;
    box-shadow: 0 2px 8px rgba(3, 168, 124, 0.3);
}

.school-switcher .btn-area {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.school-switcher .btn:hover {
    transform: translateY(-1px);
}

.school-switcher .btn-level:hover {
    box-shadow: 0 4px 12px rgba(3, 168, 124, 0.4);
}

.school-switcher .btn-area:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.dropdown {
    margin-bottom: 16px;
}

.dropdown .btn-secondary {
    background: linear-gradient(135deg, #03a87c 0%, #028a66 100%);
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    border-radius: 6px 0 0 6px;
    box-shadow: 0 2px 8px rgba(3, 168, 124, 0.3);
    transition: all 0.3s ease;
}

.dropdown .btn-secondary:first-child {
    border-radius: 6px 0 0 6px;
}

.dropdown .btn-secondary.dropdown-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 6px 6px 0;
    padding: 10px 16px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.dropdown .btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3, 168, 124, 0.4);
}

.dropdown .btn-secondary.dropdown-toggle:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 8px 0;
    margin-top: 8px;
}

.dropdown-menu .dropdown-item {
    padding: 10px 20px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
}

.dropdown-menu .dropdown-item:hover {
    background: linear-gradient(135deg, #f8fffe 0%, #e8f8f5 100%);
    color: #03a87c;
    padding-left: 24px;
}

/* 学校列表标题优化 */
.list-group-item-dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 12px 16px;
}


/* 导航品牌文字 + footer 优化（方向三补充） */
.navbar-brand .brand-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #212529;
    letter-spacing: 0.5px;
}
.navbar-brand .brand-text:hover { color: #03a87c; }

.site-footer { font-size: 13px; }
.footer-brand { font-size: 15px; }
.footer-links a {
    color: #6c757d;
    text-decoration: none;
    margin: 0 2px;
}
.footer-links a:hover { color: #03a87c; }

/* 搜索框视觉统一 */
.form-inline .form-control:focus {
    border-color: #03a87c;
    box-shadow: 0 0 0 0.2rem rgba(3,168,124,0.15);
}
