:root {
    --teal: #00b8ae;
    --teal-d: #008f87;
    --teal-dd: #006f69;
    --teal-xl: #e0f9f8;
    --teal-l: #b2f0ed;
    --gold: #f5a623;
    --text: #1a2a2a;
    --text-m: #4a6060;
    --text-l: #7a9090;
    --bg: #f4fffe;
    --white: #fff;
    --radius: 14px;
    --shadow: 0 4px 24px rgba(0,184,174,0.10);
    --shadow-h: 0 8px 36px rgba(0,184,174,0.20);
}

/* 全局样式 */
* {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f8fafc;
}

.news-hero{
    position: relative;
    background: linear-gradient(135deg, var(--teal-dd) 0%, var(--teal) 55%, #00d4c8 100%);
    padding: 42px 40px 40px;
    overflow: hidden;
}


/* Banner区域优化 */
.bg-gradient-to-r {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.bg-gradient-to-r::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

.bg-gradient-to-r::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* 分类按钮优化 */
.category-btn {
    background: white;
    color: #64748b;
    border: 2px solid transparent;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #42d3c8;
    color: #333;
}

.category-btn.active {
    background: #42d3c8;
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* 新闻卡片优化 */
.news-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* 卡片内部 flex 容器自适应高度 */
.news-card > div {
    align-items: stretch;
}

/* 图片容器：固定 237×237 */
.news-card-img {
    width: 237px;
    height: 237px;
    flex-shrink: 0;
    overflow: hidden;
}

/* 图片填满容器 */
.news-card-img img {
    width: 237px;
    height: 237px;
    object-fit: cover;
    display: block;
}

/* 暂无图片占位符同尺寸 */
.news-card .news-no-thumb {
    width: 237px;
    height: 237px;
}

@media (max-width: 768px) {
    .news-card-img {
        width: 100%;
        height: 180px;
    }
    .news-card-img img {
        width: 100%;
        height: 180px;
    }
    .news-card .news-no-thumb {
        width: 100%;
        height: 180px;
    }
}

/* 拉伸链接：点击整张卡片均可跳转 */
.news-card-link::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

/* 新闻卡片图片容器（Tailwind md:w-2/5 兼容） */
.news-card .md\:w-2\/5 {
    overflow: hidden;
    position: relative;
}

/* 暂无图片占位符 */
.news-no-thumb {
    width: 245px;
    height: 205px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #94a3b8;
}

.news-no-thumb svg {
    width: 48px;
    height: 48px;
    stroke: #cbd5e1;
}

.news-no-thumb span {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .news-no-thumb {
        width: 100%;
        height: 160px;
    }
}


img[src*="statics/images"] {
    position: relative;
}

img[src*="statics/images"]::after {
    content: '🐾';
    font-size: 4rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* 标题样式优化 */
.news-card h2 {
    line-height: 1.4;
}

.news-card h2 a {
    display: inline;
}

/* 分类标签优化 */
.news-card .rounded-full {
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 热门标签动画优化 */
.text-red-600 {
    animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 2px rgba(220, 38, 38, 0.5));
    }
    50% {
        opacity: 0.8;
        filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.8));
    }
}

/* 侧边栏卡片优化 */
.lg\:col-span-1 .bg-white {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.lg\:col-span-1 .bg-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* 搜索框优化 */
input[type="text"] {
    transition: all 0.3s ease;
    background: #f8fafc;
    border: 2px solid transparent;
}

input[type="text"]:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* 热门新闻列表优化 */
.space-y-4 li {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px;
    border-radius: 8px;
    margin: 0 -8px;
}

.space-y-4 li:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
    transform: translateX(8px);
}

/* 排名徽章优化 */
.space-y-4 li span.flex-shrink-0 {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 700;
    transition: all 0.3s ease;
}

.space-y-4 li:hover span.flex-shrink-0 {
    transform: scale(1.1) rotate(5deg);
}

/* 排名各不同背景色（覆盖 Tailwind bg-red-600） */
.space-y-4 li:nth-child(1) span.flex-shrink-0 { background-color: #ef4444; }
.space-y-4 li:nth-child(2) span.flex-shrink-0 { background-color: #f97316; }
.space-y-4 li:nth-child(3) span.flex-shrink-0 { background-color: #eab308; }
.space-y-4 li:nth-child(4) span.flex-shrink-0 { background-color: #3b82f6; }
.space-y-4 li:nth-child(5) span.flex-shrink-0 { background-color: #8b5cf6; }

/* 分类链接优化 */
.category-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin: 0 -12px;
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.category-link:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%);
    border-left: 4px solid #667eea;
    padding-left: 20px;
    transform: translateX(4px);
}

/* 联系方式卡片优化 */
.bg-gradient-to-br {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.bg-gradient-to-br::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.bg-gradient-to-br > * {
    position: relative;
    z-index: 1;
}

.bg-gradient-to-br button {
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bg-gradient-to-br button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* 返回顶部按钮优化 */
#backToTop {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    bottom: 80px;
}

#backToTop.show {
    opacity: 1;
    pointer-events: auto;
    animation: slideIn 0.4s ease-out;
}

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

#backToTop:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.6);
}

#backToTop:active {
    transform: translateY(-2px) scale(0.95);
}

/* 分页按钮优化 */
nav button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
}

nav button:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

nav button.bg-blue-600 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tag-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 20px;
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.tag-badge::before {
    content: ''; width: 6px; height: 6px;
    border-radius: 50%; background: currentColor; opacity: .7;
}



/* 阅读进度条优化 */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #ec4899 100%);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
}

/* 加载动画优化 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 空状态优化 */
#emptyState {
    animation: fadeIn 0.6s ease;
}

#emptyState svg {
    animation: floatSlow 3s ease-in-out infinite;
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* 文字截断 */
.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;
}

.items-center .author{display: flex;align-items: center;gap: 8px;}
.items-center .icon-img{width: 24px; height: 24px;border-radius: 50%;background-color: #e0e0e0;}

/* 响应式优化 */
@media (max-width: 768px) {
    .news-card img {
        min-height: 200px;
    }

    .news-card h2 {
        font-size: 1.25rem;
    }

    nav .text-2xl {
        font-size: 1.25rem;
    }
}

/* 滚动条使用浏览器默认样式 */

/* 通知提示优化 */
.notification {
    animation: slideInRight 0.4s ease-out;
    backdrop-filter: blur(10px);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}