/* 全局样式 */
:root {
    --primary-color: #7c5cff;
    --primary-light: #a78bfa;
    --secondary-color: #ec4899;
    --gradient-start: #667eea;
    --gradient-end: #f093fb;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border-color: #e8e8e8;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #fce4ec 0%, #e8eaf6 50%, #e3f2fd 100%);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* 疯狂动物城背景动画 */
.zootopia-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    z-index: 0;
    overflow: hidden;
}

/* 动物角色 - 使用emoji和CSS绘制 */
.animal {
    position: absolute;
    font-size: 40px;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: auto;
}

/* 鼠标悬停效果 */
.animal:hover {
    opacity: 1;
    transform: scale(1.5) rotate(10deg);
    animation-play-state: paused;
    filter: drop-shadow(0 0 10px rgba(255, 200, 100, 0.8));
}

/* 点击动画 */
.animal.clicked {
    animation: bounce 0.6s ease-out, spin 0.6s ease-out;
}

/* 爱心飘出动画 */
.heart-burst {
    position: absolute;
    pointer-events: none;
    font-size: 20px;
    animation: heartFloat 1s ease-out forwards;
}

@keyframes heartFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(1.2);
    }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.4) rotate(-15deg); }
    50% { transform: scale(0.9) rotate(10deg); }
    75% { transform: scale(1.2) rotate(-5deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 朱迪兔子 */
.judy {
    left: 5%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 25s;
}
.judy::before {
    content: '🐰';
}

/* 尼克狐狸 */
.nick {
    right: 8%;
    top: 40%;
    animation-delay: -5s;
    animation-duration: 22s;
}
.nick::before {
    content: '🦊';
}

/* 闪电树懒 */
.flash {
    left: 15%;
    bottom: 30%;
    animation-delay: -10s;
    animation-duration: 30s;
    font-size: 35px;
}
.flash::before {
    content: '🦥';
}

/* 牛局长 */
.bogo {
    right: 15%;
    top: 15%;
    animation-delay: -3s;
    animation-duration: 28s;
    font-size: 45px;
}
.bogo::before {
    content: '🐃';
}

/* 绵羊副市长 */
.bellwether {
    left: 80%;
    bottom: 20%;
    animation-delay: -8s;
    animation-duration: 24s;
    font-size: 35px;
}
.bellwether::before {
    content: '🐑';
}

/* 豹警官 */
.clawhauser {
    left: 3%;
    top: 60%;
    animation-delay: -12s;
    animation-duration: 26s;
    font-size: 38px;
}
.clawhauser::before {
    content: '🐆';
}

/* 大先生 */
.bigmr {
    right: 5%;
    bottom: 40%;
    animation-delay: -15s;
    animation-duration: 32s;
    font-size: 30px;
}
.bigmr::before {
    content: '🐭';
}

/* 狮子市长 */
.lionheart {
    left: 40%;
    top: 8%;
    animation-delay: -7s;
    animation-duration: 27s;
    font-size: 42px;
}
.lionheart::before {
    content: '🦁';
}

/* 小动物们 */
.bunny1 {
    left: 25%;
    top: 70%;
    animation-delay: -2s;
    animation-duration: 20s;
    font-size: 28px;
}
.bunny1::before {
    content: '🐇';
}

.fox1 {
    right: 25%;
    top: 55%;
    animation-delay: -18s;
    animation-duration: 23s;
    font-size: 30px;
}
.fox1::before {
    content: '🦊';
}

/* 胡萝卜和甜甜圈装饰 */
.carrot {
    left: 60%;
    top: 25%;
    animation-delay: -4s;
    animation-duration: 18s;
    font-size: 25px;
}
.carrot::before {
    content: '🥕';
}

.donut {
    right: 35%;
    bottom: 15%;
    animation-delay: -9s;
    animation-duration: 21s;
    font-size: 25px;
}
.donut::before {
    content: '🍩';
}

/* 警徽装饰 */
.badge {
    left: 50%;
    bottom: 35%;
    animation-delay: -14s;
    animation-duration: 19s;
    font-size: 22px;
}
.badge::before {
    content: '⭐';
}

/* 更多动物角色 */
.elephant {
    left: 70%;
    top: 45%;
    animation-delay: -6s;
    animation-duration: 29s;
    font-size: 45px;
}
.elephant::before {
    content: '🐘';
}

.giraffe {
    right: 3%;
    top: 25%;
    animation-delay: -11s;
    animation-duration: 31s;
    font-size: 42px;
}
.giraffe::before {
    content: '🦒';
}

.hippo {
    left: 8%;
    bottom: 15%;
    animation-delay: -16s;
    animation-duration: 33s;
    font-size: 40px;
}
.hippo::before {
    content: '🦛';
}

.tiger {
    right: 40%;
    top: 12%;
    animation-delay: -4s;
    animation-duration: 24s;
    font-size: 38px;
}
.tiger::before {
    content: '🐯';
}

.bear {
    left: 35%;
    bottom: 8%;
    animation-delay: -13s;
    animation-duration: 26s;
    font-size: 36px;
}
.bear::before {
    content: '🐻';
}

.panda {
    right: 12%;
    bottom: 55%;
    animation-delay: -8s;
    animation-duration: 28s;
    font-size: 35px;
}
.panda::before {
    content: '🐼';
}

.koala {
    left: 55%;
    top: 65%;
    animation-delay: -19s;
    animation-duration: 25s;
    font-size: 32px;
}
.koala::before {
    content: '🐨';
}

.wolf {
    right: 55%;
    bottom: 25%;
    animation-delay: -7s;
    animation-duration: 27s;
    font-size: 34px;
}
.wolf::before {
    content: '🐺';
}

.deer {
    left: 18%;
    top: 35%;
    animation-delay: -20s;
    animation-duration: 30s;
    font-size: 36px;
}
.deer::before {
    content: '🦌';
}

.otter {
    right: 20%;
    top: 70%;
    animation-delay: -3s;
    animation-duration: 22s;
    font-size: 30px;
}
.otter::before {
    content: '🦦';
}

.raccoon {
    left: 45%;
    bottom: 50%;
    animation-delay: -17s;
    animation-duration: 24s;
    font-size: 32px;
}
.raccoon::before {
    content: '🦝';
}

.hedgehog {
    right: 65%;
    top: 50%;
    animation-delay: -9s;
    animation-duration: 21s;
    font-size: 28px;
}
.hedgehog::before {
    content: '🦔';
}

/* 更多装饰 */
.pawprint {
    left: 30%;
    top: 15%;
    animation-delay: -5s;
    animation-duration: 20s;
    font-size: 22px;
}
.pawprint::before {
    content: '🐾';
}

.pawprint2 {
    right: 30%;
    bottom: 45%;
    animation-delay: -12s;
    animation-duration: 23s;
    font-size: 20px;
}
.pawprint2::before {
    content: '🐾';
}

.icecream {
    left: 75%;
    bottom: 30%;
    animation-delay: -6s;
    animation-duration: 19s;
    font-size: 24px;
}
.icecream::before {
    content: '🍦';
}

.blueberry {
    right: 45%;
    top: 35%;
    animation-delay: -15s;
    animation-duration: 22s;
    font-size: 22px;
}
.blueberry::before {
    content: '🫐';
}

/* 漂浮动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) translateX(20px) rotate(5deg);
    }
    50% {
        transform: translateY(-15px) translateX(-15px) rotate(-3deg);
    }
    75% {
        transform: translateY(-40px) translateX(10px) rotate(3deg);
    }
}

/* 确保内容在动画之上 */
.navbar, .main-content, .footer, .container {
    position: relative;
    z-index: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.3);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.navbar-brand img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar-menu a {
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.navbar-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 15px;
}

.navbar-search input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    width: 150px;
    font-size: 14px;
}

.navbar-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* 主内容区 */
.main-content {
    display: flex;
    gap: 24px;
    padding: 24px 0;
}

.content-left {
    flex: 1;
    min-width: 0;
}

.content-right {
    width: 320px;
    flex-shrink: 0;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.card-body {
    padding: 20px;
}

/* 文章卡片 */
.article-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: all 0.3s;
}

.article-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.article-cover {
    width: 200px;
    height: 140px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-cover img {
    transform: scale(1.05);
}

.article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-title:hover {
    color: var(--primary-color);
}

.article-summary {
    color: var(--text-light);
    font-size: 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.tag {
    padding: 3px 10px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border-radius: 12px;
    font-size: 12px;
}

.tag-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

/* 置顶标签 */
.top-badge {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

/* 侧边栏 */
.sidebar-card {
    margin-bottom: 20px;
}

/* 博主信息卡片 */
.author-card {
    text-align: center;
    padding: 30px 20px;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 4px solid var(--primary-light);
    box-shadow: 0 4px 15px rgba(124, 92, 255, 0.3);
}

.author-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.author-intro {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
}

.author-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* 公告卡片 */
.notice-content {
    padding: 15px;
    background: linear-gradient(135deg, #fff5f5, #f5f0ff);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-light);
}

/* 热门文章 */
.hot-article-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
}

.hot-article-item:last-child {
    border-bottom: none;
}

.hot-article-cover {
    width: 70px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.hot-article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-article-info {
    flex: 1;
}

.hot-article-title {
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-article-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 分类列表 */
.category-list {
    list-style: none;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.category-item:last-child {
    border-bottom: none;
}

.category-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-count {
    background: var(--primary-light);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud .tag {
    cursor: pointer;
    transition: all 0.3s;
}

.tag-cloud .tag:hover {
    transform: scale(1.1);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.pagination a:hover,
.pagination .active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 30px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* 响应式 */
@media (max-width: 992px) {
    .content-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .article-card {
        flex-direction: column;
    }
    
    .article-cover {
        width: 100%;
        height: 180px;
    }
    
    .navbar-menu {
        display: none;
    }
}
