/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: #333;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ========== CSS Variables ========== */
:root {
  --weibo-blue: #5B9BD5;
  --weibo-blue-dark: #3B7BB5;
  --weibo-blue-light: #EBF5FD;
  --bg: #F0F5FA;
  --card: #ffffff;
  --text-primary: #2C3E50;
  --text-secondary: #7B8FA5;
  --text-tertiary: #94A8BE;
  --border: #DCE6F0;
  --border-light: #EDF2F7;
  --link: #5B9BD5;
  --shadow-sm: 0 1px 3px rgba(91,155,213,0.06);
  --shadow-md: 0 4px 16px rgba(91,155,213,0.08);
  --shadow-lg: 0 8px 32px rgba(91,155,213,0.10);
}

/* ========== Dark Mode ========== */
[data-theme="dark"] {
  --bg: #111D2E;
  --card: #192638;
  --text-primary: #E0E7EF;
  --text-secondary: #8FA0B5;
  --text-tertiary: #60708A;
  --border: #253548;
  --border-light: #1E3045;
  --weibo-blue-light: #1C2D40;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.45);

  /* Image grid placeholder dark mode */
  .grid-img-wrap { background: #111D2E; }

  /* Top navigation */
  .top-nav {
    background: #1A3355 !important;
    border-bottom-color: #253548;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
  .nav-user:hover { background: rgba(255,255,255,0.06); }
  .nav-user-avatar {
    border-color: #253548;
    box-shadow: 0 0 0 1px #253548;
  }
  .nav-menu-item:hover {
    background: rgba(91,155,213,0.12);
  }

  /* Cover banner */
  .cover-bg {
    filter: brightness(0.45);
  }
  .cover-bg::before {
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.03) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255,255,255,0.03) 0%, transparent 50%);
  }
  .cover-overlay {
    background: linear-gradient(to bottom, transparent 20%, rgba(12,20,35,0.88));
  }

  /* Search */
  .weibo-search-input {
    color: #ffffff;
    background: #111D2E;
    border-color: #2A3D5C;
  }
  .weibo-search-input::placeholder {
    color: #60708A;
  }
  .weibo-search-input:focus {
    color: #ffffff;
    background: #192638;
    box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.15);
  }
  .weibo-search-clear {
    border-color: #2A3D5C;
    color: #8FA0B5;
  }
  .weibo-search-clear:hover {
    color: var(--weibo-blue);
    border-color: var(--weibo-blue);
  }

  /* Cards */
  .weibo-card { background: #192638 !important; }
  .weibo-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
  .weibo-toolbar { background: #192638 !important; }
  .weibo-pagination { background: #192638 !important; }
  .profile-card { background: #192638 !important; }
  .profile-card:hover { box-shadow: var(--shadow-md); }
  .profile-stat-item:hover { background: #253548 !important; }
  .pagination-btn:disabled {
    background: rgba(255,255,255,0.03);
    color: #4A5A70;
  }

  /* Border dividers */
  .weibo-card-meta { border-top-color: #253548; }
  .weibo-card-source { border-left-color: #253548; }
  .profile-card-stats { border-top-color: #253548; border-bottom-color: #253548; }
  .profile-stat-item:not(:last-child)::after { background: #253548; }
  .profile-card-avatar { border-color: #253548; }

  /* Scrollbar */
  ::-webkit-scrollbar-thumb { background: #2A3D5C; }
  ::-webkit-scrollbar-thumb:hover { background: #3A4D6C; }

  /* Theme toggle */
  .theme-toggle .theme-icon-sun { display: inline-block; }
  .theme-toggle .theme-icon-moon { display: none; }

  /* Music player */
  .music-playlist { background: #16213e; border-color: #253548; }
  .music-playlist::-webkit-scrollbar-thumb { background: #2A3D5C; }
}

/* ========== SVG Icon Utility ========== */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
}

/* ========== Music Player ========== */
.music-player {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
  flex-shrink: 0;
}
.music-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.music-btn:hover {
  color: var(--weibo-blue);
  background: var(--weibo-blue-light);
}
.music-btn:active { transform: scale(0.9); }
.music-btn svg {
  width: 16px;
  height: 16px;
}
.music-track-wrap {
  position: relative;
  max-width: 140px;
}
.music-track-name {
  display: block;
  max-width: 140px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  user-select: none;
  line-height: 1.4;
}
.music-track-name:hover {
  color: var(--weibo-blue);
  background: var(--weibo-blue-light);
}
.music-playlist {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  max-height: 200px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  margin-top: 4px;
  z-index: 1100;
  display: none;
}
.music-playlist.open { display: block; }
.music-playlist-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  border: none;
  background: none;
  transition: background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-playlist-item:hover { background: var(--weibo-blue-light); color: var(--weibo-blue); }
.music-playlist-item.active { color: var(--weibo-blue); font-weight: 600; }
.music-playlist::-webkit-scrollbar { width: 4px; }
.music-playlist::-webkit-scrollbar-thumb { background: #C0D0E0; border-radius: 2px; }

/* ========== Scroll Progress Bar ========== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--weibo-blue), #7BC0F5, var(--weibo-blue-dark));
  z-index: 1999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(91, 155, 213, 0.5);
  pointer-events: none;
}

/* ========== Back to Top Button ========== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5B9BD5, #3B7BB5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(91, 155, 213, 0.4);
  border: none;
  user-select: none;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 24px rgba(91, 155, 213, 0.5);
}
.back-to-top:active {
  transform: translateY(-1px) scale(0.95);
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ========== Top Navigation ========== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transform: translateY(-100%);
  animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.nav-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: bold;
  color: var(--weibo-blue);
  letter-spacing: -0.5px;
  user-select: none;
}
.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #5B9BD5, #3B7BB5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-menu-item {
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
}
.nav-menu-item:hover {
  color: var(--weibo-blue);
  background: var(--weibo-blue-light);
}
.nav-menu-item.active {
  color: var(--weibo-blue);
  font-weight: 600;
}
.nav-menu-item.active::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--weibo-blue);
  border-radius: 2px;
  animation: navUnderlineIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes navUnderlineIn {
  from { width: 0; opacity: 0; }
  to { width: 24px; opacity: 1; }
}

/* ========== Theme Toggle ========== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--weibo-blue-light);
  color: var(--weibo-blue);
}
.theme-toggle .theme-icon-sun { display: none; }
.theme-toggle .theme-icon-moon { display: inline-block; }

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 20px;
  transition: background 0.2s;
  user-select: none;
}
.nav-user:hover { background: #EDF2F7; }
.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.nav-user-name {
  font-size: 13px;
  color: var(--text-primary);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== Cover Banner ========== */
.cover-banner {
  margin-top: 52px;
  position: relative;
  height: 300px;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.3s forwards;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cover-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://picsum.photos/seed/anime-sunset-city/2048/640');
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform: translateZ(0);
}
.cover-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(255,255,255,0.1) 0%, transparent 50%);
}
.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.4));
}
.cover-content {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  pointer-events: none;
}
.cover-content > * {
  pointer-events: auto;
}
.cover-info {
  color: #fff;
}
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.cover-name {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFade 0.7s ease 0.8s forwards;
}
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #F0C850, #5B9BD5);
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(91,155,213,0.4);
  flex-shrink: 0;
}
.cover-bio {
  font-size: 14px;
  opacity: 0;
  max-width: 500px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transform: translateY(20px);
  animation: slideUpFade 0.7s ease 1s forwards;
}
.cover-stats {
  display: flex;
  gap: 32px;
  margin-top: 14px;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFade 0.7s ease 1.2s forwards;
}
.cover-stat {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
  user-select: none;
}
.cover-stat:hover { transform: translateY(-2px); }
.cover-stat-num {
  font-size: 22px;
  font-weight: bold;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  font-variant-numeric: tabular-nums;
}
.cover-stat-label {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

/* ========== Main Content ========== */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 40px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}

/* ========== Profile Card (Left) ========== */
.profile-card {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  position: sticky;
  top: 68px;
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
.profile-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.profile-card-header {
  padding: 24px 20px 16px;
  text-align: center;
  background: linear-gradient(180deg, var(--weibo-blue-light) 0%, var(--card) 60%);
  position: relative;
}
.profile-card-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  margin: 0 auto 12px;
  display: block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}
.profile-card-avatar-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 12px;
}
.profile-card-avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(91, 155, 213, 0.4), rgba(59, 123, 181, 0.2), rgba(123, 192, 245, 0.3));
  filter: blur(8px);
  z-index: 0;
  animation: avatarGlow 3s ease-in-out infinite;
}
@keyframes avatarGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}
.profile-card-avatar:hover {
  transform: scale(1.08);
}
.profile-card-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.profile-card-verified {
  font-size: 12px;
  color: var(--weibo-blue);
  margin-top: 4px;
}
.profile-card-bio {
  padding: 0 20px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}
.profile-card-stats {
  display: flex;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.profile-stat-item {
  flex: 1;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
  user-select: none;
}
.profile-stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 24px;
  background: var(--border-light);
}
.profile-stat-item:hover { background: #F5F8FC; }
.profile-stat-num {
  font-size: 20px;
  font-weight: bold;
  color: var(--weibo-blue);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.profile-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.profile-card-info {
  padding: 16px 20px;
}
.profile-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 0;
}
.profile-info-icon {
  width: 16px;
  text-align: center;
  color: var(--text-tertiary);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-info-icon svg {
  width: 14px;
  height: 14px;
}
.profile-card-tags {
  padding: 0 20px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profile-tag {
  padding: 4px 10px;
  background: var(--weibo-blue-light);
  color: var(--weibo-blue);
  font-size: 12px;
  border-radius: 12px;
  transition: all 0.2s;
  cursor: pointer;
  user-select: none;
}
.profile-tag:hover {
  background: var(--weibo-blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(91, 155, 213, 0.3);
}

/* ========== Weibo Feed (Right) ========== */
/* ========== Weibo Toolbar (Tabs + Search) ========== */
.weibo-toolbar {
  background: var(--card);
  border-radius: 12px;
  padding: 0 16px 0 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: translateY(-10px);
  animation: slideDown 0.5s ease 1.1s forwards;
}
.weibo-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, transparent 0%, black 20px, black calc(100% - 40px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20px, black calc(100% - 40px), transparent 100%);
}
.weibo-tabs::-webkit-scrollbar { display: none; }
.weibo-tab {
  padding: 16px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  font-weight: 500;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.weibo-tab:hover { color: var(--text-primary); }
.weibo-tab.active {
  color: var(--weibo-blue);
  font-weight: 600;
}
.weibo-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--weibo-blue);
  border-radius: 2px;
  animation: tabUnderlineIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes tabUnderlineIn {
  from { width: 0; opacity: 0; }
  to { width: 28px; opacity: 1; }
}
.weibo-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.weibo-search-input {
  width: 200px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}
.weibo-search-input:focus {
  border-color: var(--weibo-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.15);
}
.weibo-search-btn {
  height: 32px;
  padding: 0 16px;
  border-radius: 16px;
  background: var(--weibo-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}
.weibo-search-btn:hover {
  background: var(--weibo-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(91, 155, 213, 0.3);
}
.weibo-search-btn:active { transform: translateY(0); }
.weibo-search-clear {
  height: 32px;
  padding: 0 10px;
  border-radius: 16px;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s;
  border: 1px solid var(--border);
  font-family: inherit;
  display: none;
}
.weibo-search-clear.visible { display: inline-block; }
.weibo-search-clear:hover { color: var(--weibo-blue); border-color: var(--weibo-blue); }

/* ========== Weibo Pagination (second row) ========== */
.weibo-pagination {
  background: var(--card);
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.pagination-btn {
  padding: 8px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--weibo-blue-light);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-weight: 500;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pagination-btn:hover:not(:disabled) {
  background: var(--weibo-blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(91, 155, 213, 0.3);
}
.pagination-btn:active:not(:disabled) {
  transform: translateY(0);
}
.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  color: var(--text-tertiary);
}
.pagination-btn svg {
  width: 14px;
  height: 14px;
}
.pagination-info {
  font-size: 14px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  text-align: center;
}
.pagination-info .current {
  color: var(--weibo-blue);
  font-weight: 600;
  font-size: 16px;
}

/* ========== Weibo Card ========== */
.weibo-card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(30px);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
  will-change: transform, opacity;
}
.weibo-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.weibo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(120deg, transparent 30%, rgba(91, 155, 213, 0.55) 50%, transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  background-size: 200% 200%;
  background-position: 100% 0;
}
.weibo-card:hover::before {
  opacity: 1;
  animation: borderShine 1.2s ease-out forwards;
}
@keyframes borderShine {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}
.weibo-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.weibo-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.weibo-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.weibo-card:hover .weibo-card-avatar {
  transform: scale(1.05);
}
.weibo-card-user { flex: 1; min-width: 0; }
.weibo-card-username {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.weibo-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-tertiary);
}
.weibo-card-time {
  font-size: 12px;
  color: var(--text-tertiary);
}
.weibo-card-source {
  color: var(--text-tertiary);
  padding-left: 10px;
  border-left: 1px solid var(--border-light);
}
.weibo-card-content-wrap {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.weibo-card-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 12px;
  word-break: break-word;
}
.expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--weibo-blue);
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: color 0.2s;
  user-select: none;
}
.expand-btn:hover { color: var(--weibo-blue-dark); }
.expand-btn-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 10px;
}
.expand-btn.expanded .expand-btn-arrow {
  transform: rotate(180deg);
}

/* ========== Image Grid ========== */
.image-grid {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
}
.image-grid.count-1 {
  grid-template-columns: 1fr;
  max-width: 500px;
}
.image-grid.count-1 .grid-img-wrap {
  aspect-ratio: 3 / 2;
  max-height: 360px;
}
.image-grid.count-2 {
  grid-template-columns: 1fr 1fr;
  max-width: 500px;
}
.image-grid.count-2 .grid-img-wrap {
  aspect-ratio: 1 / 1;
}
.image-grid.count-3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 420px;
}
.image-grid.count-3 .grid-img-wrap {
  aspect-ratio: 1 / 1;
}
.image-grid.count-4 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 420px;
}
.image-grid.count-4 .grid-img-wrap {
  aspect-ratio: 1 / 1;
}
.image-grid.count-6 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 420px;
}
.image-grid.count-6 .grid-img-wrap {
  aspect-ratio: 1 / 1;
}
.image-grid.count-9 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 420px;
}
.image-grid.count-9 .grid-img-wrap {
  aspect-ratio: 1 / 1;
}
/* 兜底：非标准数量按3列排 */
.image-grid.count-5,
.image-grid.count-7,
.image-grid.count-8 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 420px;
}
.image-grid.count-5 .grid-img-wrap,
.image-grid.count-7 .grid-img-wrap,
.image-grid.count-8 .grid-img-wrap {
  aspect-ratio: 1 / 1;
}
.grid-img-wrap {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #f0f0f0;
}
.grid-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
  opacity: 0;
  transform: scale(1.05);
}
.grid-img-wrap img.loaded {
  opacity: 1;
  transform: scale(1);
}
.grid-img-wrap:hover img {
  transform: scale(1.1);
}
.grid-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s;
  pointer-events: none;
}
.grid-img-wrap:hover::after {
  background: rgba(0,0,0,0.15);
}

