/* 小绿（绿坝娘）风格博客样式 */
:root {
    --green-light: #90EE90;
    --green-main: #32CD32;
    --green-deep: #228B22;
    --green-dark: #006400;
    --pink-accent: #FFB6C1;
    --cream: #F5FFF5;
    --white: #FFFFFF;
    --shadow: rgba(34, 139, 34, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 移动端点按元素时不再闪半透明白色高亮（避免"点击变白"的错觉） */
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 50%, #A5D6A7 100%);
    min-height: 100vh;
    color: #2E7D32;
    line-height: 1.8;
}

/* 飘落的叶子动画 */
.leaves {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.leaf {
    position: absolute;
    font-size: 20px;
    animation: falling linear infinite;
    opacity: 0.6;
}

@keyframes falling {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 头部 */
.header {
    background: linear-gradient(180deg, var(--green-main) 0%, var(--green-deep) 100%);
    padding: 2rem 1rem;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px var(--shadow);
}

.header::before {
    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");
    pointer-events: none;
}

.logo-container {
    position: relative;
    z-index: 1;
}

.logo-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 4px;
}

.logo-sub {
    font-size: 1rem;
    color: var(--green-light);
    margin-top: 0.5rem;
    letter-spacing: 2px;
}

.birthday-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

/* 导航栏 */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-container ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.nav-container li a {
    display: block;
    padding: 1rem 1.2rem;
    color: var(--green-deep);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-container li a:hover,
.nav-container li a.active {
    color: var(--green-main);
    background: var(--cream);
    border-bottom-color: var(--green-main);
}

/* 主容器 */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

/* 欢迎横幅 */
.welcome-banner {
    background: linear-gradient(135deg, var(--white) 0%, var(--cream) 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px var(--shadow);
    border: 2px solid var(--green-light);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.xiaolu-avatar {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--green-light), var(--green-main));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border: 4px solid white;
    box-shadow: 0 4px 15px var(--shadow);
    animation: bounce 2s ease-in-out infinite;
}

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

.welcome-text h2 {
    color: var(--green-dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.welcome-text p {
    color: var(--green-deep);
    font-size: 0.95rem;
}

/* 文章卡片 */
.content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s;
    border: 1px solid #C8E6C9;
    display: flex;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
    border-color: var(--green-main);
}

.post-thumbnail {
    width: 180px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--green-light), var(--green-main));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
}

.post-content {
    padding: 1.5rem;
    flex: 1;
}

.post-date {
    display: inline-block;
    background: var(--cream);
    color: var(--green-deep);
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.post-title {
    font-size: 1.3rem;
    color: var(--green-dark);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.post-excerpt {
    color: #558B2F;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--cream);
    color: var(--green-deep);
    padding: 0.2rem 0.7rem;
    border-radius: 10px;
    font-size: 0.8rem;
    border: 1px solid var(--green-light);
}

.read-more {
    display: inline-block;
    color: var(--green-main);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.read-more:hover {
    color: var(--green-deep);
    transform: translateX(5px);
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px var(--shadow);
    border: 1px solid #C8E6C9;
}

.widget-title {
    color: var(--green-dark);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px dashed var(--green-light);
    text-align: center;
    letter-spacing: 2px;
}

/* 个人信息 */
.profile-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--green-light), var(--green-main));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 3px solid white;
    box-shadow: 0 4px 10px var(--shadow);
}

.profile-name {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--green-dark);
    margin-bottom: 0.5rem;
}

.profile-bio {
    text-align: center;
    font-size: 0.9rem;
    color: var(--green-deep);
    line-height: 1.6;
}

/* 最新文章 */
.latest-posts {
    list-style: none;
}

.latest-posts li {
    padding: 0.8rem 0;
    border-bottom: 1px dashed #E8F5E9;
}

.latest-posts li:last-child {
    border-bottom: none;
}

.latest-posts a {
    color: var(--green-deep);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.3rem;
    transition: color 0.3s;
}

.latest-posts a:hover {
    color: var(--green-main);
}

.latest-date {
    font-size: 0.75rem;
    color: #81C784;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tag-item {
    background: var(--cream);
    color: var(--green-deep);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid var(--green-light);
    transition: all 0.3s;
}

.tag-item:hover {
    background: var(--green-main);
    color: white;
    transform: scale(1.05);
}

/* 标签选中态（点击后保持），深底主题在 themes.css 中另有适配 */
.tag-item.active {
    background: var(--green-main);
    color: white;
}

/* 绿坝护航提示 */
.guardian-box {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 2px solid var(--green-main);
}

.guardian-box p {
    font-size: 0.85rem;
    color: var(--green-dark);
    line-height: 1.6;
}

.guardian-box .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* 页脚 */
.footer {
    background: linear-gradient(180deg, var(--green-deep) 0%, var(--green-dark) 100%);
    color: white;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--green-light);
}

