/* 对牛网 现代简约专业版样式 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    background-color: #f8fafc; /* Tailwind slate-50 */
    color: #334155; /* Tailwind slate-700 */
}

/* 隐藏滚动条 */
nav::-webkit-scrollbar { display: none; }
nav { -ms-overflow-style: none; scrollbar-width: none; }

/* ===== 顶部导航 ===== */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e2e8f0;
}

.nav-link {
    position: relative;
    color: #475569;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #2563eb;
    background-color: #eff6ff;
}

.nav-link.active {
    color: #2563eb;
    font-weight: 600;
    background-color: #eff6ff;
}

/* ===== 搜索区 ===== */
.hero-section {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.search-input-wrapper {
    background: #ffffff;
    border-radius: 9999px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ===== 按钮 ===== */
.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -2px rgba(37, 99, 235, 0.2);
}

.btn-orange {
    background-color: #f97316;
    color: #ffffff;
    transition: all 0.2s ease;
}
.btn-orange:hover {
    background-color: #ea580c;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.2), 0 2px 4px -2px rgba(249, 115, 22, 0.2);
}

/* ===== 分类卡片 ===== */
.cat-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    transition: all 0.3s ease;
}
.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    border-color: #bfdbfe;
}
.cat-icon-wrapper {
    background-color: #eff6ff;
    color: #2563eb;
    border-radius: 0.75rem;
}

/* ===== 列表卡片 ===== */
.post-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}
.post-card:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}
.post-title {
    color: #1e293b;
    font-weight: 600;
}
.post-card:hover .post-title {
    color: #2563eb;
}

/* ===== 标签 ===== */
.badge {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.badge-blue {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ===== 表单 ===== */
.form-input {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
}
.form-input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    outline: none;
}

/* ===== 截断 ===== */
.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 动画 ===== */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
    opacity: 0;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.15s; }
.fade-in:nth-child(4) { animation-delay: 0.2s; }
.fade-in:nth-child(5) { animation-delay: 0.25s; }

/* ===== Footer ===== */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.footer .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .footer .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer h3 {
    position: relative;
    padding-bottom: 0.5rem;
}

.footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2rem;
    height: 2px;
    background-color: #2563eb;
    border-radius: 1px;
}

.footer ul li {
    transition: color 0.2s ease;
}

.footer ul li:hover {
    color: #1e293b;
}
