/*
Theme Name: Rainbow Blog
Description: Rainbow Blog WordPress Theme - 广西杰康健康管理咨询有限公司
Version: 1.0
Author: 小美
*/

/* 基础样式 */
* {
    font-family: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(180deg, #fefff4 0%, #f7fee7 100%);
    min-height: 100vh;
}

/* 渐变文本 */
.gradient-text {
    background: linear-gradient(135deg, #65a30d, #84cc16);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #4d7c0f 0%, #65a30d 50%, #84cc16 100%);
}

/* 玻璃效果 */
.glass {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(16px) saturate(1.8);
    -webkit-backdrop-filter: blur(16px) saturate(1.8);
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(168,85,247,0.15);
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeIn 0.5s ease-out both;
}

/* 浮动动画 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* 文章正文样式 */
.prose h2, .prose h3 {
    color: #4d7c0f;
}

.prose strong {
    color: #65a30d;
}

.prose ul, .prose ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

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

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d9f99d;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a3e635;
}

/* 链接样式 */
a {
    text-decoration: none;
    color: inherit;
}

/* 导航链接 */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: #374151;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: #f0fdf4;
    color: #16a34a;
}

.nav-link.active {
    background-color: #f0fdf4;
    color: #16a34a;
    font-weight: 600;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f0fdf4;
    color: #15803d;
    font-size: 0.75rem;
    border-radius: 9999px;
}

/* 文章卡片 */
.post-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(228, 231, 235, 0.5);
    padding: 1.5rem;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(168,85,247,0.15);
}

/* 头像 */
.avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    border: 4px solid #d9f99d;
    margin: 0 auto 0.75rem;
    object-fit: cover;
}

/* 分类筛选标签 */
.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1.5px solid #e5e7eb;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.cat-tab:hover {
    border-color: #86efac;
    color: #16a34a;
    background: #f0fdf4;
}

.cat-tab.active {
    background: linear-gradient(135deg, #4d7c0f 0%, #65a30d 50%, #84cc16 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px -2px rgba(74, 124, 15, 0.3);
}

/* 关于页标签 */
.about-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfccb 100%);
    color: #4d7c0f;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    border: 1.5px solid #d9f99d;
    transition: all 0.2s;
}

.about-tag:hover {
    background: linear-gradient(135deg, #4d7c0f 0%, #65a30d 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -2px rgba(74, 124, 15, 0.3);
}

/* 移动端导航 */
nav .flex.items-center.gap-1 {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap !important;
}
nav .flex.items-center.gap-1::-webkit-scrollbar {
    display: none;
}

/* 手机上只显示emoji */
@media (max-width: 480px) {
    nav .flex.items-center.gap-1 a span.text-xs {
        display: none;
    }
    nav .flex.items-center.gap-1 a {
        padding: 0.4rem 0.5rem;
        font-size: 1.1rem;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .flex {
        flex-direction: column;
    }
    
    .w-64 {
        width: 100%;
    }
    
    .sticky {
        position: relative;
        top: 0;
    }
}
