/* ══════════════════════════════════════════════════
   中子星导航站 · 重构样式 (复刻 blog.nstarzx.cn)
   ══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
  /* 亮色主题 (默认) */
  --bg-body: #f4f4f4;
  --bg-card: #ffffff;
  --text-color: #333333;
  --text-color-light: #777777;
  --primary-color: #ff9800; /* 或根据需要调整 */
  --border-color: #eeeeee;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
  --radius: 16px;
  --navbar-bg: rgba(255, 255, 255, 0.8);
  --banner-overlay: rgba(0, 0, 0, 0.3);
}

body.dark {
  /* 暗色主题 */
  --bg-body: #121212;
  --bg-card: #1e1e1e;
  --text-color: #eeeeee;
  --text-color-light: #aaaaaa;
  --primary-color: #ffb74d;
  --border-color: #333333;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
  --navbar-bg: rgba(30, 30, 30, 0.8);
  --banner-overlay: rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: 'Noto Sans SC', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── 导航栏 ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 100;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.navbar-brand {
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff; /* 在Banner上默认白色 */
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: color 0.3s;
}

.navbar.scrolled .navbar-brand {
  color: var(--text-color);
  text-shadow: none;
}

.navbar-center {
  display: flex;
  gap: 20px;
}

.nav-item {
  color: #fff;
  font-size: 0.95rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: color 0.3s;
}

.nav-item i {
  margin-right: 4px;
}

.navbar.scrolled .nav-item {
  color: var(--text-color);
  text-shadow: none;
}

.nav-item:hover {
  color: var(--primary-color) !important;
}

.icon-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: color 0.3s;
}

.navbar.scrolled .icon-btn {
  color: var(--text-color);
  text-shadow: none;
}

/* ── 顶部大图横幅 (Banner) ── */
.banner {
  position: relative;
  height: 70vh; /* 横幅高度 */
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 1;
}

.banner-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--banner-overlay);
  transition: background 0.3s;
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
}

.banner-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.banner-subtitle {
  font-size: 1.2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.banner-subtitle .cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.banner-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  z-index: 3;
  line-height: 0;
}

.banner-wave svg {
  display: block;
  width: 100%;
  height: 60px; /* 波浪高度 */
}

.banner-wave path {
  transition: fill 0.3s;
}

/* ── 主体内容区域 ── */
.main-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

/* 通用卡片样式 */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.3s, background-color 0.3s;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

/* 左侧侧边栏 */
.sidebar-left {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 80px; /* 悬浮定位 */
}

.profile-card {
  padding: 30px 20px;
  text-align: center;
}

.profile-avatar-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.5s;
}

.profile-avatar-wrap:hover {
  transform: rotate(360deg);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.profile-bio {
  font-size: 0.9rem;
  color: var(--text-color-light);
  margin-bottom: 20px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-color);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-color-light);
}

.profile-btn {
  display: inline-block;
  width: 100%;
  padding: 10px 0;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s;
  margin-bottom: 15px;
}

.profile-btn:hover {
  background-color: #e68a00;
  color: #fff;
}

.profile-social {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.profile-social a {
  color: var(--text-color-light);
  font-size: 1.2rem;
  transition: color 0.3s;
}

.profile-social a:hover {
  color: var(--primary-color);
}

/* 右侧内容区 (导航卡片网格) */
.content-right {
  flex-grow: 1;
  min-width: 0; /* 防止超出容器 */
}

.nav-category-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-category-title i {
  color: var(--primary-color);
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.nav-item-card {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 15px;
  cursor: pointer;
}

.nav-item-card:hover {
  transform: translateY(-5px);
}

.nav-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

body.dark .nav-icon-wrap {
  background-color: #2a2a2a;
}

.nav-info {
  flex-grow: 1;
  overflow: hidden;
}

.nav-name {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-desc {
  font-size: 0.85rem;
  color: var(--text-color-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 页脚 ── */
.footer {
  margin-top: 60px;
  position: relative;
  background-color: var(--bg-card);
  text-align: center;
  padding: 0 0 30px 0;
}

.footer-wave {
  line-height: 0;
  margin-top: -60px; /* 向上偏移抵消波浪高度 */
}

.footer-wave svg {
  display: block;
  width: 100%;
  height: 60px;
}

.footer-content {
  padding-top: 20px;
  color: var(--text-color-light);
  font-size: 0.9rem;
}

.footer-content a {
  transition: color 0.3s;
}

.footer-content a:hover {
  color: var(--primary-color);
}

/* ── 响应式设计 ── */
@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
  }
  .sidebar-left {
    width: 100%;
    position: static;
  }
  .banner {
    height: 50vh;
  }
  .banner-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 600px) {
  .navbar-center {
    display: none; /* 移动端隐藏中间菜单 */
  }
  .nav-grid {
    grid-template-columns: 1fr;
  }
}
