/* 公共样式 */
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

/* 容器样式 */
.container {
  max-width: 800px;
  padding: 2rem;
  margin: 2rem auto;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.error-container {
  max-width: 600px;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  text-align: center;
}

/* 标题样式 */
h1 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
}

h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

/* 段落样式 */
p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* 按钮样式 */
.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  margin-top: 1rem;
  background: #3b82f6;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.button:hover {
  background: #2563eb;
}

/* GitHub链接样式 */
.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: fit-content;
}

.github-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.github-link i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

/* 首页链接样式 */
.home-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #3b82f6;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.home-link:hover {
  background: #2563eb;
}

/* 代码样式 */
code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
}

/* 错误图标样式 */
.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: #ef4444;
}

/* 列表样式 */
ul.list-disc {
  list-style-type: disc;
  padding-left: 1.5rem;
}

ul.list-disc li {
  margin-bottom: 0.5rem;
}

/* 文本对齐 */
.text-center {
  text-align: center;
}

/* 代码块样式 */
pre {
  background: #1f2937;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow: auto;
  color: #10b981;
  font-family: monospace;
  margin: 1rem 0;
}

/* 页脚样式 */
.footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.7;
}

/* 链接样式 */
a {
  color: #93c5fd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 提示框样式 */
.notice {
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.notice h3 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.notice h3 i {
  margin-right: 0.5rem;
}

.notice p {
  margin-bottom: 0.75rem;
}

.notice ol, .notice ul {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.notice ol li, .notice ul li {
  margin-bottom: 0.25rem;
}

.notice.warning {
  background-color: rgba(251, 191, 36, 0.1);
  border-color: #f59e0b;
}

.notice.warning h3 {
  color: #f59e0b;
}

/* 链接卡片样式 */
.links-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.link-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 280px; /* 固定卡片高度 */
}

.link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: 0.6s;
}

.link-card:hover::before {
  transform: translateX(100%);
}

/* 统一图标容器样式 */
.logo-container {
  max-height: 80px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  overflow: hidden;
  padding: 5px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

/* 为特定链接的logo容器设置纯白色背景 */
.white-bg-card .logo-container {
  background: white !important;
  backdrop-filter: none !important;
}


/* 图片图标样式 */
.link-icon-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 图标样式 */
.link-icon {
  font-size: 2.25rem;
  color: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 标题样式 */
.link-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.link-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.8rem;
}

/* 带复制按钮的描述样式 - 不限制行数 */
.link-description-with-button {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
  line-height: 1.4;
  min-height: 2.8rem;
}

/* 动画效果 */
.pulse-anim {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* 标题样式增强 */
.page-title {
  position: relative;
  display: inline-block;
}

.page-title::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
  bottom: -5px;
  left: 0;
}

.header-emoji {
  font-size: 2rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* 特殊链接样式 */
.special-link:hover {
  background: rgba(59, 130, 246, 0.4) !important;
}

/* 复制按钮样式 */
.copy-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(59, 130, 246, 0.3);
}

.copy-btn i {
  margin-right: 0.25rem;
}

/* 邀请码样式 */
.invite-code {
  font-weight: 600;
  color: #3b82f6;
  padding: 0.125rem 0.25rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.1);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.invite-code:hover {
  background: rgba(59, 130, 246, 0.2);
}

.invite-code::after {
  content: '点击复制';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.8);
  color: white;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 4px;
}

.invite-code:hover::after {
  opacity: 1;
}

/* 复制成功提示框 */
.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  z-index: 1000;
  animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 1rem); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -1rem); }
}