/* --- 全局设置 --- */
:root {
    /* 提取自你提供的CSS颜色偏好 */
    --link-color: #6900ff;
    --visited-color: black;
    --hover-bg: #cdfeaa;
    --active-bg: #6900ff;
    --active-text: #cdfeaa;
    --card-bg: rgba(255, 255, 255, 0.6); /* 半透明白色 */
}

body {
    /* 背景图设置 - 请确保图片路径正确 */
    background: url("picture/anime/bg.jpg") no-repeat center center fixed;
    background-size: cover;
    
    /* 字体设置 */
    font-family: "Comic Sans MS", "Chalkboard SE", "Hannotate SC", fantasy, cursive, sans-serif;
    font-size: 1.2rem;
    margin: 0;
    min-height: 100vh; /* 确保页面至少占满屏幕高度 */
    display: flex;
    flex-direction: column;
    color: #333;
}

/* --- 导航栏 --- */
nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

nav li a {
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 15px;
    transition: all 0.3s;
    text-decoration: none;
}

/* --- 通用头部标题 --- */
h1 {
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    margin: 30px 0;
    font-size: 2.5rem;
    font-family: fantasy, cursive;
}

/* --- 布局容器 --- */
#container {
    width: 90%; 
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
    flex: 1; /* 让内容撑满，把footer挤下去 */
}

/* --- 卡片样式 --- */
.post {
    background-color: var(--card-bg);
    backdrop-filter: blur(3px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.post:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.8);
}

.post h2 {
    margin-top: 0;
    color: #444;
    font-size: 1.4rem;
}

.post p {
    color: #d63031; /* 红色文字 */
    font-weight: bold;
    margin: 10px 0 20px 0;
    line-height: 1.4;
}

/* --- 链接样式 --- */
a {
    outline-color: transparent;
    text-decoration: none;
    font-family: sans-serif;
    transition: background 0.2s, color 0.2s;
}

/* 让文章内的链接看起来像按钮 */
.post a {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.6);
    border: 2px solid var(--link-color);
}

a:link { color: var(--link-color); }
a:visited { color: var(--visited-color); }

/* 悬停效果 */
a:hover, .post a:hover {
    background: var(--hover-bg);
    text-decoration: none;
    transform: scale(1.05);
}

a:focus { background: #bae498; }
a:active {
    background: var(--active-bg);
    color: var(--active-text);
}

/* --- 页脚 --- */
footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.9rem;
    margin-top: auto;
}

footer p {
    color: #eee !important;
}

footer a {
    color: #cdfeaa;
}

.cc-icons img {
    height: 22px !important;
    margin-left: 3px;
    vertical-align: text-bottom;
}