/* ============================================
   爆率查询页 - 统一主站淡色毛玻璃主题 v2.0
   深度美化版 — 四列差异色调 + 精致微交互
   ============================================ */

:root {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fc;
  --border-color: #e4e6eb;
  --border-light: #d1d5db;
  --text-primary: #1a1a2e;
  --text-secondary: #5a5f72;
  --text-muted: #9ca3af;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6a0;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --gradient-main: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ef4444 100%);
  --primary-color: #3b82f6;
  --secondary-color: #1a1a2e;
  --border-radius: 12px;
  --box-shadow: 0 4px 16px rgba(59,130,246,0.06), 0 2px 8px rgba(139,92,246,0.04);
  --line: #e4e6eb;
  --muted: #9ca3af;
  --success: #06b6a0;
  --warn: #f59e0b;
  --error: #ef4444;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-bounce: 0.4s cubic-bezier(0.34,1.56,0.64,1);
  --glass-bg: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(139,92,246,0.06), rgba(6,182,160,0.06));
  --glass-bg-hover: linear-gradient(135deg, rgba(59,130,246,0.10), rgba(139,92,246,0.10), rgba(6,182,160,0.10));
  --glass-border: 1px solid rgba(255,255,255,0.6);
  --glass-blur: blur(20px);
  --shadow-glow: 0 4px 16px rgba(59,130,246,0.05), 0 2px 8px rgba(139,92,246,0.03);
  --shadow-glow-hover: 0 16px 48px rgba(59,130,246,0.12), 0 8px 24px rgba(139,92,246,0.08);

  /* Column accent colors */
  --col1-hue: 217;  /* blue */
  --col2-hue: 263;  /* purple */
  --col3-hue: 174;  /* cyan */
  --col4-hue: 32;   /* orange */
  --col1-accent: #3b82f6;
  --col2-accent: #8b5cf6;
  --col3-accent: #06b6a0;
  --col4-accent: #f59e0b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; width: 100%; }
body {
  background: var(--bg-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  padding: 10px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  animation: pageFadeIn 0.4s ease;
}

/* Top gradient bar */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-main);
  z-index: 10000;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { text-decoration: none; color: var(--accent-blue); transition: color var(--transition-fast); }
a:hover { color: #7aadff; }

/* === Custom Scrollbar — thinner, hover-expand === */
::-webkit-scrollbar { width: 5px; height: 5px; transition: width 0.3s ease; }
::-webkit-scrollbar-track { background: transparent; border-radius: 999px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
  border-radius: 999px;
  transition: background 0.3s ease, width 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(59,130,246,0.4), rgba(139,92,246,0.4));
}

/* === Container === */
.container {
  max-width: 1600px;
  padding: 10px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(59,130,246,0.08), 0 4px 16px rgba(139,92,246,0.06);
  height: calc(100vh - 20px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: heroFadeIn 0.6s ease forwards;
  opacity: 0;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Header === */
header {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #6366f1 100%);
  color: #fff;
  padding: 10px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(59,130,246,0.2), 0 2px 10px rgba(139,92,246,0.15);
  position: relative;
  overflow: hidden;
}

header::after {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.logo-img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.1));
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15), inset 0 1px 1px rgba(255,255,255,0.3);
  letter-spacing: 2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  color: #fff;
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  white-space: nowrap;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* === Mode Buttons (search mode tabs) — with bottom indicator === */
.search-mode {
  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-wrap: wrap;
}

.mode-btn {
  padding: 8px 15px;
  background: transparent;
  border: none;
  border-radius: var(--border-radius);
  color: rgba(255,255,255,.85);
  font-weight: 600;
  transition: all var(--transition-bounce);
  position: relative;
}

/* Subtle bottom line for inactive mode buttons */
.mode-btn::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: rgba(255,255,255,0.4);
  border-radius: 1px;
  transition: left 0.3s ease, right 0.3s ease, background 0.3s ease;
}

.mode-btn:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
  transform: translateY(-1px);
}

.mode-btn:hover::after {
  left: 25%;
  right: 25%;
  background: rgba(255,255,255,0.6);
}

