:root{
  --bg:#f4f4f4;
  --card:#ffffff;
  --text:#222;
  --muted:#6f6f6f;
  --line:#e8e8e8;
  --shadow:0 8px 24px rgba(0,0,0,.06);
  --radius:14px;

  --accent:#4fb88a;        /* 圆环绿色 */
  --accent2:#1f6feb;       /* 主要强调色（按钮等） */

  /* 顶部横幅图：如有图片，可改成 url("img/your-hero.jpg") */
  --hero-image: url('https://s2.loli.net/2026/01/25/wxoDImaNyJA4Zur.png');
}

*{ box-sizing:border-box; }

html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "PingFang SC","Hiragino Sans GB","Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-width: 320px;
}

a{ color:inherit; text-decoration:none; }

.page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.hero{
  height:300px;
  background: var(--hero-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 70%;
  position:relative;
  overflow:hidden;
  background-color: #eae9e9;
}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
}

.container{
  width:min(1180px, calc(100% - 32px));
  margin:0 auto;
  padding:18px 0 34px;
}

/* ====== Header ====== */
.topHeader{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  padding: 6px 0 10px;
}
.brand{
  display:flex;
  align-items:flex-start;
  gap:14px;
}
.mark{
  color:#111;
  margin-top: 4px;
}
.titles h1{
  margin:0;
  font-size:32px;
  letter-spacing:.2px;
  font-weight:bold;
}
.sub{
  margin:8px 0 0;
  color: var(--muted);
  font-size:14px;
}

/* hamburger */
.iconBtn{
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--card);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  cursor:pointer;
  display: none;
}
.iconBars{
  display:block;
  width:18px;
  height:2px;
  background:#888;
  margin:0 auto;
  position:relative;
}
.iconBars::before,
.iconBars::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  background:#888;
}
.iconBars::before{ top:-6px; }
.iconBars::after{ top:6px; }

/* ====== Actions row ====== */
.actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  padding:10px 0 18px;
}
.ghostBtn{
  height:32px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#f8f8f8;
  color:#333333;
  font-size:13px;
  cursor:pointer;
}

/* ====== Board Layout ====== */
.board{
  display:grid;
  grid-template-columns: 270px minmax(0,1fr);
  gap:18px;
  align-items:start;
}

/* ====== Sidebar ====== */
.sidebar{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.sideCard{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.03);
  padding:14px;
}
.sideTitle{
  font-size:13px;
  font-weight:bold;
  color:#444;
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
}
.sideDot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:#111;
  opacity:.9;
}
.sideDot.hollow{
  background:transparent;
  border:2px solid #bdbdbd;
  opacity:1;
}

.avatar {
	width: 64px;
	height: 64px;
	border-radius: 9999px;
	margin-top: 12px;
}
.avatar_name {
	font-size: 18px;
	margin: 0;
	padding: 6px 0;
}
.avatar_summary {
	font-size: 13px;
	margin: 0;
	padding-top: 6px;
	color: #7a7a7a;
}
.about-btn {
	margin-top: 8px;
	background: #fffbf5;
	border: 1px solid #d4cbbc;
	border-radius: 999px;
	padding: 6px 24px;
	cursor: pointer;
	color: #222;
	margin-bottom: 12px;
}
.about-btn:hover {
	box-shadow: 0 2px 12px rgba(0,0,0,.05);
	transition: all .2s ease-in-out;
}

/* ====== Year ring ====== */
.yearStat{
  padding-top:6px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
.ring{
  width:168px;
  height:168px;
  border-radius:999px;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #e7e7e7 0);
  display:grid;
  place-items:center;
}
.ringInner{
  width:132px;
  height:132px;
  border-radius:999px;
  background:var(--card);
  border:1px solid var(--line);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.ringNum{
  font-size:44px;
  font-weight:bold;
  line-height:1;
}
.ringLabel{
  margin-top:6px;
  font-size:13px;
  color: var(--muted);
}
.yearMeta{
  font-size:13px;
  color: var(--muted);
}

/* ====== Main Card ====== */
.mainCard{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.03);
  overflow:hidden;
}

.mainTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 14px 10px;
  border-bottom:1px solid var(--line);
}

.tabs{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  align-items:center;
}
.tab{
  border:0;
  background:transparent;
  padding:6px 2px;
  font-size:14px;
  color:#6a6a6a;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.tabDot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:#bfbfbf;
}
.tab.active{
  color:#111;
  font-weight:bold;
}
.tab.active .tabDot{
  background:#111;
}

.filters{
  display:flex;
  align-items:center;
  gap:10px;
}
.searchBox{
  display:flex;
  align-items:center;
  gap:8px;
  height:34px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  min-width: 220px;
}
.searchBox input{
  border:0;
  outline:none;
  width:100%;
  font-size:14px;
}

