/* 全局样式 */
:root {
    --primary-color: #8527d2b2;
    --secondary-color: #f5f5f5eb;
    --text-color: #333;
    --light-text: #fff;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 修改body样式，添加背景图片 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-color);
    background-image: url('https://cdn.jsdelivr.net/gh/FunctionHookTJU/fxHook.io@master/resources/img/background.png');/*此处添加背景图片*/
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-color);
    line-height: 1.6;
    /* 添加半透明遮罩，增强可读性 */
    position: relative;

    /* 布局改成Flex */
    display: flex;
    flex-flow: column nowrap;

    /* 最小高度是100vh */
    min-height: 100vh;
}

/* 添加背景遮罩层 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(245, 245, 245, 0.29);
    z-index: -1;
}



/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;

    /* 自动延展 */
    flex: 1;
}

/* 日记页面特殊容器样式 */
.diary-container {
    display: flex;
    gap: 2rem;
}

/* 导航栏样式 */
header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: #f0f0f0;
}

/* 主要内容样式 */
main {
    padding: 2rem 0;
    flex: 1;
}

/* 日记页面主内容区 */
.diary-main {
    flex: 3;
}

/* 个人信息卡片 */
.profile-card {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.profile-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.profile-info p {
    font-size: 1.1rem;
    color: #666;
}

/* 内容部分样式 */
.content-section {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.content-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.content-section p {
    margin-bottom: 1rem;
}

/* 图片展示样式 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* 自定义tooltip样式 */
.image-card {
    position: relative;
}

.image-card img {
    cursor: pointer;
}

.image-card::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.image-card:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: 15px;
}

/* 将重复的.image-card定义合并为一个，并调整图片尺寸 */
.image-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    width: 80%;
    margin: 0 auto;
    padding-bottom: 40%; /* 保持1:1比例 */
    overflow: hidden;
    background-color: white;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.image-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f5f5f5;
    transition: var(--transition);
}

.image-card:hover img {
    transform: scale(1.05);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 视频部分样式 */
.video-section {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 1.5rem;
}

.video-section iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* 服务器信息样式 */
.server-info {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.server-info p {
    margin-bottom: 0.8rem;
}

.server-info strong {
    color: var(--primary-color);
}

/* 图标链接样式 */
.icon-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.icon-link:hover {
    text-decoration: underline;
}

/* PDF列表样式 */
.pdf-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.pdf-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

.pdf-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.pdf-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.pdf-item p {
    color: #666;
    font-size: 0.9rem;
}

/* PDF查看器样式 */
.pdf-viewer {
    display: none;
    margin-top: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.pdf-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.pdf-container {
    height: 70vh;
}

.pdf-container embed {
    width: 100%;
    height: 100%;
    border: none;
}

/* 日记条目样式 */
.diary-entry {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.diary-entry:last-child {
    border-bottom: none;
}

.entry-date {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.entry-content {
    line-height: 1.8;
}

/* 侧边栏样式 */
aside {
    flex: 1;
    padding: 2rem 0;
}

.calendar-section {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 5rem;
}

.calendar-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-align: center;
}

/* 日历样式 */
.calendar {
    width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-nav {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
}

.calendar-nav:hover {
    opacity: 0.9;
}

.calendar-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-table th {
    background-color: #f0f0f0;
    padding: 0.5rem;
    text-align: center;
}

.calendar-table td {
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    border: 1px solid #eee;
}

.calendar-table td:hover {
    background-color: #f0f8ff;
}

.calendar-table .today {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.calendar-table .other-month {
    color: #ccc;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none;
}

/* 页脚样式 */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 2rem 0;
    margin-top: 3rem;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-card {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        display: none;
    }

    .image-grid,
    .pdf-list {
        grid-template-columns: 1fr;
    }
    
    .diary-container {
        flex-direction: column;
    }
    
    aside {
        order: -1;
    }
}


/* 音频播放器样式 */
#audio-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(133, 39, 210, 0.8); /* 使用主题紫色 */
    color: white;
    padding: 10px 15px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#audio-player:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background-color: rgba(133, 39, 210, 0.9);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.player-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.volume-slider-container {
    width: 80px;
}

#volume-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

#volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: transform 0.3s ease;
}

#volume-slider::-moz-range-thumb:hover {
    transform: scale(1.3);
}

.music-title {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #audio-player {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
    }
    
    .music-title {
        display: none; /* 在移动端隐藏标题以节省空间 */
    }
    
    .volume-slider-container {
        width: 60px;
    }
}

/* 静音按钮样式 */
#mute-button-container {
    list-style: none;
}

.mute-btn {
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mute-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.mute-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* 确保在小屏幕上正确显示 */
@media (max-width: 768px) {
    .mute-btn {
        font-size: 1rem;
        padding: 3px 8px;
    }
}
/* 更小的图片网格 - 一排四张 */
.small-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 更小的图片卡片样式 */
.small-image-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 保持1:1比例 */
    overflow: hidden;
}

.small-image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.small-image-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f5f5f5;
}

/* 在CSS文件末尾添加以下样式 */
/* 圆形图片网格容器 */
.round-image-grid {
    display: flex;
    justify-content: flex-end; /* 使内容靠右对齐 */
    gap: 0.5rem;
    margin-top: 1rem;
}

/* 调整圆形图片卡片样式以适应flex布局 */
.round-image-card {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.round-image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.round-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保证图片填满整个圆形区域 */
}

/* 单个圆形图片的简单容器 */
.single-round-image {
    display: inline-block;
    margin: 0.5rem;
}

/* 折叠栏目样式 */
.collapsible-section {
    margin-top: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.collapsible-header {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.collapsible-header:hover {
    background-color: #e9ecef;
}

.collapsible-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.collapse-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: white;
}

.collapsible-content > * {
    padding: 1rem 1.5rem;
}

.collapsible-content .pdf-item {
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    border-radius: 0;
}

.collapsible-content .pdf-item:last-child {
    border-bottom: none;
}