.mode-btn.active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  box-shadow: 0 4px 15px rgba(59,130,246,0.35), 0 2px 8px rgba(139,92,246,0.2);
  transform: translateY(-1px);
}

/* Active mode: bright bottom indicator bar */
.mode-btn.active::after {
  left: 20%;
  right: 20%;
  height: 3px;
  bottom: 2px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

.nav-right {
  display: flex;
  justify-content: flex-end;
}

.viewer-nav-right {
  align-items: center;
  gap: 10px;
}

.community-info {
  background: rgba(255,255,255,.12);
  padding: 8px 12px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255,255,255,.2);
  min-width: 180px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.community-label {
  font-size: .74rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 2px;
}

.community-number {
  font-size: .94rem;
  font-weight: 700;
  color: #fff;
  word-break: break-all;
}

/* === Search Container — prominent frosted card === */
.search-container {
  background: linear-gradient(135deg, rgba(59,130,246,0.07), rgba(139,92,246,0.05), rgba(255,255,255,0.6));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.7);
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(59,130,246,0.08), 0 2px 10px rgba(139,92,246,0.05), inset 0 1px 0 rgba(255,255,255,0.5);
  margin-top: 10px;
  animation: cardSlideIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.1s forwards;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

/* Subtle top gradient accent on search container */
.search-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-cyan));
  opacity: 0.6;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Filter checkbox — more refined */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .86rem;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--border-color);
  white-space: nowrap;
  transition: all 0.25s ease;
  position: relative;
}

.filter-checkbox:hover {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.25);
  box-shadow: 0 2px 8px rgba(59,130,246,0.1);
  transform: translateY(-1px);
}

.filter-checkbox input[type=checkbox] { display: none; }

.checkbox-custom {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.checkbox-custom::after {
  content: '';
  width: 10px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

.filter-checkbox input[type=checkbox]:checked + .checkbox-custom {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-color: var(--accent-blue);
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
  transform: scale(1.05);
}

.filter-checkbox input[type=checkbox]:checked + .checkbox-custom::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.search-box {
  flex: 1;
  display: flex;
  gap: 8px;
}

/* Search input — modern with search icon via CSS */
.search-box input {
  flex: 1;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: .95rem;
  background: rgba(255,255,255,0.85);
  color: var(--text-primary);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15), 0 0 16px rgba(59,130,246,0.08);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

/* Search button — refined with hover lift */
.search-btn {
  padding: 10px 16px;
  border: 1.5px solid var(--border-color);
  background: rgba(255,255,255,0.8);
  color: var(--text-secondary);
  border-radius: 12px;
  font-weight: 700;
  transition: all var(--transition-bounce);
  position: relative;
}

.search-btn:hover {
  background: rgba(59,130,246,0.06);
  border-color: rgba(59,130,246,0.25);
  color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.12);
}

.search-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.search-btn.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  box-shadow: 0 4px 14px rgba(59,130,246,0.3), 0 2px 6px rgba(139,92,246,0.15);
}

.search-btn.primary:hover {
  background: linear-gradient(135deg, #2563eb, #6d28d9);
  box-shadow: 0 6px 24px rgba(59,130,246,0.4), 0 3px 12px rgba(139,92,246,0.25), 0 0 20px rgba(59,130,246,0.15);
  transform: translateY(-3px);
}

.search-btn.primary:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}

.search-info {
  display: none;
}

/* === Data Banner — refined status bar === */
.data-banner {
  display: none;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(139,92,246,0.04));
  border: 1px solid rgba(59,130,246,0.1);
  margin-top: 8px;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: cardSlideIn 0.4s ease forwards;
}

/* When .data-banner has content, it shows via JS display:flex */
.data-banner::before {
  content: '📊';
  font-size: 1rem;
  flex-shrink: 0;
}

