/* ===========================================================
   唐山师范学院吧 · 共用样式
   原站使用 Tailwind Play CDN（运行时编译），此处仅放
   自定义工具类与动画，避免被构建步骤影响。
   =========================================================== */

:root {
    --primary: #0465bc;
    --secondary: #2575fc;
    --accent: #4c94ff;
    --light: #f0f4f8;
    --dark: #333333;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ---------- 自定义工具类（原 @layer utilities 内容） ---------- */
.content-auto {
    content-visibility: auto;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-scale {
    transition: transform 0.3s ease;
}

.animate-scale:hover {
    transform: scale(1.05);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #0465bc 0%, #2575fc 100%);
}

.nav-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ---------- 动画关键帧 ---------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ---------- 顶部搜索框（重新设计） ---------- */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 9999px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.search-input {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    outline: none;
    border-radius: 9999px;
    font-size: 1rem;
    line-height: 1.5;
    color: #333333;
}

.search-button {
    padding: 0.75rem 1.5rem;
    background-color: #2575fc;
    color: white;
    border: none;
    outline: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #0465bc;
}

/* ---------- 多行文本截断（文章摘要） ---------- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- 文章正文排版（.article-content） ---------- */
.article-content {
    font-size: 1.0625rem;
    line-height: 1.9;
    color: #374151;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0465bc;
    margin: 2rem 0 0.75rem;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 1.5rem 0 0.5rem;
}

.article-content p {
    margin-bottom: 1.1rem;
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.1rem 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: #2575fc;
    text-decoration: underline;
}

.article-content blockquote {
    border-left: 4px solid #2575fc;
    padding: 0.5rem 0 0.5rem 1rem;
    margin: 1.25rem 0;
    color: #6b7280;
    background: #f0f4f8;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
}

.article-content strong {
    color: #111827;
    font-weight: 600;
}

.article-content img {
    border-radius: 0.75rem;
    margin: 1.25rem 0;
    max-width: 100%;
}

/* ---------- 返回顶部按钮 ---------- */
#backToTop {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 40;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}
