/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

/* 粒子画布 - 提高层级到毛玻璃上方 */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3; /* 高于毛玻璃的z-index:2 */
}

/* 背景容器：固定100%视口尺寸，隐藏溢出 */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/bj.png') center center / cover no-repeat; /* 直接设置背景 */
    background-attachment: fixed; /* 固定背景 */
    filter: brightness(0.5) blur(2px);
    z-index: 0;
    overflow: hidden;
}
/* 主容器 */
.main-container {
    position: relative;
    display: flex;
    min-height: 100vh;
    z-index: 2; /* 毛玻璃层级低于粒子 */
}

/* 左侧边栏 */
.sidebar {
    width: 300px;
    padding: 2rem;
    backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    height: 100vh;
}

/* 头像样式 */
.avatar {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar:hover .play-icon {
    opacity: 1;
}

/* 个人信息 */
.profile {
    text-align: center;
    margin-bottom: 2rem;
}

.profile h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.profile p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.social-links a {
    color: #fff;
    font-size: 1.2rem;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #61dafb;
}

.about h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.about p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* 右侧内容区 */
.content {
    flex: 1;
    margin-left: 300px;
    padding: 3rem;
}

.blog-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
/* 搜索框样式 */
.search-container {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

#searchInput {
    flex: 1;
    padding: 0.8rem 1rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#searchBtn {
    padding: 0 1.2rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

#searchBtn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.blog-header p {
    color: rgba(255, 255, 255, 0.8);
}

/* 博客卡片 */
.blog-list {
    display: grid;
    gap: 1.5rem;
}

.blog-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 2; /* 毛玻璃卡片层级低于粒子 */
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.blog-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.blog-card .date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-card .excerpt {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.blog-card .excerpt a {
    color: #61dafb;
    text-decoration: none;
    font-weight: 500;
}

/* 左侧栏版权备案样式 */
.copyright-sidebar {
    margin-top: auto; /* 利用flex布局推到侧边栏底部 */
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.copyright-sidebar a {
    color: #61dafb;
    text-decoration: none;
}

.copyright-sidebar a:hover {
    text-decoration: underline;
}

.sidebar {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.countdown-card {
    margin: 2rem 0;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    text-align: center;
}

.countdown-card h3 {
    color: #f8f9fa;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}


.countdown-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffd700;
    line-height: 1.8;
}

.countdown-value span {
    display: inline-block;
    width: 30px;
}

.target-date {
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {

    .code-scroller {
    left: 0;
    padding: 1rem;
  }
  .code-content {
    font-size: 0.85rem;
    animation-duration: 45s;
  }

    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .content {
        margin-left: 0;
        padding: 2rem;
    }
}