.data-status {
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.data-counts {
  color: var(--text-secondary);
  font-size: .85rem;
  padding: 2px 10px;
  background: rgba(59,130,246,0.06);
  border-radius: 6px;
}

/* === Lists Container (four columns) === */
.lists-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* === List Box (each column card) — per-column color tinting === */
.list-box {
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  animation: cardSlideIn 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards;
  transition: transform var(--transition-bounce), box-shadow 0.4s ease, border-color 0.4s ease;
}

.list-box:nth-child(1) {
  animation-delay: 0.1s;
  background: linear-gradient(165deg, rgba(59,130,246,0.07) 0%, rgba(59,130,246,0.02) 60%, rgba(255,255,255,0.3) 100%);
}
.list-box:nth-child(2) {
  animation-delay: 0.2s;
  background: linear-gradient(165deg, rgba(139,92,246,0.07) 0%, rgba(139,92,246,0.02) 60%, rgba(255,255,255,0.3) 100%);
}
.list-box:nth-child(3) {
  animation-delay: 0.3s;
  background: linear-gradient(165deg, rgba(6,182,160,0.07) 0%, rgba(6,182,160,0.02) 60%, rgba(255,255,255,0.3) 100%);
}
.list-box:nth-child(4) {
  animation-delay: 0.4s;
  background: linear-gradient(165deg, rgba(245,158,11,0.07) 0%, rgba(245,158,11,0.02) 60%, rgba(255,255,255,0.3) 100%);
}

.list-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-hover);
  border-color: rgba(139,92,246,0.2);
}

/* Column-specific hover glow */
.list-box:nth-child(1):hover { border-color: rgba(59,130,246,0.25); box-shadow: 0 12px 40px rgba(59,130,246,0.12), 0 6px 20px rgba(59,130,246,0.06); }
.list-box:nth-child(2):hover { border-color: rgba(139,92,246,0.25); box-shadow: 0 12px 40px rgba(139,92,246,0.12), 0 6px 20px rgba(139,92,246,0.06); }
.list-box:nth-child(3):hover { border-color: rgba(6,182,160,0.25); box-shadow: 0 12px 40px rgba(6,182,160,0.12), 0 6px 20px rgba(6,182,160,0.06); }
.list-box:nth-child(4):hover { border-color: rgba(245,158,11,0.25); box-shadow: 0 12px 40px rgba(245,158,11,0.12), 0 6px 20px rgba(245,158,11,0.06); }

@keyframes cardSlideIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.97); }
  60% { opacity: 1; transform: translateY(-4px) scale(1.005); }
  80% { transform: translateY(1px) scale(0.998); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* === List Title (column header) — per-column gradient === */
.list-title {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  padding: 11px 14px;
  font-weight: 700;
  font-size: .9rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  letter-spacing: 0.3px;
}

/* Per-column title gradients */
.list-box:nth-child(1) .list-title {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}
.list-box:nth-child(2) .list-title {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}
.list-box:nth-child(3) .list-title {
  background: linear-gradient(135deg, #06b6a0, #2dd4bf);
}
.list-box:nth-child(4) .list-title {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.list-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.2);
}

/* === List Content (scrollable area) — refined scrollbar === */
.list-content {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.list-content::-webkit-scrollbar {
  width: 4px;
  transition: width 0.3s ease;
}

.list-content::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.list-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(59,130,246,0.15), rgba(139,92,246,0.15));
  border-radius: 999px;
  transition: background 0.3s ease;
}

.list-content:hover::-webkit-scrollbar {
  width: 6px;
}

.list-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(59,130,246,0.35), rgba(139,92,246,0.35));
}

/* === List Items — with colored left bar on hover/active === */
.list-item,
.related-item,
.text-block {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 5px;
  background: rgba(255,255,255,0.7);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

/* Subtle separator between items */
.list-item + .list-item,
.related-item + .related-item {
  margin-top: 1px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding: 9px 10px 9px 10px;
  text-align: left;
  overflow: hidden;
}

/* Left color bar — hidden by default, appears on hover */
.list-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent-blue);
  opacity: 0;
  transform: scaleY(0);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

/* Per-column hover bar colors */
.list-box:nth-child(1) .list-item::before { background: var(--col1-accent); }
.list-box:nth-child(2) .list-item::before { background: var(--col2-accent); }
.list-box:nth-child(3) .list-item::before { background: var(--col3-accent); }
.list-box:nth-child(4) .list-item::before { background: var(--col4-accent); }

