/* ============================================================
   SesameCloud — 前端样式
   设计语言：深空暗色 + 玻璃拟态 + 金色点缀（高端、克制、留白）
   ============================================================ */

:root {
  /* 色板 */
  --bg-base:      #080b12;
  --bg-elev:      #0e131d;
  --bg-glass:     rgba(20, 26, 38, 0.72);
  --bg-glass-2:   rgba(28, 35, 50, 0.55);
  --border:       rgba(255, 255, 255, 0.08);
  --border-hi:    rgba(255, 255, 255, 0.16);

  --text:         #e8ecf4;
  --text-dim:     #9aa4b8;
  --text-faint:   #616c82;

  --accent:       #c8a24a;
  --accent-hi:    #e2c274;
  --accent-soft:  rgba(200, 162, 74, 0.14);

  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,.28);
  --shadow:     0 10px 30px rgba(0,0,0,.45);
  --shadow-lg:  0 24px 70px rgba(0,0,0,.62);

  --ease: cubic-bezier(.22,.61,.36,1);
  --header-h: 68px;
}

/* ---------------- 基础重置 ---------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

::selection { background: var(--accent-soft); color: var(--accent-hi); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.10);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.20); background-clip: content-box; }

/* 背景光晕 */
.sc-bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 600px at 12% -8%,  rgba(200,162,74,.10), transparent 60%),
    radial-gradient(900px 520px at 88% 0%,    rgba(78,120,220,.10), transparent 62%),
    radial-gradient(1100px 700px at 50% 108%, rgba(140,90,200,.07), transparent 60%);
}

.sc-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------------- 顶部导航 ---------------- */
.sc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(8, 11, 18, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}

.sc-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sc-brand { display: flex; align-items: center; gap: 11px; }

.sc-brand__mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--accent), #8a6b22);
  color: #0b0e15;
  box-shadow: 0 4px 14px rgba(200,162,74,.32);
}
.sc-brand__mark svg { width: 20px; height: 20px; }

.sc-brand__logo { height: 32px; width: auto; }

.sc-brand__text {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .3px;
  background: linear-gradient(100deg, #fff, #cfd6e4 60%, var(--accent-hi));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sc-nav { display: flex; align-items: center; gap: 6px; }

.sc-nav__link {
  padding: 8px 15px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-dim);
  transition: all .22s var(--ease);
}
.sc-nav__link:hover {
  color: var(--text);
  background: rgba(255,255,255,.06);
}

/* ---------------- 主体 ---------------- */
.sc-main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--header-h) - 130px);
  padding: 34px 0 60px;
}

/* ---------------- 页面标题区 ---------------- */
.sc-page-head { margin-bottom: 26px; }

.sc-page-title {
  margin: 0;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .4px;
}

.sc-page-sub {
  margin: 7px 0 0;
  color: var(--text-dim);
  font-size: 14px;
}

/* ---------------- 相册网格 ---------------- */
.sc-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.sc-album-card {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .38s var(--ease), box-shadow .38s var(--ease), border-color .38s var(--ease);
}
.sc-album-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hi);
  box-shadow: var(--shadow-lg);
}

.sc-album-card__cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #11161f, #1a2130);
  overflow: hidden;
}
.sc-album-card__cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease), filter .4s var(--ease);
}
.sc-album-card:hover .sc-album-card__cover img {
  transform: scale(1.055);
  filter: brightness(1.06);
}

.sc-album-card__cover--empty {
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-size: 13px;
}

.sc-album-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,9,14,.92) 0%, rgba(6,9,14,.18) 46%, transparent 72%);
}

.sc-album-card__badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: rgba(8,11,18,.72);
  border: 1px solid var(--border-hi);
  backdrop-filter: blur(8px);
  color: var(--text-dim);
}

.sc-album-card__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 18px 15px;
}

.sc-album-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-album-card__meta {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.sc-album-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.sc-album-card__meta svg { width: 13px; height: 13px; opacity: .8; }

.sc-meta-expire { color: var(--accent-hi); }
.sc-meta-expired { color: #ff7a7a; }

/* ---------------- 照片网格（缩略图） ---------------- */
.sc-photo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.sc-photo-head__info h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sc-photo-head__stats {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-dim);
}

.sc-photo-head__stats span { display: inline-flex; align-items: center; gap: 6px; }
.sc-photo-head__stats svg { width: 14px; height: 14px; opacity: .85; color: var(--accent); }

.sc-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent-hi);
  border: 1px solid rgba(200,162,74,.28);
}
.sc-badge-live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-hi);
  box-shadow: 0 0 8px var(--accent-hi);
}