/* ========== Lightbox ========== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
  transform: rotate(90deg);
}
.lightbox-close svg {
  width: 20px;
  height: 20px;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
}
.lightbox-nav:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-50%) scale(1.1);
}
.lightbox-nav svg {
  width: 24px;
  height: 24px;
}
.lightbox-prev { left: 32px; }
.lightbox-prev:hover { left: 28px; }
.lightbox-next { right: 32px; }
.lightbox-next:hover { right: 28px; }
.lightbox-image-wrap {
  max-width: 85vw;
  max-height: 85vh;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox.active .lightbox-image-wrap {
  transform: scale(1);
}
.lightbox-image-wrap img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.lightbox-image-wrap img.switching {
  opacity: 0.5;
  transform: scale(0.98);
}
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.4);
  border-radius: 20px;
  z-index: 10;
  font-variant-numeric: tabular-nums;
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
  font-size: 14px;
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ========== Footer ========== */
.page-footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-tertiary);
  font-size: 12px;
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #C0D0E0;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #A0B5D0; }

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
  .main-content {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }
  .profile-card { order: 2; position: static; }
  .weibo-feed { order: 1; }
  .cover-banner { height: 240px; }
  .cover-name { font-size: 22px; }
  .cover-stats { gap: 20px; }
  .cover-stat-num { font-size: 18px; }
  .nav-menu { display: none; }
}
@media (max-width: 640px) {
  .nav-inner { padding: 0 12px; gap: 12px; }
  .nav-logo { font-size: 18px; }
  .nav-logo-icon { width: 28px; height: 28px; font-size: 14px; }
  .nav-user-name { display: none; }
  .cover-banner { height: 200px; }
  .cover-content {
    text-align: center;
    bottom: 20px;
  }
  .cover-info { padding-bottom: 0; }
  .cover-name { font-size: 18px; justify-content: center; }
  .verified-badge { width: 18px; height: 18px; font-size: 10px; }
  .cover-bio { font-size: 12px; max-width: 100%; }
  .cover-stats { justify-content: center; gap: 16px; }
  .cover-stat-num { font-size: 16px; }
  .cover-stat-label { font-size: 11px; }
  .main-content { padding: 16px 12px 30px; gap: 12px; }
  .weibo-card { padding: 14px; }
  .weibo-card-avatar { width: 40px; height: 40px; }
  .weibo-card-username { font-size: 14px; }
  .weibo-card-content { font-size: 13px; line-height: 1.7; }
  .image-grid.count-1,
  .image-grid.count-2,
  .image-grid.count-3,
  .image-grid.count-4,
  .image-grid.count-6,
  .image-grid.count-9 { max-width: 100%; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-nav svg { width: 18px; height: 18px; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-close { top: 16px; right: 16px; width: 38px; height: 38px; }
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
  .back-to-top svg { width: 18px; height: 18px; }
  .weibo-toolbar {
    flex-direction: column;
    padding: 10px 12px;
    gap: 8px;
    align-items: stretch;
  }
  .weibo-tabs {
    width: 100%;
  }
  .weibo-tab { padding: 10px 12px; font-size: 13px; }
  .weibo-search {
    width: 100%;
  }
  .weibo-search-input { flex: 1; width: 100%; }
  .weibo-pagination { padding: 10px 12px; gap: 10px; }
  .pagination-btn { padding: 6px 14px; font-size: 13px; }
  .pagination-info { font-size: 13px; min-width: 60px; }
}

/* ========== Particle Canvas ========== */
#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

/* ========== 3D Card Tilt ========== */
.weibo-card.tilting {
  box-shadow: 0 20px 50px rgba(91, 155, 213, 0.18), 0 0 0 1px rgba(91, 155, 213, 0.15);
  transition: box-shadow 0.08s ease, transform 0.05s ease-out;
}
[data-theme="dark"] .weibo-card.tilting {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(91, 155, 213, 0.25);
}
.weibo-card > * { position: relative; z-index: 1; }
.card-glow {
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(ellipse at var(--mx) var(--my), rgba(91, 155, 213, 0.35) 0%, transparent 60%);
}
.weibo-card.tilting .card-glow {
  opacity: 1;
}

/* ========== Cover Light Sweep ========== */
.cover-light-sweep {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.08) 45%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.08) 55%, transparent 60%);
  background-size: 200% 100%;
  animation: lightSweep 6s ease-in-out infinite;
}
@keyframes lightSweep {
  0% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== Button Ripple ========== */
.ripple {
  position: relative;
  overflow: hidden;
}
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(91, 155, 213, 0.35);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}
[data-theme="dark"] .ripple-effect {
  background: rgba(255, 255, 255, 0.2);
}

