/* ========================================
   毛玻璃导航 - 样式表
   ======================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial,
    sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
}

/* 背景动态效果 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg-gradient, linear-gradient(135deg, #0f0c29, #302b63, #24243e));
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 背景装饰粒子 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.15), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.1), transparent),
    radial-gradient(2px 2px at 50px 160px, rgba(255,255,255,0.12), transparent),
    radial-gradient(2px 2px at 90px 40px, rgba(255,255,255,0.08), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.15), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.1), transparent);
  background-size: 200px 200px;
  opacity: 0.5;
}

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

/* ---------- 头部 ---------- */
.header {
  text-align: center;
  padding: 60px 20px 30px;
  position: relative;
}

.header-title {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f093fb, #f5576c, #4facfe);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  letter-spacing: 2px;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.header-subtitle {
  margin-top: 8px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
  letter-spacing: 4px;
}

/* 时钟 */
.clock {
  margin-top: 16px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

/* ---------- 搜索框 ---------- */
.search-section {
  max-width: 600px;
  margin: 0 auto 20px;
  padding: 0 20px;
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-wrapper input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-wrapper input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 30px rgba(79, 172, 254, 0.15);
}

.search-wrapper .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- 快捷标签 ---------- */
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 600px;
  margin: 12px auto 30px;
  padding: 0 20px;
}

.quick-tag {
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.quick-tag:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(79, 172, 254, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ---------- 分类 ---------- */
.category {
  margin-bottom: 40px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 0 4px;
}

.category-icon {
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.category-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.category-count {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  margin-left: auto;
}

/* ---------- 链接卡片 ---------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: #ffffff;
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.1), rgba(245, 87, 108, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.link-card:hover::before {
  opacity: 1;
}

.link-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.link-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.link-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.link-title {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* ---------- 搜索结果高亮 ---------- */
.link-card.hidden {
  display: none;
}

.no-result {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.1rem;
  display: none;
}

.no-result.show {
  display: block;
}

.no-result .no-result-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* ---------- 页脚 ---------- */
.footer {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
}

.footer a {
  color: rgba(79, 172, 254, 0.6);
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: rgba(79, 172, 254, 1);
}

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 100;
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .header-title {
    font-size: 2rem;
  }

  .header-subtitle {
    font-size: 0.85rem;
    letter-spacing: 2px;
  }

  .header {
    padding: 40px 16px 20px;
  }

  .link-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .link-card {
    padding: 12px 14px;
  }

  .category {
    margin-bottom: 30px;
  }

  .back-top {
    bottom: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .search-wrapper input {
    padding: 12px 16px 12px 42px;
    font-size: 0.9rem;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .link-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .link-card {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .link-icon {
    width: 28px;
    height: 28px;
  }

  .link-title {
    font-size: 0.82rem;
  }

  .link-desc {
    font-size: 0.7rem;
  }

  .header-title {
    font-size: 1.6rem;
  }
}

/* ========================================
   多用户登录界面
   ======================================== */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-box {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 48px 36px 36px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-logo {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.login-box h1 {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f093fb, #f5576c, #4facfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.login-desc {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.login-users {
  margin-bottom: 10px;
}

.login-users label {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.user-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e0e0e0;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.user-chip:hover {
  background: rgba(79, 172, 254, 0.15);
  border-color: rgba(79, 172, 254, 0.3);
  transform: translateY(-2px);
}

.chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.login-form input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  margin-bottom: 12px;
  transition: border-color 0.3s;
}

.login-form input:focus {
  border-color: rgba(79, 172, 254, 0.4);
}

.login-form input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.login-error {
  color: #f5576c;
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: none;
}

.login-form button {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.25s;
}

.login-form button:hover {
  opacity: 0.85;
}

/* ========================================
   用户栏（页面顶部）
   ======================================== */
.user-bar {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 16px;
}

.user-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

.user-name {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.user-bar-sep {
  color: rgba(255, 255, 255, 0.15);
  margin: 0 2px;
}

.user-link, .user-btn {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
}

.user-link:hover, .user-btn:hover {
  color: #4facfe;
  background: rgba(79, 172, 254, 0.1);
}

.user-btn {
  margin-left: auto;
}

.cloud-badge {
  font-size: 0.72rem;
  color: #4facfe;
  background: rgba(79, 172, 254, 0.1);
  padding: 2px 10px;
  border-radius: 10px;
  border: 1px solid rgba(79, 172, 254, 0.15);
}

@media (max-width: 600px) {
  .login-box {
    padding: 32px 24px 28px;
  }
  .login-logo {
    font-size: 2.8rem;
  }
  .user-bar-inner {
    font-size: 0.8rem;
    gap: 6px;
  }
  .user-link, .user-btn {
    font-size: 0.78rem;
    padding: 3px 6px;
  }
}