.sc-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.sc-photo-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #11161f, #1a2130);
  cursor: zoom-in;
  border: 1px solid var(--border);
  transition: transform .34s var(--ease), box-shadow .34s var(--ease), border-color .34s var(--ease);
}
.sc-photo-item:hover {
  transform: translateY(-3px) scale(1.012);
  border-color: var(--border-hi);
  box-shadow: var(--shadow);
}

.sc-photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.sc-photo-item:hover img { transform: scale(1.06); }

.sc-photo-item__mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4,6,10,.88) 0%, transparent 52%);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.sc-photo-item:hover .sc-photo-item__mask { opacity: 1; }

.sc-photo-item__name {
  position: absolute;
  left: 11px; right: 58px; bottom: 10px;
  font-size: 12px;
  color: #dfe5f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(5px);
  transition: all .3s var(--ease);
}
.sc-photo-item:hover .sc-photo-item__name { opacity: 1; transform: translateY(0); }

.sc-dl-btn {
  position: absolute;
  right: 10px; bottom: 9px;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 9px;
  background: rgba(255,255,255,.13);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  opacity: 0;
  transform: translateY(5px) scale(.9);
  transition: all .3s var(--ease);
}
.sc-photo-item:hover .sc-dl-btn { opacity: 1; transform: translateY(0) scale(1); }
.sc-dl-btn:hover { background: var(--accent); color: #0b0e15; }
.sc-dl-btn svg { width: 16px; height: 16px; }

/* 移动端：下载按钮常显 */
@media (hover: none) {
  .sc-photo-item__mask { opacity: 1; }
  .sc-dl-btn { opacity: 1; transform: none; }
  .sc-photo-item__name { opacity: 1; transform: none; }
}

/* ---------------- 空状态 ---------------- */
.sc-empty {
  padding: 90px 24px;
  text-align: center;
  color: var(--text-faint);
}
.sc-empty__icon {
  width: 76px; height: 76px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--bg-glass-2);
  border: 1px solid var(--border);
}
.sc-empty__icon svg { width: 34px; height: 34px; opacity: .55; }
.sc-empty h3 { margin: 0 0 8px; font-size: 17px; font-weight: 500; color: var(--text-dim); }
.sc-empty p { margin: 0; font-size: 14px; }

/* ---------------- 大图查看 Lightbox ---------------- */
.sc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  background: rgba(4, 6, 10, 0.96);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  animation: scFadeIn .28s var(--ease);
}
.sc-lightbox.is-open { display: flex; flex-direction: column; }

@keyframes scFadeIn { from { opacity: 0; } to { opacity: 1; } }

.sc-lb__stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 88px 18px;
  min-height: 0;
}

.sc-lb__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 90px rgba(0,0,0,.7);
  animation: scZoomIn .32s var(--ease);
}
@keyframes scZoomIn {
  from { opacity: 0; transform: scale(.965); }
  to   { opacity: 1; transform: scale(1); }
}