/* ========== Page Background Gradient Animation ========== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(ellipse at 20% 50%, rgba(91, 155, 213, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(91, 155, 213, 0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(59, 123, 181, 0.04) 0%, transparent 50%);
  animation: bgShift 15s ease-in-out infinite alternate;
}
@keyframes bgShift {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Video Block */
.video-block {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background-color: #1a1a2e;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  margin: 12px 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.video-block:hover {
  transform: scale(1.015);
  box-shadow: 0 4px 24px rgba(91, 155, 213, 0.25);
}
.video-poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.5) 100%);
  z-index: 1;
}
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(91, 155, 213, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s, transform 0.2s;
}
.video-block:hover .video-play-btn {
  background: rgba(91, 155, 213, 1);
  transform: translate(-50%, -50%) scale(1.1);
}
.video-duration {
  position: absolute;
  bottom: 8px;
  right: 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  z-index: 2;
}

/* Video Lightbox */
.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.video-lightbox.active {
  opacity: 1;
}
.video-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}
.video-lightbox-inner {
  position: relative;
  width: 90vw;
  max-width: 960px;
  z-index: 1;
}
.video-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
.video-lightbox-close:hover {
  background: rgba(255,255,255,0.3);
}
.video-lightbox-inner video {
  width: 100%;
  height: auto;
  border-radius: 8px;
  outline: none;
}
