/* 推荐文章样式 - 从内联echo样式提取 */
.recommended-article-item {
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.recommended-article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.recommended-article-content {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.recommended-article-image {
    width: 180px;
    height: 150px;
    object-fit: cover;
    flex-shrink: 0;
}

.recommended-article-info {
    padding: 15px 20px;
    flex: 1;
    min-width: 0;
}

.recommended-article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.recommended-article-title a {
    color: #333;
    text-decoration: none;
}

.recommended-article-title a:hover {
    color: #0d6efd;
}

.recommended-article-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommended-article-meta {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.recommended-article-meta span {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

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

@media (max-width: 768px) {
    .recommended-article-content {
        flex-direction: column;
    }
    .recommended-article-image {
        width: 100%;
        height: auto;
        max-height: 180px;
    }
}

/* 热门文章样式 - 从内联echo样式提取 */
.hot-article-wrapper {
    position: relative;
}

.hot-article-item {
    position: relative;
    transition: all 0.3s ease;
    padding: 5px 0;
}

/* 热门文章简介样式 - 与标题字体大小一致 */
.hot-article-summary {
    font-size: 12px;
    color: inherit;
    line-height: 1.4;
    margin: 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-article-item:hover {
    transform: translateX(4px);
}

.hot-article-hover {
    position: absolute;
    left: 0;
    bottom: 100%;
    width: 285px;
    height: 105px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 10px;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.first-hot-article .hot-article-hover {
    top: 100%;
    bottom: auto;
    margin-bottom: 0;
    margin-top: 10px;
}

.first-hot-article .hot-article-hover::before {
    top: -16px;
    bottom: auto;
    border-bottom-color: white;
    border-top-color: transparent;
}

.hot-article-wrapper:hover .hot-article-hover {
    visibility: visible;
    opacity: 1;
}

.hot-article-hover::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -16px;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
}

.hot-article-hover-content {
    display: flex;
    height: 100%;
}

.hot-article-cover {
    width: 80px;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.hot-article-info {
    flex: 1;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hot-article-meta {
    font-size: 10px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.hot-article-meta i {
    margin-right: 3px;
}

.hot-article-title {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 优化排名数字样式 */
.hot-rank-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
}

.rank-first {
    background-color: #dc3545 !important;
    color: white !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.rank-second {
    background-color: #fd7e14 !important;
    color: white !important;
    box-shadow: 0 0 0 2px rgba(253, 126, 20, 0.2);
}

.rank-third {
    background-color: #ffc107 !important;
    color: white !important;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.rank-fourth {
    background-color: #6c757d !important;
    color: white !important;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
}

.rank-fifth {
    background-color: #adb5bd !important;
    color: white !important;
    box-shadow: 0 0 0 2px rgba(173, 181, 189, 0.2);
}

.hot-article-item:hover .hot-rank-number {
    transform: scale(1.1);
}

/* 评论样式 - 从内联echo样式提取 */
.comment-item {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

/* 评论文章标题单行显示 */
.text-xs .whitespace-nowrap {
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.text-xs .whitespace-nowrap span {
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: middle;
}

.text-xs a.text-primary {
    display: inline-block;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    line-height: inherit;
}

.comment-item:hover {
    border-left-color: #0d6efd;
    transform: translateX(5px);
    background-color: #f8f9fa;
}

.comment-avatar {
    background: linear-gradient(135deg, #00e6af 0%, #006fff 100%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 111, 255, 0.3);
    transition: all 0.3s ease;
    font-size: 16px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-item:hover .comment-avatar {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 111, 255, 0.4);
    background: linear-gradient(135deg, #006fff 0%, #00e6af 100%);
}

.comment-meta {
    font-size: 11px;
}

.comment-content {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
    background-color: #f8f5f0;
    padding: 8px 12px;
    border-radius: 4px;
}

/* h2标题白色横条样式 */
h2.text-2xl.font-bold {
    position: relative;
    padding: 12px 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 20px !important;
    display: block;
    width: 100%;
}

/* h2标题鼠标交互效果 */
h2.text-2xl.font-bold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    background-color: #f8f9fa;
}

/* 标题图标样式增强 */
h2.text-2xl.font-bold i {
    transition: transform 0.3s ease;
}

h2.text-2xl.font-bold:hover i {
    transform: scale(1.2);
}

/* 模态框动画样式 - 从JavaScript动态样式提取 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
}