.sc-lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-hi);
  border-radius: 50%;
  background: rgba(16,21,31,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  transition: all .25s var(--ease);
}
.sc-lb__nav:hover { background: var(--accent); color: #0b0e15; border-color: var(--accent); }
.sc-lb__nav svg { width: 20px; height: 20px; }
.sc-lb__nav--prev { left: 22px; }
.sc-lb__nav--next { right: 22px; }

.sc-lb__close {
  position: absolute;
  top: 22px; right: 22px;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-hi);
  border-radius: 50%;
  background: rgba(16,21,31,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  transition: all .25s var(--ease);
}
.sc-lb__close:hover { background: #e05252; border-color: #e05252; color: #fff; }
.sc-lb__close svg { width: 19px; height: 19px; }

/* 底部信息栏 */
.sc-lb__bar {
  flex: 0 0 auto;
  padding: 15px 26px 18px;
  background: rgba(12, 16, 24, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}

.sc-lb__bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.sc-lb__file {
  min-width: 0;
  flex: 1 1 320px;
}

.sc-lb__filename {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.sc-lb__specs {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
}
.sc-lb__specs span { display: inline-flex; align-items: center; gap: 6px; }
.sc-lb__specs svg { width: 13.5px; height: 13.5px; color: var(--accent); opacity: .9; }
.sc-lb__specs b { color: var(--text); font-weight: 500; }

.sc-lb__actions { display: flex; align-items: center; gap: 11px; }

.sc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid var(--border-hi);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all .26s var(--ease);
}
.sc-btn:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.sc-btn svg { width: 16px; height: 16px; }

.sc-btn--primary {
  background: linear-gradient(135deg, var(--accent), #a8842f);
  border-color: transparent;
  color: #0b0e15;
  box-shadow: 0 6px 20px rgba(200,162,74,.28);
}
.sc-btn--primary:hover {
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  box-shadow: 0 9px 26px rgba(200,162,74,.4);
}

/* ---------------- 错误页 ---------------- */
.sc-error {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
}
.sc-error__code {
  font-size: 92px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(140deg, var(--accent-hi), #6d5518);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: .9;
}
.sc-error__msg { margin: 18px 0 28px; color: var(--text-dim); font-size: 15px; }

/* ---------------- 分页 ---------------- */
.sc-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
}
.sc-pager a, .sc-pager span {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-dim);
  font-size: 14px;
  transition: all .24s var(--ease);
}
.sc-pager a:hover { border-color: var(--accent); color: var(--accent-hi); }
.sc-pager .is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0e15;
  font-weight: 600;
}

/* ---------------- 页脚 ---------------- */
.sc-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: rgba(6, 9, 14, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 26px 0;
}
.sc-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.sc-footer__copy { color: var(--text-faint); font-size: 13.5px; }
.sc-footer__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-faint);
}
.sc-footer__meta a { transition: color .22s var(--ease); }
.sc-footer__meta a:hover { color: var(--accent-hi); }

/* ---------------- 提示条 ---------------- */
.sc-alert {
  padding: 13px 18px;
  border-radius: var(--radius);
  margin-bottom: 22px;
  font-size: 14px;
  border: 1px solid;
}
.sc-alert--error {
  background: rgba(224,82,82,.1);
  border-color: rgba(224,82,82,.32);
  color: #ff9c9c;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
  .sc-container { padding: 0 20px; }
  .sc-lb__stage { padding: 20px 70px 14px; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .sc-container { padding: 0 15px; }
  .sc-main { padding: 22px 0 44px; }

  .sc-brand__text { font-size: 15.5px; }
  .sc-nav__link { padding: 7px 11px; font-size: 13.5px; }

  .sc-page-title { font-size: 20px; }
  .sc-photo-head__info h1 { font-size: 19px; gap: 10px; }
  .sc-photo-head__stats { gap: 13px; font-size: 12.5px; }

  .sc-album-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .sc-album-card__body { padding: 12px 13px 11px; }
  .sc-album-card__title { font-size: 14px; }
  .sc-album-card__meta { gap: 10px; font-size: 11.5px; margin-top: 5px; }

  .sc-photo-grid { grid-template-columns: repeat(auto-fill, minmax(31%, 1fr)); gap: 8px; }

  /* Lightbox 移动端 */
  .sc-lb__stage { padding: 14px 12px 8px; }
  .sc-lb__nav { width: 42px; height: 42px; }
  .sc-lb__nav--prev { left: 8px; }
  .sc-lb__nav--next { right: 8px; }
  .sc-lb__close { top: 12px; right: 12px; width: 38px; height: 38px; }

  .sc-lb__bar { padding: 12px 15px 15px; }
  .sc-lb__bar-inner { gap: 13px; }
  .sc-lb__filename { font-size: 14px; }
  .sc-lb__specs { gap: 12px; font-size: 12px; }
  .sc-lb__actions { width: 100%; }
  .sc-lb__actions .sc-btn { flex: 1; justify-content: center; }

  .sc-footer__inner { flex-direction: column; text-align: center; gap: 12px; }
  .sc-footer__meta { justify-content: center; gap: 14px; }
}

@media (max-width: 420px) {
  .sc-photo-grid { grid-template-columns: repeat(2, 1fr); }
}
