/* styles.css */

/* CSS 变量 */
/* styles.css */

/* CSS 变量 */
:root {
    --primary-color: #1E3A8A; /* 深蓝色 */
    --secondary-color: #ffffff; /* 次要颜色 */
    --background-color: rgba(255, 255, 255, 0.8); /* 内容背景色 */
    --header-bg-color: rgba(30, 58, 138, 0.9); /* 深蓝色头部背景 */
    --footer-bg-color: rgba(30, 58, 138, 0.8); /* 深蓝色页脚背景 */
    --button-bg-color: #1E3A8A;
    --button-hover-bg-color: #1C3D91;
    --modal-bg-color: rgba(0, 0, 0, 0.5);
    --text-color: #333333;
    --link-color: #FFD700; /* 与页脚背景色不同的链接颜色，如金色 */
    --link-hover-color: #FFA500; /* 悬停时颜色 */
    --transition-speed: 0.3s;
    --body-link-color: #1E90FF; /* 正文链接颜色，如道奇蓝 */
    --body-link-hover-color: #104E8B; /* 正文链接悬停颜色，如深道奇蓝 */
    --card-bg-color: #ffffff; /* 卡片背景色 */
    --card-hover-bg-color: #f0f8ff; /* 卡片悬停背景色 */
    --card-shadow: rgba(0, 0, 0, 0.1);
    --icon-color: #1E90FF; /* 图标颜色 */
}

/* 全局样式 */
body {
    position: relative;
    font-family: Arial, sans-serif; /* 使用系统默认字体 */
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: var(--text-color);
    overflow-x: hidden;
    z-index: 0;
}

/* 链接样式 */
body a {
    color: var(--body-link-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

body a:hover {
    color: var(--body-link-hover-color);
}

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

footer a:hover {
    color: var(--link-hover-color);
}

/* 优化链接样式 */
.resource-category .card {
    background-color: var(--card-bg-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--card-shadow);
    padding: 20px;
    margin: 20px 0;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed);
}

.resource-category .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--card-shadow);
    background-color: var(--card-hover-bg-color);
}

/* 卡片内链接样式 */
.resource-category .card a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin: 10px 0;
    background-color: transparent;
    border-radius: 5px;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    color: var(--body-link-color);
}

.resource-category .card a:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: scale(1.02);
    box-shadow: 0 2px 4px var(--card-shadow);
}

/* 添加图标样式 */
.resource-category .card a::before {
    content: '\f0c1'; /* Font Awesome 链接图标 */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    color: var(--icon-color);
    transition: transform var(--transition-speed);
}

.resource-category .card a:hover::before {
    transform: rotate(45deg);
}
.highlighted-contributor {
    border: 10px solid #FFD700; /* 金色边框 */
    border-radius: 10px; /* 可选：圆角边框 */
    box-shadow: 0 0 10px rgba(255, 215, 0, 1); /* 可选：金色阴影 */
}
/* 添加 Font Awesome 图标库 */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

/* 卡片布局调整 */
.resource-category .card {
    display: flex;
    flex-direction: column;
}

/* 其他现有样式保持不变 */
/* ... (保留您现有的 styles.css 内容) ... */

/* 时间轴样式 */
#timeline {
    padding: 25px 15px;
    background-color: var(--background-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 800px;
    border: 1px solid rgba(30, 58, 138, 0.1);
}

.timeline-container {
    position: relative;
    margin: 30px 0;
}

.timeline-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.timeline-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.timeline-btn:hover {
    background-color: var(--button-hover-bg-color);
    transform: translateY(-2px);
}

.timeline-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.timeline-btn i {
    margin: 0 5px;
}

.timeline-wrapper {
    position: relative;
    padding: 20px 0;
}

.timeline-line {
    position: relative;
    height: 3px;
    background-color: var(--primary-color);
    margin: 25px 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.timeline-point {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.2);
}

.timeline-point::after {
    content: attr(data-date);
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 10px;
    color: var(--text-color);
    font-weight: bold;
}

.timeline-point.active {
    background-color: var(--link-color);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.3);
    transform: translateY(-50%) scale(1.2);
    z-index: 3;
}

.timeline-point:hover {
    background-color: #3e5cb9;
    transform: translateY(-50%) scale(1.1);
}

.timeline-events {
    margin-top: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    min-height: 100px;
}

.timeline-event {
    display: none;
    padding: 15px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-align: left;
    max-width: 90%;
    margin: 0 auto;
}

.timeline-event.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.timeline-event h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.timeline-event p {
    line-height: 1.6;
    margin-bottom: 10px;
}

.timeline-event img {
    max-width: 100%;
    border-radius: 5px;
    margin: 10px 0;
}