.footer-section p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--green-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--white);
    color: var(--green-deep);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--green-light);
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: var(--green-main);
    color: white;
    border-color: var(--green-main);
}

.page-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-dots {
    padding: 0.5rem;
    color: var(--green-light);
}

/* 响应式 */
@media (max-width: 900px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .welcome-banner {
        flex-direction: column;
        text-align: center;
    }

    .post-card {
        flex-direction: column;
    }

    .post-thumbnail {
        width: 100%;
        height: 150px;
    }

    .logo-text {
        font-size: 1.8rem;
    }

    /* 移动端导航栏优化，减小padding避免占满屏幕 */
    .nav-container {
        padding: 0 0.5rem;
    }

    .nav-container ul {
        gap: 0.25rem;
    }

    .nav-container li a {
        padding: 0.6rem 0.7rem;
        font-size: 0.9rem;
    }
}

/* 小屏手机进一步优化 */
@media (max-width: 480px) {
    .nav-container li a {
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
    }

    .nav-container ul {
        gap: 0.15rem;
    }
}

/* 爱心动画 */
.heart {
    color: var(--pink-accent);
    animation: heartbeat 1.5s ease-in-out infinite;
}

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

/* 随机小绿图片组件 */
.random-image-container {
    text-align: center;
}

.random-image {
    width: 100%;
    border-radius: 12px;
    border: 3px solid var(--green-light);
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s ease;
    margin-bottom: 0.8rem;
}

.random-image:hover {
    border-color: var(--green-main);
    transform: scale(1.02);
    box-shadow: 0 6px 20px var(--shadow);
}

.image-info {
    font-size: 0.8rem;
    color: var(--green-deep);
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.6rem;
    background: var(--cream);
    border-radius: 8px;
    border: 1px solid var(--green-light);
}

.image-info:empty {
    display: none;
}

.image-hint {
    font-size: 0.75rem;
    color: #81C784;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.image-hint a {
    color: var(--green-main);
    text-decoration: none;
}

.image-hint a:hover {
    text-decoration: underline;
}

.refresh-btn {
    background: linear-gradient(135deg, var(--green-light), var(--green-main));
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s;
    box-shadow: 0 2px 8px var(--shadow);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
    background: linear-gradient(135deg, var(--green-main), var(--green-deep));
}

.refresh-btn:active {
    transform: translateY(0);
}

/* 友情链接 */
.friend-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.friend-link-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: var(--green-bg, #f0fff0);
    border: 1px solid var(--green-light, #90EE90);
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.friend-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(50, 205, 50, 0.25);
    border-color: var(--green-main, #32CD32);
}

.friend-link-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.friend-link-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.friend-link-name {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--green-deep, #228B22);
}

.friend-link-desc {
    font-size: 0.78rem;
    color: var(--green-dark, #2E8B57);
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-link-icon-img {
    width: 2rem;
    height: 1.6rem;
    object-fit: contain;
    display: block;
}

/* 绿坝放置 - 游戏入口与全屏遮罩层 */
.clicker-entry {
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.clicker-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.9);
}

.clicker-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.clicker-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    z-index: 10002;
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 10px;
    background: var(--green-main, #32CD32);
    color: #fff;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clicker-close:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
