/* ==========================================================
   O鲸鲸 官网 · page.css
   内页共用：页头 / 视图切换 / 说明框 / 资源卡片 / 骨架屏
   （首页用 home.css，新闻页另加 news.css）
   ========================================================== */

/* ==========================================================
   页头（渐变光晕，与首页 hero 呼应）
   ========================================================== */
.page-main { padding-top: var(--nav-h); }

.page-head {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(74, 144, 226, .30), transparent 62%),
    radial-gradient(90% 80% at 92% 12%, rgba(120, 90, 230, .20), transparent 60%),
    linear-gradient(180deg, #0e1c3a 0%, var(--c-bg) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.page-head::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 170, 255, .45), transparent);
}
.page-head-inner {
  max-width: 760px; margin: 0 auto;
  padding: 30px 18px 24px;
  display: flex; align-items: center; gap: 12px;
}
.page-head-text { min-width: 0; }
.page-head h1 {
  font-size: 25px; font-weight: 700; letter-spacing: 1px;
  background: linear-gradient(90deg, #fff, #a9c9ff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-head p { margin-top: 6px; font-size: 13px; color: var(--c-dim); }

.page-back {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff; font-size: 17px; line-height: 1;
  transition: .2s;
}
.page-back:hover { background: rgba(255, 255, 255, .16); transform: translateX(-2px); }
.page-back[hidden] { display: none; }

/* 列表工具条 */
.list-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12.5px; color: var(--c-dim-2);
}
.link-btn {
  background: none; border: 0; padding: 4px 2px;
  color: #7db4ff; font-size: 12.5px;
  transition: .2s;
}
.link-btn:hover { color: #a9cfff; text-decoration: underline; }
.list-end {
  padding: 22px 0 6px; text-align: center;
  font-size: 12px; color: var(--c-dim-2);
}

/* ==========================================================
   视图切换（同一页内列表 / 详情）
   ========================================================== */
.page-view { visibility: hidden; height: 0; overflow: hidden; opacity: 0; }
.page-view.show { visibility: visible; height: auto; overflow: visible; opacity: 1; }
.page-view#view-detail.show { animation: detIn .3s ease-out; }
@keyframes detIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ==========================================================
   资源卡片
   ========================================================== */
.res-card {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--c-card);
  border: 1px solid var(--c-card-line);
  border-radius: var(--radius);
  padding: 14px;
  transition: .2s;
}
.res-card:hover { background: rgba(255, 255, 255, .10); transform: translateY(-1px); }

.res-icon {
  width: 64px; height: 64px; flex-shrink: 0;
  border-radius: 14px; object-fit: cover;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
}
.res-body { min-width: 0; flex: 1; }
.res-name { font-size: 15.5px; font-weight: 600; }
.res-desc {
  margin-top: 3px; font-size: 12.5px; color: var(--c-dim); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.res-pills { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
  font-size: 11px; color: var(--c-dim);
}
.pill.tag {
  background: rgba(74, 144, 226, .16);
  border-color: rgba(110, 170, 255, .28);
  color: #9cc6ff;
}
.res-actions { flex-shrink: 0; display: flex; flex-direction: column; gap: 7px; }
.res-btn {
  padding: 8px 16px; font-size: 13px; color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, rgba(90, 157, 245, .92), rgba(70, 125, 220, .92));
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(40, 100, 200, .32);
  transition: .2s;
}
.res-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(40, 100, 200, .48); }
.res-btn.ghost {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .16);
  box-shadow: none;
  color: var(--c-dim);
}
.res-btn.ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* 窄屏：按钮移到文字下方，别跟标题抢宽度 */
@media (max-width: 479px) {
  .res-card { flex-wrap: wrap; }
  .res-icon { width: 56px; height: 56px; }
  .res-body { flex: 1 1 calc(100% - 70px); }
  .res-actions {
    width: 100%;
    flex-direction: row;
    margin-top: 2px;
  }
  .res-actions .res-btn { flex: 1; text-align: center; padding: 9px 12px; }
}

/* ==========================================================
   说明框
   ========================================================== */
.note-box {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
}
.note-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.note-list { list-style: none; }
.note-list li {
  position: relative;
  padding-left: 15px; margin-bottom: 7px;
  font-size: 12.5px; line-height: 1.75; color: var(--c-dim);
}
.note-list li:last-child { margin-bottom: 0; }
.note-list li::before {
  content: ''; position: absolute; left: 2px; top: 9px;
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(110, 170, 255, .7);
}
.note-list b { color: rgba(255, 255, 255, .88); font-weight: 600; }

/* ==========================================================
   骨架屏
   ========================================================== */
.sk { border-radius: var(--radius-s); background: rgba(255, 255, 255, .05); position: relative; overflow: hidden; }
.sk::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent);
  animation: skShine 1.3s infinite;
}
@keyframes skShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.sk-card { display: flex; gap: 13px; padding: 14px; border: 1px solid rgba(255, 255, 255, .06); border-radius: var(--radius); }
.sk-thumb { width: 64px; height: 64px; flex-shrink: 0; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 12px; }
.sk-line.w60 { width: 60%; }
.sk-line.w35 { width: 35%; }

@media (min-width: 720px) {
  .page-head h1 { font-size: 28px; }
}
