* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 贡献者卡片容器样式 */
.contributor-wrapper {
    position: relative;
    border-radius: 0.5rem;
    padding: 2px;
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
}

/* 发光边框效果 - 现在默认显示 */
.contributor-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.5rem;
    padding: 2px;
    background: linear-gradient(45deg,
            #ff0000,
            #ff7300,
            #fffb00,
            #48ff00,
            #00ffd5,
            #002bff,
            #7a00ff,
            #ff00c8,
            #ff0000);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background-size: 400%;
    animation: borderRotate 20s linear infinite;
    opacity: 1;
    /* 默认显示动画 */
}

/* 悬停时整个卡片放大 */
.contributor-wrapper:hover {
    transform: scale(1.02);
    /* 小幅度放大 */
}

@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 400% 50%;
    }
}

.contributor {
    border-radius: 0.5rem;
    background: white;
    position: relative;
    z-index: 1;
    height: 100%;
}

.contribution-tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 6px;
    margin-bottom: 6px;
    display: inline-block;
}

/* 垂直滚动条 */
/* 全局滚动条基础样式 */
* {
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: #db91f3 #ffd6d6;
}

/* Webkit 浏览器的滚动条样式 (Chrome, Safari, Edge 等) */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    background: #ffd6d6;
}

::-webkit-scrollbar-button {
    display: none;
}

::-webkit-scrollbar-track {
    background: #ffd6d6;
}

::-webkit-scrollbar-track-piece {
    display: none;
}

::-webkit-scrollbar-thumb {
    background: #db91f3;
    border-radius: 3px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #b63f9a;
}

::-webkit-scrollbar-corner {
    background: #ffd6d6;
}

/* Sidebar 特定的滚动条样式 */
.sidebar {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* iOS 滚动惯性 */
    /* 标准滚动行为 */
    overscroll-behavior: smooth;
    -webkit-overflow-behavior: smooth;
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: #db91f3 #ffd6d6;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    background: #ffd6d6;
}

.sidebar::-webkit-scrollbar-button {
    display: none;
}

.sidebar::-webkit-scrollbar-track {
    background: #ffd6d6;
}

.sidebar::-webkit-scrollbar-track-piece {
    display: none;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #db91f3;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #b63f9a;
}

.sidebar::-webkit-scrollbar-corner {
    background: #ffd6d6;
}

