﻿/* ===== 瀵艰埅涓婚〉 - 姣涚幓鐠冮鏍?===== */
:root {
  --bg-start: #f0f5fa;
  --bg-end: #e6edf5;
  --glass-bg: rgba(255,255,255,0.65);
  --glass-border: rgba(255,255,255,0.88);
  --glass-shadow: 0 1px 3px rgba(0,0,0,0.04);
  --glass-hover-shadow: 0 8px 32px rgba(0,0,0,0.07);
  --primary: #4f6ef7;
  --primary-soft: rgba(79,110,247,0.10);
  --primary-glow: rgba(79,110,247,0.20);
  --text: #1a1f2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ===== 暗色模式 ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-start: #0f1117;
    --bg-end: #161b27;
    --glass-bg: rgba(255,255,255,0.05);
    --glass-border: rgba(255,255,255,0.10);
    --glass-shadow: 0 1px 3px rgba(0,0,0,0.30);
    --glass-hover-shadow: 0 8px 32px rgba(0,0,0,0.40);
    --primary: #6b8bf8;
    --primary-soft: rgba(107,139,248,0.15);
    --primary-glow: rgba(107,139,248,0.25);
    --text: #e8ecf4;
    --text-secondary: #9ca3b0;
    --text-muted: #6b7280;
  }
  header {
    background: rgba(15,17,23,0.88);
    border-bottom-color: rgba(255,255,255,0.08);
  }
  .site-card { color: var(--text); }
  .search-input { color: var(--text); background: rgba(255,255,255,0.06); }
  .search-input::placeholder { color: var(--text-muted); }
  .select-selected,
  .select-items { background: #1a1f2e; color: var(--text); border-color: var(--glass-border); }
  .select-item:hover { background: rgba(255,255,255,0.08); }
  .category-title { color: var(--text-secondary); }
  .site-desc { color: var(--text-muted); }
  .footer { color: var(--text-muted); }
  .footer a { color: var(--text-secondary); }
  .festival-glass {
    background: rgba(20,24,40,0.97);
    border-color: rgba(255,255,255,0.12);
  }
  .festival-name { color: var(--text); }
  .festival-btn-secondary {
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary);
    border-color: rgba(255,255,255,0.10);
  }
  .traffic-modal { background: rgba(15,17,23,0.95); border-color: rgba(255,255,255,0.10); }
  .video-panel  { background: rgba(15,17,23,0.97); border-color: rgba(255,255,255,0.08); }
  .ltaaa-card   { background: rgba(20,24,40,0.97); border-color: rgba(255,255,255,0.10); }
  .float-btn    { background: rgba(20,24,40,0.85); border-color: rgba(255,255,255,0.10); }
  .translate-panel { background: rgba(15,17,23,0.97); border-color: rgba(255,255,255,0.08); }
  .translate-input { background: rgba(255,255,255,0.07); color: #e8ecf4; border-color: rgba(255,255,255,0.12); }
  .translate-input:focus { background: rgba(255,255,255,0.12); }
  .translate-bubble-result { background: rgba(255,255,255,0.08); }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--font);
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 50%, #eef2f7 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--glass-border);
  width: 100%;
  margin-bottom: 2rem;
}
.nav-bar {
  display: flex;
  align-items: center;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
}
.nav-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  margin-right: 1.2rem;
  flex-shrink: 0;
}
.nav-extra {
  flex-shrink: 0;
}

/* ===== Search Form ===== */
.search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  min-width: 320px;
  flex-shrink: 0;
  margin-left: auto;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form:focus-within {
  border-color: rgba(79,110,247,0.3);
  box-shadow: 0 0 0 3px rgba(79,110,247,0.08);
}
.search-input {
  border: none;
  background: transparent;
  font-size: 0.95rem;
  outline: none;
  width: 180px;
  padding: 0.4rem 0.6rem;
  font-family: inherit;
  color: var(--text);
}
.search-input::placeholder {
  color: var(--text-muted);
}
.search-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: inherit;
}
.search-btn:hover {
  background: #3b5de7;
  transform: translateY(-1px);
}
.search-btn:active {
  transform: translateY(0);
}