@media (max-width: 768px) {
    .timeline-point::after {
        font-size: 10px;
        bottom: -25px;
    }
    
    .timeline-controls {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

/* 友链相关样式 */
.friends-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 15px;
}

.friends-list a {
    margin: 5px 0;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-align: center;
    background-color: #f9f9f9;
    border: 1px solid #eee;
}

.friends-list a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.add-friend-link {
    text-align: center;
    margin-top: 20px;
}

.friend-link-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.friend-link-btn:hover {
    background-color: var(--button-hover-bg-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 友链表单样式 */
.friend-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.required {
    color: #e74c3c;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.submit-btn:hover {
    background-color: var(--button-hover-bg-color);
}

.form-info {
    margin-top: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.form-info ul {
    padding-left: 20px;
}

.form-info li {
    margin-bottom: 8px;
}

.my-link-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

/* 确保新添加的样式在现有样式之后 */

body a:hover {
    color: var(--body-link-hover-color);
}

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

footer a:hover {
    color: var(--link-hover-color);
}

/* 粒子背景容器 */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* 确保在背景图片后面 */
    pointer-events: none;
}

/* 鼠标拖尾效果容器 */
#mouse-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000; /* 确保在最上层 */
}

/* 背景图片容器 */
body::before,
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transition: opacity 0.5s ease-in-out;
    z-index: -3;
}

body::before {
    background-image: url('images/background.png');
    opacity: 1;
}

body::after {
    background-image: url('images/background-mobile.jpg');
    opacity: 0;
    z-index: -2;
}

@media (max-width: 768px) {
    body::before {
        opacity: 0;
    }
    body::after {
        opacity: 1;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px; /* 头部高度 */
    background-color: var(--header-bg-color);
    color: var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.site-title {
    display: flex;
    align-items: center;
}

.logo {
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 5px;
}

header h1 {
    margin: 0;
    font-size: 1.5em;
    /* 使用系统字体 */
}

header nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

header nav ul li {
    margin-right: 15px;
}

header nav ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color var(--transition-speed);
}

header nav ul li a:hover {
    color: var(--link-hover-color);
}

/* 主要内容样式 */
main {
    padding: 80px 20px 40px 20px; /* 顶部内边距增加以避免被固定头部遮挡 */
    max-width: 1200px;
    margin: auto;
}

section {
    margin-bottom: 40px;
    background: var(--background-color);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

section h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2em;
    color: var(--primary-color);
}

.profile-image {
    display: block;
    margin: 20px auto 40px auto;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.payment-image {
    display: block;
    margin: 20px auto;
    width: 300px;
    height: 450px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
}

/* Footer */
footer {
    background-color: var(--footer-bg-color);
    color: var(--secondary-color);
    text-align: center;
    padding: 20px 0;
    position: relative;
    margin-top: 40px;
    border-radius: 10px;
}

footer a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

footer a:hover {
    color: var(--link-hover-color);
}

html {
    scroll-behavior: smooth;
}

.back-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1em;
    color: var(--secondary-color);
    background-color: var(--button-bg-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform 0.2s;
}

.back-button:hover {
    background-color: var(--button-hover-bg-color);
    transform: scale(1.05);
}

.resource-category {
    margin-bottom: 30px;
}

.resource-category h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.resource-category ul {
    list-style: disc inside;
    padding-left: 20px;
}

.resource-category ul li {
    margin-bottom: 5px;
}

.resource-category ul li a {
    color: var(--body-link-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.resource-category ul li a:hover {
    color: var(--body-link-hover-color);
    text-decoration: underline;
}

/* 悬浮菜单按钮样式 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.5em;
    cursor: pointer;
    transition: transform var(--transition-speed);
}

.menu-toggle.active {
    transform: rotate(180deg);
}

/* 悬浮按钮样式 */
#floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#floating-button:active {
    transform: scale(0.95);
}

#float-button-circle {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    color: var(--secondary-color);
}

/* 悬浮菜单样式 */
#floating-menu {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background-color: var(--header-bg-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1600; /* 提高z-index，确保在悬浮球之上 */
    padding: 10px;
    display: none; /* 默认隐藏 */
    width: 200px; /* 固定宽度，保持一致 */
    max-height: none; /* 固定高度，防止大小不一 */
    overflow: visible; /* 超出高度时启用滚动 */
    animation: fadeIn 0.3s;
}

#floating-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#floating-menu ul li {
    margin: 10px 0;
}

#floating-menu ul li a,
#floating-menu ul li button {
    color: var(--secondary-color);
    text-decoration: none;
    display: block;
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 1em;
    cursor: pointer;
    text-align: left;
    transition: color var(--transition-speed);
}

#floating-menu ul li a:hover,
#floating-menu ul li button:hover {
    color: var(--link-hover-color);
}

/* 保留移动端箭头菜单样式 */
@media (max-width: 768px) {
    /* 修改 header 样式 */
    header {
        justify-content: center; /* 居中整个头部内容 */
    }

    /* 修改 .site-title 样式 */
    .site-title {
        justify-content: center;
        text-align: center;
        margin: 0;
    }

    .site-title h1 {
        font-size: 1.2em;
        margin: 0;
    }

    .logo {
        width: 30px;
        height: 30px;
        margin-right: 5px;
    }

    /* 修改菜单按钮样式 */
    .menu-toggle {
        display: block;
        margin-left: 5px;
    }

    /* 调整导航菜单样式 */
    nav {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        background-color: rgba(50, 50, 50, 0.95);
        transition: max-height var(--transition-speed) ease-out;
        z-index: 999;
    }

    nav.active {
        max-height: 500px; /* 根据内容调整 */
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 15px 0;
    }

    nav ul li a {
        font-size: 1.2em;
    }

    /* 调整悬浮菜单位置以适配移动端 */
    #floating-button,
    #floating-menu {
        bottom: 80px;
        right: 20px;
    }
}

/* 模态窗口样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 2000; /* 确保在其他元素之上 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* 如果内容过多，则启用滚动 */
    background-color: var(--modal-bg-color);
    animation: fadeIn 0.5s;
}

/* 模态窗口内容 */
.modal-content {
    background-color: var(--secondary-color);
    margin: 10% auto;
    padding: 20px;
    border: none;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideDown 0.5s;
}

/* 关闭按钮样式 */
.close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.close:hover,
.close:focus {
    color: var(--text-color);
}

/* 贡献者图片样式 */
.contributors-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.contributors-images img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.contributors-images img:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-50px); }
    to { transform: translateY(0); }
}

/* 鼠标粒子效果样式 */
.cursor-effect {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.8;
    transform: translate(-50%, -50%);
    animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
    from { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0; transform: translate(-50%, -50%) scale(2); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 背景切换类 */
.bg-mobile::before {
    opacity: 0;
}

.bg-mobile::after {
    opacity: 1;
}