/* 移动端优化 */
@media (max-width: 768px) {

    /* 保持基础滚动行为 */
    .sidebar {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* 使用系统默认的弹性滚动 */
        overscroll-behavior: auto;
        /* 优化触摸体验 */
        touch-action: pan-y;
    }

    /* 确保滚动条在支持的设备上保持一致样式 */
    .sidebar::-webkit-scrollbar {
        width: 3px;
        /* 移动端稍细一点 */
    }

    .sidebar::-webkit-scrollbar-thumb {
        border-radius: 1.5px;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .header-content {
        padding: 0 0.5rem;
    }

    h1.text-3xl {
        font-size: 1.5rem;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    * {
        scrollbar-color: #db91f3 #2d2d2d;
    }

    ::-webkit-scrollbar,
    ::-webkit-scrollbar-track,
    ::-webkit-scrollbar-corner {
        background: #2d2d2d;
    }

    .sidebar::-webkit-scrollbar,
    .sidebar::-webkit-scrollbar-track,
    .sidebar::-webkit-scrollbar-corner {
        background: #2d2d2d;
    }
}

/* 响应式布局增强 */
.grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 移动端导航优化 */
@media (max-width: 480px) {
    nav {
        gap: 0.5rem;
        font-size: 1rem;
    }

    .logo {
        width: 50px;
        height: 50px;
    }

    .contributor-wrapper {
        margin-bottom: 1rem;
    }
}

/* 修复iframe在移动端的显示 */
iframe {
    width: 100%;
    height: 800px;
    border: 0;
    overflow: hidden;
}

@media (max-width: 768px) {
    iframe {
        height: 800px;
    }
}

/* 修复容器溢出 */
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

/* 提高内容区域的可读性 */
.content-area {
    flex: 1;
    padding: 1rem 0;
}

/* 小屏幕贡献者卡片样式微调 */
@media (max-width: 480px) {
    .contributor {
        padding: 1rem !important;
    }

    .contribution-tag {
        font-size: 0.7rem;
        padding: 1px 6px;
        margin-right: 4px;
        margin-bottom: 4px;
    }
}

header {
    background-color: #f8f9fa;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1001;
}

.header-content {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    width: 50px;
    height: 50px;
}

.header-logo img {
    width: 100%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.header-logo img:hover {
    transform: scale(1.15);
}

nav.top-nav {
    display: flex;
    gap: 0.5rem;
}

nav.top-nav a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

nav.top-nav a:hover {
    color: #007bff;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1002;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .header-content {
        padding: 0 20px;
    }
}

iframe {
    display: block;
    /* 让 iframe 变成块级元素 */
    width: 100%;
    /* 让它占满容器 */
    height: 365px;
    /* 设定高度 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* 添加阴影 */
    border-radius: 10px;
    /* 圆角 */
}

@media (max-width: 1300px) {
    iframe {
        height: 450px;
    }
}

@media (max-width: 1100px) {
    iframe {
        height: 750px;
    }
}

@media (max-width: 768px) {
    iframe {
        height: 750px;
    }
}

@media (max-width: 480px) {
    iframe {
        height: 600px;
    }
}

/* 添加以下内容到你的 style.css 文件 */

/* 基础文本样式 */
.text-3xl {
    font-size: 1.875rem;
    /* 30px */
    line-height: 2.25rem;
    /* 36px */
}

.text-xl {
    font-size: 1.25rem;
    /* 20px */
    line-height: 1.75rem;
    /* 28px */
}

.text-lg {
    font-size: 1.125rem;
    /* 18px */
    line-height: 1.75rem;
    /* 28px */
}

.text-sm {
    font-size: 0.875rem;
    /* 14px */
    line-height: 1.25rem;
    /* 20px */
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

/* 颜色类 */
.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-blue-800 {
    color: #1e40af;
}

.text-green-800 {
    color: #166534;
}

.text-purple-800 {
    color: #5b21b6;
}

.text-red-800 {
    color: #991b1b;
}

.text-yellow-800 {
    color: #854d0e;
}

.text-pink-800 {
    color: #9d174d;
}

.text-indigo-800 {
    color: #3730a3;
}

.bg-white {
    background-color: #fff;
}

.bg-blue-100 {
    background-color: #dbeafe;
}

.bg-green-100 {
    background-color: #dcfce7;
}

.bg-purple-100 {
    background-color: #f3e8ff;
}

.bg-red-100 {
    background-color: #fee2e2;
}

.bg-yellow-100 {
    background-color: #fef9c3;
}

.bg-pink-100 {
    background-color: #fce7f3;
}

.bg-indigo-100 {
    background-color: #e0e7ff;
}

/* 间距类 */
.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.ml-4 {
    margin-left: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* 布局类 */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* 弹性布局类 */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

/* 圆角类 */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* 阴影类 */
.shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

/* 对象适配类 */
.object-cover {
    object-fit: cover;
}

/* 贡献者卡片特定样式 */
.contribution-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* 垂直间距类 */
.space-y-2>*+* {
    margin-top: 0.5rem;
}

/* 内容区域样式 */
.content-area {
    padding-top: 6rem;
    /* 为固定头部留出空间 */
    padding-bottom: 2rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .content-area {
        padding-top: 5rem;
    }

    .text-3xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
}

/* 基础重置和约束 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #f8fafc;
    /* 添加一个柔和的背景色 */
}

/* 内容区域约束 */
.content-area {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1rem;
}

/* 贡献者卡片尺寸约束 */
.contributor-wrapper {
    width: 100%;
    max-width: 400px;
    /* 限制卡片最大宽度 */
    margin: 0 auto 1.5rem;
    /* 居中并添加底部间距 */
}

/* 网格布局调整 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

/* 卡片内部间距调整 */
.contributor {
    padding: 1.25rem;
    /* 比原来的 p-6(1.5rem)稍小 */
}

/* 头像尺寸约束 */
.contributor img {
    width: 48px;
    /* 替代原来的 w-12 */
    height: 48px;
    /* 替代原来的 h-12 */
}

/* 文本行高调整 */
.contributor p {
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

/* 移动端调整 */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        padding: 0.5rem;
    }

    .contributor-wrapper {
        max-width: 100%;
    }

    .contributor {
        padding: 1rem;
    }
}

/* 标题大小调整 */
h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}
/* ====== 返回顶部按钮样式 ====== */
#backToTop {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 72px;
  height: 72px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 999;
  overflow: hidden;
  animation: breathing 3s ease-in-out infinite;
}

/* 呼吸闪动 */
@keyframes breathing {
  0%, 100% { box-shadow: 0 0 15px rgba(54 243 178 / 58%); }
  50% { box-shadow: 0 0 25px rgba(184 73 218 / 58%); }
}

/* 图片 */
#backToTop img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  position: absolute;
  z-index: 2;
  transition: transform 0.4s ease;
}

/* 滚动进度环 */
.progress-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  z-index: 1;
}
.progress-ring__background {
  fill: none;
  stroke: rgba(230 157 157 / 32%);
  stroke-width: 8;
}
.progress-ring__circle {
  fill: none;
  stroke: #d786dc;
  stroke-width: 8;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.2s ease;
}

/* 显示状态 */
#backToTop.show {
  display: flex;
  opacity: 1;
  animation: fadeInUp 0.4s ease, breathing 3s ease-in-out infinite;
}

/* 悬停动效 */
#backToTop:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}
#backToTop:hover img {
  transform: translateY(-2px) rotate(-8deg);
}

/* 点击反馈 */
#backToTop:active {
  transform: scale(0.9);
}

/* 出现动画 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  #backToTop {
    background: rgba(40, 40, 40, 0.6);
  }
  .progress-ring__background {
    stroke: rgba(255, 255, 255, 0.1);
  }
}

/* 手机端优化 */
@media (max-width: 768px) {
  #backToTop {
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
  }
}

.back-link {
    display: inline-block;
    margin: 20px 0;
    color: #3498db;
    text-decoration: none;
    font-weight: 500
}

.back-link:hover {
    text-decoration: underline
}