.list-item:hover {
  background: rgba(59,130,246,0.06);
  border-color: rgba(59,130,246,0.2);
  transform: translateX(4px);
  box-shadow: 0 3px 12px rgba(59,130,246,0.08);
  padding-left: 14px;
}

.list-item:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

/* Per-column hover tint */
.list-box:nth-child(1) .list-item:hover { background: rgba(59,130,246,0.06); border-color: rgba(59,130,246,0.2); }
.list-box:nth-child(2) .list-item:hover { background: rgba(139,92,246,0.06); border-color: rgba(139,92,246,0.2); }
.list-box:nth-child(3) .list-item:hover { background: rgba(6,182,160,0.06); border-color: rgba(6,182,160,0.2); }
.list-box:nth-child(4) .list-item:hover { background: rgba(245,158,11,0.06); border-color: rgba(245,158,11,0.2); }

/* Active item — colored left bar always visible */
.list-item.active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(59,130,246,0.25), 0 2px 8px rgba(139,92,246,0.15);
  transform: translateX(4px);
  padding-left: 14px;
}

.list-item.active::before {
  opacity: 1;
  transform: scaleY(1);
  top: 10%;
  bottom: 10%;
  width: 4px;
  background: rgba(255,255,255,0.8);
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* Per-column active gradients */
.list-box:nth-child(1) .list-item.active { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.list-box:nth-child(2) .list-item.active { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.list-box:nth-child(3) .list-item.active { background: linear-gradient(135deg, #06b6a0, #2dd4bf); }
.list-box:nth-child(4) .list-item.active { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

/* Item number circle — with subtle shadow */
.item-number {
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(59,130,246,0.25), 0 1px 3px rgba(139,92,246,0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Per-column item-number tint */
.list-box:nth-child(1) .item-number { background: linear-gradient(135deg, #3b82f6, #60a5fa); box-shadow: 0 2px 6px rgba(59,130,246,0.3); }
.list-box:nth-child(2) .item-number { background: linear-gradient(135deg, #8b5cf6, #a78bfa); box-shadow: 0 2px 6px rgba(139,92,246,0.3); }
.list-box:nth-child(3) .item-number { background: linear-gradient(135deg, #06b6a0, #2dd4bf); box-shadow: 0 2px 6px rgba(6,182,160,0.3); }
.list-box:nth-child(4) .item-number { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 2px 6px rgba(245,158,11,0.3); }

.list-item:hover .item-number {
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(59,130,246,0.3);
}

.list-item.active .item-number {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  box-shadow: 0 2px 8px rgba(245,158,11,0.35);
}

.list-main {
  flex: 1;
  min-width: 0;
}

.list-name {
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: 4px;
  word-break: break-all;
  color: var(--text-primary);
}

.list-sub {
  font-size: .76rem;
  color: var(--text-muted);
}

.list-sub .sub-label {
  color: var(--text-secondary);
  font-weight: 700;
}

.list-sub .sub-map {
  color: var(--accent-orange);
  font-weight: 700;
}

.list-sub .sub-dot {
  color: var(--border-light);
  font-weight: 700;
  margin: 0 4px;
}

.list-item.active .list-name {
  color: #fff;
}

.list-item.active .list-sub {
  color: rgba(255,255,255,.84);
}

.list-item.active .list-sub .sub-label {
  color: #d9f0ff;
}

.list-item.active .list-sub .sub-map {
  color: #ffd166;
}

.list-item.active .list-sub .sub-dot {
  color: rgba(255,255,255,.7);
}

/* === Related Items — refined hover === */
.related-item {
  padding: 10px;
  overflow: hidden;
  position: relative;
}

/* Left color bar for related items */
.related-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent-purple);
  opacity: 0;
  transform: scaleY(0);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.related-head,
.text-block-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.related-number {
  min-width: 24px;
  height: 24px;
  font-size: .74rem;
}

.related-name {
  font-size: .86rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-all;
  flex: 1;
}

.related-meta {
  font-size: .78rem;
  color: var(--text-secondary);
  padding-left: 34px;
}

.refresh-time {
  color: var(--text-muted);
  font-weight: 600;
}

.refresh-count {
  color: var(--accent-red);
  font-weight: 800;
}

.refresh-sep {
  color: var(--border-light);
  margin: 0 4px;
}

.related-item.clickable {
  cursor: pointer;
}

.related-item.clickable:hover {
  background: rgba(139,92,246,0.05);
  border-color: rgba(139,92,246,0.2);
  transform: translateX(4px);
  box-shadow: 0 3px 12px rgba(139,92,246,0.08);
  padding-left: 14px;
}

.related-item.clickable:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.related-item.active,
.related-item.active:hover {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(59,130,246,0.25);
  transform: translateX(4px);
  padding-left: 14px;
}

.related-item.active::before {
  opacity: 1;
  transform: scaleY(1);
  background: rgba(255,255,255,0.8);
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
  width: 4px;
  top: 10%;
  bottom: 10%;
}

.related-item.active .related-name,
.related-item.active .related-meta {
  color: #fff;
}

/* === Text Block — refined code/text display === */
.text-block {
  padding: 12px 14px;
  background: linear-gradient(145deg, rgba(255,255,255,0.6), rgba(248,250,255,0.5));
  border-color: rgba(59,130,246,0.1);
  position: relative;
}

/* Decorative left border for text blocks */
.text-block::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
  opacity: 0.4;
}

/* Text blocks in sequence: merge into continuous flow */
.text-block + .text-block {
  margin-top: 0;
  border-top: 1px dashed var(--border-color);
  border-radius: 0;
  box-shadow: none;
}

.text-block:first-child {
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.text-block:last-child {
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.text-block:only-child {
  border-radius: var(--border-radius);
}

/* Remove individual borders, use shared container feel */
.text-block + .text-block::before {
  top: 0;
  bottom: 0;
}

.text-block-title {
  font-size: .84rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.text-block pre {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
  color: var(--text-secondary);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  padding: 10px 12px;
  margin-top: 6px;
  background: rgba(59,130,246,0.03);
  border-radius: 8px;
  border: 1px solid rgba(59,130,246,0.06);
}

.path-rich-text {
  line-height: 1.8;
  color: var(--text-secondary);
  word-break: break-word;
}

/* === Highlight tags — with left border accent === */
.highlight-map-name {
  color: var(--accent-orange);
  font-weight: 700;
  padding: 0 2px;
}

.highlight-coord {
  color: var(--accent-cyan);
  font-weight: 700;
  padding: 0 2px;
}

.highlight-npc {
  color: var(--accent-purple);
  font-weight: 700;
  padding: 0 2px;
}

/* === Badges — refined with micro-animation === */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.06));
  color: var(--text-secondary);
  border: 1px solid rgba(59,130,246,0.12);
  font-size: .8rem;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: default;
}

.badge:hover {
  background: linear-gradient(135deg, rgba(59,130,246,0.14), rgba(139,92,246,0.1));
  border-color: rgba(59,130,246,0.25);
  color: var(--accent-blue);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 12px rgba(59,130,246,0.12);
}

.section-label {
  font-size: .86rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 8px 2px 10px;
}

/* === Notice & Empty State — with decorative icon === */
.notice,
.empty-state {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: rgba(255,255,255,0.6);
  color: var(--text-muted);
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.empty-state {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
}

/* Decorative empty icon via CSS */
.empty-state::before {
  content: '📋';
  font-size: 2rem;
  opacity: 0.5;
  filter: grayscale(0.3);
  animation: emptyBounce 2s ease-in-out infinite;
}

@keyframes emptyBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ============================================
   Homepage (version selection)
   ============================================ */

.home-page {
  max-width: 1300px;
}

.home-title-wrap {
  text-align: center;
}

.home-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.home-subtitle {
  display: none;
}

.home-main {
  margin-top: 12px;
  flex: 1;
  min-height: 0;
}

.home-panel {
  height: 100%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  padding: 20px;
  overflow: auto;
  animation: heroFadeIn 0.5s ease 0.15s forwards;
  opacity: 0;
}

.home-panel-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.version-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  align-content: start;
}

/* === Version Card — frosted glass style === */
.version-card {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: auto;
  background: linear-gradient(145deg,
    rgba(59,130,246,0.08) 0%,
    rgba(139,92,246,0.08) 40%,
    rgba(6,182,160,0.06) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 16px;
  padding: 16px 20px;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(59,130,246,0.08), 0 4px 16px rgba(139,92,246,0.06);
  transition: all var(--transition-bounce);
  overflow: hidden;
}

.version-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(139,92,246,0.08), transparent 50%),
              radial-gradient(circle at bottom left, rgba(59,130,246,0.06), transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.version-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 16px 48px rgba(59,130,246,0.15), 0 8px 24px rgba(139,92,246,0.1);
  border-color: rgba(139,92,246,0.25);
  background: linear-gradient(145deg,
    rgba(59,130,246,0.12) 0%,
    rgba(139,92,246,0.12) 40%,
    rgba(6,182,160,0.10) 100%);
}

.version-card:active {
  transform: translateY(-3px) scale(0.99);
  transition: transform 0.1s ease;
}

.version-index {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0;
  box-shadow: 0 4px 12px rgba(59,130,246,0.25);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.version-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0;
  word-break: break-all;
  line-height: 1.3;
  position: relative;
  z-index: 1;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex: 1;
  min-width: 0;
}

.version-file {
  display: none;
}

.version-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border: none;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(59,130,246,0.25);
  transition: all var(--transition-bounce);
  width: 100%;
  margin-top: 4px;
  text-align: center;
}

.version-enter:hover {
  box-shadow: 0 6px 20px rgba(59,130,246,0.35), 0 3px 10px rgba(139,92,246,0.2);
  transform: translateY(-2px);
}

.home-link-card {
  text-decoration: none;
  min-width: auto;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.home-link-card:hover {
  background: rgba(255,255,255,.3);
  border-color: rgba(255,255,255,.5);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.home-link-card .community-label {
  font-size: .92rem;
  color: #fff;
  margin: 0;
}

.home-link-card .community-number {
  display: none;
}

.current-version-card {
  min-width: 170px;
}

.version-switch-wrap {
  min-width: 140px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.version-switch-label {
  display: block;
  font-size: .65rem;
  color: rgba(255,255,255,.82);
  margin-bottom: 3px;
}

.version-switch-select {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 6px;
  padding: 5px 8px;
  background: rgba(255,255,255,.92);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.82rem;
  transition: box-shadow var(--transition-fast);
}

.version-switch-select:focus {
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.viewer-home-link {
  white-space: nowrap;
}

.empty-home {
  padding: 26px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius);
  background: rgba(255,255,255,0.5);
}

/* ============================================
   Selection highlight
   ============================================ */
::selection {
  background: rgba(59,130,246,0.3);
  color: #fff;
}

/* ============================================
   Responsive — preserve same breakpoints
   ============================================ */
@media (max-width: 1350px) {
  .lists-container {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
    padding: 6px;
  }

  .container {
    height: auto;
    min-height: calc(100vh - 12px);
    overflow: visible;
  }

  .nav-container,
  .search-row,
  .data-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .nav-center,
  .nav-right {
    justify-content: center;
  }

  .logo {
    justify-content: center;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .search-mode {
    justify-content: center;
  }

  .mode-btn {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .viewer-nav-right {
    flex-wrap: wrap;
    justify-content: center;
  }

  .search-info {
    text-align: left;
    min-width: 0;
  }

  .lists-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: 0;
    overflow: visible;
  }

  .list-box {
    max-height: 50vh;
    overflow: hidden;
  }

  .search-container,
  .data-banner {
    flex-shrink: 0;
  }

  .home-panel {
    padding: 14px;
    overflow: auto;
  }

  .version-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .version-card {
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 4px;
  }

  .logo-img {
    width: 40px;
    height: 40px;
    font-size: 12px;
  }

  .logo-text {
    font-size: 0.95rem;
  }

  .search-mode {
    gap: 3px;
  }

  .mode-btn {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  .home-link-card {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .version-switch-wrap {
    min-width: 120px;
  }

  .search-box input {
    font-size: 0.85rem;
    padding: 8px 8px 8px 34px;
  }

  .list-title {
    font-size: 0.82rem;
    padding: 7px 10px;
  }
}