/* ===== Custom Select (Search Engine) ===== */
.custom-select {
  position: relative;
  min-width: 120px;
  width: 140px;
  user-select: none;
  font-size: 0.9rem;
}
.select-selected {
  background: rgba(255,255,255,0.6);
  border-radius: 6px;
  padding: 0.4rem 2.2rem 0.4rem 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  min-height: 34px;
  transition: background 0.2s, box-shadow 0.2s;
  position: relative;
  border: 1px solid transparent;
}
.select-selected:hover {
  background: rgba(255,255,255,0.8);
}
.select-selected.select-open {
  background: #fff;
  border-color: rgba(79,110,247,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.select-arrow {
  border: solid var(--text-muted);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  margin-left: 8px;
  transform: rotate(45deg);
  transition: transform 0.22s;
  position: absolute;
  right: 12px;
  top: 50%;
  margin-top: -4px;
}
.select-selected.select-open .select-arrow {
  transform: rotate(-135deg);
  border-color: var(--primary);
}
.select-icon {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 4px;
  object-fit: contain;
  background: #f0f0f0;
  flex-shrink: 0;
}
.select-items {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  overflow: hidden;
  animation: selectFadeIn 0.18s ease;
}
@keyframes selectFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.select-hide {
  display: none !important;
}
.select-item {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  border: none;
  transition: background 0.15s;
  text-decoration: none !important;
}
.select-item:hover,
.select-item.active,
.select-item:focus {
  background: var(--primary-soft);
  color: var(--primary);
  outline: none;
}
.tool-dropdown {
  min-width: 80px;
  width: auto;
  max-width: none;
}
.tool-dropdown .select-items {
  min-width: 80px;
  max-width: none;
}

/* ===== Container ===== */
.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 24px 3rem 24px;
}

/* ===== Category ===== */
.category {
  margin-bottom: 2.8rem;
}
.category-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding-left: 14px;
  position: relative;
}
.category-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: var(--primary);
  opacity: 0.6;
}

/* ===== Site List Grid ===== */
.site-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: stretch;
}

/* ===== Site Card ===== */
.site-card {
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  min-height: 84px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.site-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 60%);
  pointer-events: none;
}
.site-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79,110,247,0.20);
  box-shadow: var(--glass-hover-shadow);
  background: rgba(255,255,255,0.78);
}

/* ===== Site Icon ===== */
.site-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  margin-right: 14px;
  background: rgba(255,255,255,0.5);
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.2s;
}
.site-card:hover .site-icon {
  transform: scale(1.05);
}

/* ===== Site Info ===== */
.site-info {
  flex: 1;
  min-width: 0;
}
.site-title {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 3px 0;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Click Counter Badge ===== */
.site-total-clicks {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(79,110,247,0.15);
  z-index: 10;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s, transform 0.25s;
}
.site-card:hover .site-total-clicks {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== Footer ===== */
.footer {
  color: var(--text-secondary);
  padding: 1.2rem 24px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1800px;
  margin: 0 auto;
  border-top: 1px solid rgba(0,0,0,0.04);
}
.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer a:hover {
  color: var(--primary);
}

/* ===== Floating Action Buttons ===== */
.float-action-buttons {
  position: fixed;
  right: 24px;
  bottom: 80px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.float-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0;
}
.float-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.float-btn:hover {
  background: rgba(255,255,255,0.85);
  border-color: rgba(79,110,247,0.25);
  box-shadow: var(--glass-hover-shadow);
  transform: translateY(-3px);
  color: var(--primary);
}
.float-btn:hover img {
  opacity: 1;
}
#videoBtnFloat {
  position: relative;
}
#videoUpdateBadge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid var(--bg-start);
  display: none;
}

/* ===== Traffic Modal ===== */
.traffic-modal {
  position: fixed;
  right: 76px;
  bottom: 130px;
  z-index: 1002;
  display: none;
}
.traffic-modal.show {
  display: block;
  animation: modalSlideIn 0.2s ease;
}
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.traffic-modal-content {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}
.traffic-modal-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.traffic-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.traffic-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  background: linear-gradient(90deg, #4f6ef7, #6c8af7);
  width: 0%;
}
.traffic-progress-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.traffic-progress-fill.danger {
  background: linear-gradient(90deg, #ef4444, #f87171);
}
.traffic-modal-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 10px;
}
.traffic-modal-divider {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 10px;
}
.traffic-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.traffic-modal-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.traffic-modal-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #059669;
}