.miniBtn{
  height:34px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-size:13px;
}
.miniBtn:hover{
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.miniBtn.primary{
  border-color: rgba(31,111,235,.25);
  background: rgba(31,111,235,.08);
  color: var(--accent2);
  font-weight:bold;
}

.contentArea{
  padding:14px;
}

.loading{
  display:grid;
  place-items:center;
  gap:10px;
  padding:22px 0 8px;
}
.spinner{
  width:28px;
  height:28px;
  border-radius:999px;
  border:3px solid #e6e6e6;
  border-top-color:#9c9c9c;
  animation: spin .7s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
.loadingText{
  font-size:13px;
  color: var(--muted);
}

/* Grid like screenshot */
.grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:14px;
  margin-top:10px;
}
.card{
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  background:#fff;
  box-shadow: 0 1px 10px rgba(0,0,0,.03);
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover{
  transform: translateY(-2px);
  border-color:#dddddd;
  box-shadow: var(--shadow);
}
.thumb{
  height:92px;
  background: #dddddd;
  position:relative;
}
.thumbShade{
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,.0) 0%, rgba(0,0,0,.10) 100%);
}
.cardBody{
  padding:10px 10px 12px;
}
.cardTitle{
  font-size:13.5px;
  font-weight:bold;
  color:#222;
  line-height:1.3;
  min-height: 34px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}
.badge{
  font-size:11px;
  padding:3px 6px;
  border-radius:6px;
  border:1px solid var(--line);
  background:#f7f7f7;
  color:#555;
}
.badge.ok{
  background: rgba(79,184,138,.16);
  border-color: rgba(79,184,138,.25);
  color:#1f6b4e;
  font-weight:bold;
}
.badge.ghost{
  background:#fff;
  color:#777;
}

.tagRow{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}
.tag{
  font-size:11px;
  padding:3px 6px;
  border-radius:6px;
  background:#f2f2f2;
  color:#555;
}
.tag.more{
  background:#fff;
  border:1px dashed #ddd;
  color:#888;
}

.empty{
  margin-top:10px;
  padding:18px 14px;
  border:1px dashed #dcdcdc;
  border-radius:12px;
  text-align:center;
  color: var(--muted);
  background:#fafafa;
}

.sentinel{
  height:1px;
}

/* ====== Footer ====== */
.footer{
  padding:16px 0 6px;
  color:#7a7a7a;
  font-size:13px;
}

/* ====== Toast ====== */
.toast{
  position:fixed;
  left:50%;
  bottom:16px;
  transform:translateX(-50%);
  background:rgba(20,20,20,.92);
  color:#fff;
  padding:10px 12px;
  border-radius:999px;
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transition:.2s ease;
}
.toast.show{ opacity:1; }

/* ====== Mobile sidebar overlay ====== */
.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.28);
  backdrop-filter: blur(1px);
  z-index:40;
}

.noScroll{ overflow:hidden; }

/* ====== Responsive ====== */
@media (max-width: 1080px){
  .grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px){
  .board{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iconBtn { display: block; }

  /* sidebar as drawer */
  
  .sidebar{
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    width: 320px;
    max-width: calc(100% - 70px);
    background: transparent;
    padding: 14px;
    transform: translateX(-110%);
    transition: transform .18s ease;
    z-index:50;
  }
  .sidebar.open{ transform: translateX(0); }
}
@media (max-width: 520px){
  .grid{ grid-template-columns: 1fr; }
  .titles h1{ font-size:32px; }
  /* 移除原有的 searchBox min-width 限制，交由 flex 控制 */
  .searchBox{ min-width: auto; }
}

/* ====== 新增：缩略图图片支持 ====== */
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 保持比例裁切填充 */
  display: block;
}

/* ====== 修改：移动端响应式优化 ====== */
@media (max-width: 680px) {
  /* 1. 修复 Grid 布局撑开问题 */
  /* 给 board 内的主区域添加 min-width: 0，这在 Grid 布局中是必须的 */
  .main {
    min-width: 0;
    width: 100%;
    overflow: hidden; /* 确保任何溢出都在这里被截断 */
  }

  /* 2. 重置 mainTop 布局 */
  .mainTop {
    flex-direction: column;
    align-items: flex-start; /* 左对齐，不要 stretch */
    gap: 12px;
    width: 100%;
    /* 这里的 overflow hidden 配合上面的 min-width: 0 是双重保险 */
    overflow: hidden; 
  }
  
  .filters {
    width: 100%;
    display: flex;
    gap: 10px;
  }
  
  .searchBox {
    flex: 1;
    min-width: 0; /* 防止 input 撑开 */
  }

  /* 3. Tabs 横向滚动核心 */
  .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    
    /* 【绝杀手段】不再信任 100%，直接根据屏幕宽度计算最大宽度
       屏幕宽(100vw) - 页面内边距/边框(约60px)
       这能强制让浏览器知道“无论内容多长，盒子只能这么宽” */
    max-width: calc(100vw - 64px); 
    width: 100%;

    gap: 10px;
    padding-bottom: 4px; /* 留出一点空间给触摸 */
    
    /* 顺滑滚动体验 */
    -webkit-overflow-scrolling: touch;
    
    /* 隐藏滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  /* 隐藏 Chrome/Safari 滚动条 */
  .tabs::-webkit-scrollbar {
    display: none;
  }

  /* 4. 防止内部按钮变形 */
  .tab {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .cardTitle {
    font-size: 15px;
  }
}

.privacy:hover {
  text-decoration: underline;
}
