/* General Styles */ * { box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; margin: 0; padding: 0; background-color: #fff; color: #333; } .container { width: 90%; max-width: 1200px; margin: auto; overflow: hidden; padding: 0 20px; } /* --- Sticky Navigation Bar --- */ .sticky-nav-wrapper { position: fixed; top: 0; left: 0; width: 100%; background-color: #FADADD; /* 保持截图中的粉色背景 */ z-index: 1000; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: background-color 0.3s ease; /* 新增:平滑过渡效果 */ } /* .sticky-nav-wrapper .container 的 padding: 0 20px; 会保持内容居中 */ /* 新增:导航栏滚动后的样式 */ .sticky-nav-wrapper.scrolled-nav { background-color: rgba(250, 218, 221, 0.85); /* 半透明粉色,可调整透明度 (0.85) */ } .header-top-bar-content { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; /* 导航栏的垂直内边距 */ } .logo a { font-size: 24px; font-weight: bold; color: #333; text-decoration: none; text-transform: uppercase; } .main-nav ul { list-style: none; padding: 0; margin: 0; display: flex; } .main-nav li { margin-left: 25px; } .main-nav a { text-decoration: none; color: #333; font-weight: 500; font-size: 16px; } .main-nav a:hover { color: #007bff; } /* --- Hero Area --- */ .site-hero-area { background-color: #FADADD; /* 粉色背景,现在只用于英雄图片区域 */ /* padding-top 将由 JS 设置,以避免被固定导航栏遮挡 */ } .hero-image-placeholder { background-color: #FEC5D6; /* 英雄图占位符的备用背景色 */ height: 300px; /* 英雄图高度 */ display: flex; align-items: center; justify-content: center; color: #864659; /* 英雄图上文字颜色 */ font-size: 2em; font-weight: bold; text-align: center; background-image: url('placeholder-hero.jpg'); /* 替换为您的英雄图片URL */ background-size: cover; background-position: center; } .hero-image-placeholder .hero-text { background-color: rgba(250, 218, 221, 0.6); /* 文字背景,增加可读性 */ padding: 10px 20px; border-radius: 5px; } /* --- Main Content Area --- */ .main-content-area { /* 用于包裹博客主要内容,方便整体控制 */ /* 如果需要,可以在这里添加额外的上边距,但目前由 .site-hero-area 的 padding-top 控制 */ } .blog-main-title { text-align: center; font-size: 28px; color: #333; margin: 40px 0 20px 0; font-weight: 600; } .filter-buttons { text-align: center; margin-bottom: 30px; } .filter-button { background-color: #007bff; color: white; border: none; padding: 10px 20px; margin: 0 5px; border-radius: 5px; cursor: pointer; font-size: 16px; font-weight: 500; } .filter-button:hover { background-color: #0056b3; } .posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; } /* --- Post Card Styles (Corrected and Improved) --- */ .post-card { background: #fff; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); overflow: hidden; display: flex; flex-direction: column; } .post-card-image { height: 200px; background-color: #333; /* 图片加载失败时的备用背景 */ background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; position: relative; } .post-card-image .play-icon { background-color: rgba(0, 0, 0, 0.5); border-radius: 50%; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: background-color 0.2s ease-in-out; font-size: 0; /* 隐藏原始的 "►" 字符 */ border: none; /* 确保没有额外的边框 */ } .post-card-image .play-icon::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 10px 0 10px 15px; /* TopHeight RightWidth BottomHeight LeftWidth */ border-color: transparent transparent transparent rgba(255, 255, 255, 0.95); /* 三角形颜色 */ display: block; margin-left: 3px; /* 根据实际效果微调此值以使三角形视觉居中 */ } .post-card-image .play-icon:hover { background-color: rgba(0, 0, 0, 0.7); /* 悬停时背景变暗 */ } .post-card-image .image-title-overlay { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); color: white; background-color: rgba(0,0,0,0.6); padding: 5px 15px; border-radius: 3px; font-size: 1em; font-weight: bold; text-align: center; white-space: nowrap; } .post-card-image .image-subtitle-overlay { position: absolute; top: 48px; /* 示例值,请根据 image-title-overlay 的实际高度和间距调整 */ left: 50%; transform: translateX(-50%); color: #eee; background-color: rgba(0,0,0,0.5); padding: 2px 8px; border-radius: 3px; font-size: 0.8em; white-space: nowrap; } .polytopia-watermark { position: absolute; bottom: 10px; left: 10px; color: rgba(255, 255, 255, 0.6); background-color: rgba(0,0,0,0.4); padding: 2px 5px; border-radius: 2px; font-size: 0.7em; text-transform: uppercase; } .post-card-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; } .post-card-content h2 { margin-top: 0; margin-bottom: 5px; font-size: 1.3em; color: #222; font-weight: 600; } .post-card-content .date { font-size: 0.85em; color: #666; margin-bottom: 15px; display: block; } .post-card-content p { font-size: 0.95em; color: #444; margin-bottom: 15px; flex-grow: 1; } .post-card-content .go-there-link { color: #007bff; text-decoration: none; font-weight: 500; font-size: 0.95em; align-self: flex-start; } .post-card-content .go-there-link:hover { text-decoration: underline; } /* --- Footer Styles --- */ footer { background: #222; color: #ccc; text-align: center; padding: 40px 20px 20px 20px; margin-top: 40px; } .footer-top-social { margin-bottom: 30px; display: flex; justify-content: center; align-items: center; } .footer-top-social a { color: #fff; text-decoration: none; font-size: 1.3em; margin: 0 12px; } .footer-top-social a:hover { color: #00A2FF; } footer .footer-columns { display: flex; flex-wrap: wrap; justify-content: space-around; margin-bottom: 30px; max-width: 1200px; margin-left: auto; margin-right: auto; } footer .footer-column { flex: 1; min-width: 200px; margin: 10px 20px; text-align: left; } footer .footer-column h4 { color: #fff; border-bottom: none; padding-bottom: 5px; margin-bottom: 15px; font-size: 1.1em; font-weight: 600; } footer .footer-column ul { list-style: none; padding: 0; } footer .footer-column ul li { margin-bottom: 10px; } footer .footer-column ul li a { color: #bbb; font-size: 0.95em; } footer .footer-column ul li a:hover { color: #fff; } .community-channels-title { font-size: 1.4em; color: #fff; margin-top: 40px; margin-bottom: 20px; font-weight: 600; } .footer-bottom-social { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 30px; } .footer-bottom-social a { background-color: #333; color: #fff; text-decoration: none; width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.2em; margin: 8px; transition: background-color 0.3s ease; } .footer-bottom-social a:hover { background-color: #007bff; } footer .copyright { font-size: 0.9em; color: #888; margin-top: 20px; } /* --- Responsive Adjustments --- */ @media (max-width: 768px) { .header-top-bar-content { /* 调整固定导航栏在小屏幕上的表现 */ flex-direction: column; padding: 10px 0; /* 减少垂直内边距 */ } .logo { margin-bottom: 10px; } .main-nav ul { justify-content: center; flex-wrap: wrap; } .main-nav li { margin: 5px 10px; } .site-hero-area { /* padding-top will be dynamically adjusted by JS */ } .hero-image-placeholder { height: 200px; /* 减小英雄图高度 */ font-size: 1.5em; } .blog-main-title { font-size: 24px; } .filter-button { padding: 8px 15px; font-size: 14px; } .posts-grid { grid-template-columns: 1fr; /* 单列博文 */ } .container { /* 全局 container 调整 */ width: 95%; padding: 0 10px; } /* 固定导航栏内的 .container 也继承此处的 padding */ footer .footer-columns { flex-direction: column; align-items: center; } footer .footer-column { text-align: center; margin-bottom: 25px; width: 100%; } footer .footer-column h4 { text-align: center; } .footer-top-social { margin-bottom: 20px; } .community-channels-title { margin-top: 20px; font-size: 1.2em; } .footer-bottom-social a { width: 36px; height: 36px; font-size: 1.1em; margin: 5px; } }