/* ===== Festival Modal — 毛玻璃风格 ===== */
.festival-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 35, 0.50);
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
.festival-modal.show {
  display: flex;
  animation: festivalFadeIn 0.3s ease;
}
@keyframes festivalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes festivalSlideUp {
  from { opacity: 0; transform: translateY(28px) scale(0.93); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.festival-glass {
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: 28px;
  box-shadow:
    0 48px 120px rgba(0,0,0,0.20),
    0 8px 28px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,1);
  max-width: 360px;
  width: 88%;
  padding: 0 0 28px;
  text-align: center;
  animation: festivalSlideUp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  position: relative;
}

/* 顶部彩色渐变条 */
.festival-glass::before {
  content: '';
  display: block;
  height: 5px;
  background: linear-gradient(90deg, #4f6ef7 0%, #a78bfa 50%, #f472b6 100%);
  margin-bottom: 28px;
}

.festival-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 6px;
  animation: festivalBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s both;
}
@keyframes festivalBounce {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);  opacity: 1; }
}

.festival-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.festival-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 24px 10px;
  letter-spacing: 1px;
  line-height: 1.2;
}

.festival-date {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  background: var(--primary-soft);
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(79,110,247,0.15);
}

.festival-lunar {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.festival-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 24px;
  min-height: 0;
}
.festival-desc:empty { display: none; }

.festival-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 0 24px;
  margin-top: 24px;
}

.festival-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.3px;
}
.festival-btn-primary {
  background: linear-gradient(135deg, #4f6ef7, #7b8ff8);
  color: #fff;
  box-shadow: 0 4px 16px rgba(79,110,247,0.38);
}
.festival-btn-primary:hover {
  background: linear-gradient(135deg, #3b5de7, #6478f4);
  box-shadow: 0 6px 22px rgba(79,110,247,0.48);
  transform: translateY(-2px);
}
.festival-btn-secondary {
  background: rgba(0,0,0,0.04);
  color: var(--text-secondary);
  border: 1px solid rgba(0,0,0,0.07);
}
.festival-btn-secondary:hover {
  background: rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

/* ===== International Hot List (Ltaaa) ===== */
.ltaaa-wrap {
  position: fixed;
  right: 76px;
  bottom: 180px;
  z-index: 1000;
  width: 300px;
  display: none;
}
.ltaaa-wrap.show {
  display: block;
  animation: modalSlideIn 0.25s ease;
}
.ltaaa-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  transition: all 0.3s ease;
}
.ltaaa-card-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  background: var(--primary-soft);
}
.ltaaa-source {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 6px;
  pointer-events: none;
  user-select: none;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ltaaa-card-noimg {
  width: 100%;
  height: 170px;
  background: linear-gradient(135deg, var(--primary-soft) 0%, rgba(124,143,248,0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
}
.ltaaa-card-body {
  padding: 14px 18px 16px;
  position: relative;
}
.ltaaa-card-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.6;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.8em;
  transition: color 0.2s;
}
.ltaaa-card-title:hover {
  color: var(--primary);
}
.ltaaa-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.ltaaa-dots {
  display: flex;
  gap: 5px;
}
.ltaaa-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,0.12);
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  padding: 0;
}
.ltaaa-dot.active {
  background: var(--primary);
  width: 18px;
  border-radius: 3px;
}
.ltaaa-nav {
  display: flex;
  gap: 6px;
}
.ltaaa-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.5);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ltaaa-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.ltaaa-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.ltaaa-card:hover .ltaaa-close {
  opacity: 1;
}
.ltaaa-close:hover {
  background: rgba(0,0,0,0.55);
}

/* ===== Video Panel ===== */
.video-panel {
  position: fixed;
  right: 76px;
  bottom: 230px;
  z-index: 1003;
  width: 300px;
  max-height: 420px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  display: none;
  overflow: hidden;
}
.video-panel.show {
  display: block;
  animation: modalSlideIn 0.2s ease;
}
.video-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
}
.video-panel-header-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.video-btn-sm {
  font-size: 0.75rem;
  padding: 4px 10px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  background: rgba(255,255,255,0.5);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.video-btn-sm:hover {
  background: rgba(255,255,255,0.8);
  color: var(--text);
}
.video-panel-list {
  padding: 8px;
  max-height: 360px;
  overflow-y: auto;
}
.video-empty {
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.82rem;
}
.video-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.video-item:hover {
  background: rgba(0,0,0,0.03);
}
.video-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
}
.video-item-title {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text);
  flex: 1;
  word-break: break-all;
}
.video-item-ep {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.video-panel-list::-webkit-scrollbar {
  width: 4px;
}
.video-panel-list::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
}

/* ===== Translate Panel ===== */
.translate-panel {
  position: fixed;
  right: 76px;
  bottom: 290px;
  z-index: 1003;
  width: 320px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 480px;
}
.translate-panel.show {
  display: flex;
  animation: modalSlideIn 0.2s ease;
}
.translate-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
  flex-shrink: 0;
}
.translate-header > span { flex: 1; }
.translate-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
  max-height: 260px;
}
.translate-messages::-webkit-scrollbar { width: 4px; }
.translate-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 2px; }
.translate-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 20px 0;
}
.translate-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.translate-bubble {
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.83rem;
  line-height: 1.55;
  max-width: 92%;
  word-break: break-word;
}
.translate-bubble-user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.translate-bubble-result {
  background: rgba(0,0,0,0.05);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.translate-bubble-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.translate-bubble-meta.right { justify-content: flex-end; }
.translate-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s;
}
.translate-copy-btn:hover { color: var(--primary); }
.translate-loading {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 10px 12px;
}
.translate-loading span {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: translateDot 1.2s infinite;
}
.translate-loading span:nth-child(2) { animation-delay: 0.2s; }
.translate-loading span:nth-child(3) { animation-delay: 0.4s; }
@keyframes translateDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
  40% { transform: scale(1); opacity: 1; }
}
.translate-input-wrap {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(0,0,0,0.05);
  flex-shrink: 0;
  align-items: flex-end;
}
.translate-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-family: inherit;
  background: rgba(255,255,255,0.55);
  color: var(--text);
  outline: none;
  line-height: 1.45;
  height: 36px;
  max-height: 120px;
  overflow-y: hidden;
  transition: border-color 0.15s, background 0.15s;
}
.translate-input:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,0.75);
}
.translate-send-btn {
  padding: 0 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
  flex-shrink: 0;
  height: 36px;
  white-space: nowrap;
}
.translate-send-btn:hover { opacity: 0.85; }
.translate-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .site-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 800px) {
  .site-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .container {
    padding: 0 16px 2rem 16px;
  }
  .footer {
    padding: 1rem 16px;
  }
}
@media (max-width: 600px) {
  .nav-title {
    font-size: 1.2rem;
    margin-right: auto;
  }
  .search-form,
  .nav-extra {
    display: none !important;
  }
  .nav-bar {
    padding: 0 14px;
    height: 56px;
  }
  .site-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .site-card {
    min-height: 72px;
    padding: 10px 12px;
  }
  .site-icon {
    width: 34px;
    height: 34px;
    margin-right: 10px;
  }
  .site-title {
    font-size: 0.9rem;
  }
  .site-desc {
    font-size: 0.75rem;
  }
  .category-title {
    font-size: 1rem;
    margin-bottom: 0.8rem;
  }
  .category {
    margin-bottom: 2rem;
  }
  .ltaaa-wrap {
    right: 16px;
    bottom: 80px;
    width: 240px;
  }
  .ltaaa-card-img,
  .ltaaa-card-noimg {
    height: 130px;
  }
  .traffic-modal {
    right: 64px;
    bottom: 124px;
  }
  .video-panel {
    right: 16px;
    bottom: 80px;
    width: 260px;
  }
}
@media (max-width: 500px) {
  .site-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .float-action-buttons {
    display: none;
  }
  .traffic-modal {
    right: 16px;
    bottom: 80px;
  }
  .translate-panel {
    right: 16px;
    bottom: 80px;
    width: calc(100vw - 32px);
  }
}

