/* ============================================================
 * 时光机 - 前台页面样式（移动端优先）
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #eef0f4;
  min-height: 100vh;
  color: #333;
}

/* 页面容器 */
.sgj-page {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  padding: 14px 14px 70px;
}
.sgj-page-title {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  padding: 18px 10px 6px;
  letter-spacing: 2px;
  text-shadow: 0 1px 3px rgba(255,255,255,.6);
}
.sgj-block { position: relative; margin: 10px 0; }
.sgj-center { text-align: center; }

.sgj-title {
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 4px;
  text-shadow: 0 1px 2px rgba(255,255,255,.5);
}
.sgj-text { white-space: pre-wrap; word-break: break-word; }
.sgj-caption {
  font-size: 12px;
  text-align: center;
  color: rgba(0,0,0,.55);
  padding-top: 4px;
}
.sgj-deco { padding: 4px 0; user-select: none; }

/* 轮播 */
.sgj-carousel { position: relative; width: 100%; overflow: hidden; }
.sgj-cslide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .6s;
}
.sgj-cslide.active { opacity: 1; }
.sgj-cdots {
  position: absolute; bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
  z-index: 2;
}
.sgj-cdot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.6);
  transition: all .3s; cursor: pointer;
}
.sgj-cdot.active { background: #fff; width: 18px; border-radius: 4px; }

/* 链接 / 按钮 */
.sgj-linkbox { overflow: hidden; background: #f5f5f5; }
.sgj-linkhead {
  padding: 8px 12px; font-size: 13px; font-weight: 600;
  background: rgba(0,0,0,.06);
}
.sgj-btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff !important;
  text-decoration: none;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(102,126,234,.35);
}

/* 音乐播放器 */
.sgj-music {
  display: flex; align-items: center; gap: 10px;
  margin: 12px auto 4px;
  padding: 8px 14px;
  width: fit-content; max-width: 90%;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  backdrop-filter: blur(6px);
}
.sgj-music-btn {
  width: 34px; height: 34px; flex: none;
  border: none; border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; font-size: 16px;
  cursor: pointer;
  animation: none;
}
.sgj-music-btn.playing { animation: sgjSpin 2.2s linear infinite; }
@keyframes sgjSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.sgj-music-title { font-size: 13px; color: #555; }

/* 编辑器画布专属 */
.sgj-edit { min-height: 640px; cursor: default; }
.sgj-edit .sgj-block { cursor: pointer; border: 2px dashed transparent; transition: border-color .2s; }
.sgj-edit .sgj-block:hover { border-color: rgba(102,126,234,.7); }
.sgj-edit .sgj-block.sgj-selected { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,.25); }

/* ---------- 首页项目列表 ---------- */
.sgj-home {
  max-width: 560px; margin: 0 auto; padding: 20px 16px 80px;
}
.sgj-home-hero {
  text-align: center; padding: 34px 10px 24px; color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 18px; margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(102,126,234,.35);
}
.sgj-home-hero h1 { font-size: 28px; letter-spacing: 3px; }
.sgj-home-hero p { font-size: 13px; opacity: .85; margin-top: 6px; }
.sgj-card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border-radius: 14px; padding: 16px;
  margin: 12px 0; box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .15s;
}
.sgj-card:active { transform: scale(.98); }
.sgj-card .t { font-size: 17px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.sgj-card .t .lock { font-size: 12px; background: #f1eaff; color: #764ba2; padding: 2px 8px; border-radius: 999px; }
.sgj-card .r { font-size: 13px; color: #888; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgj-card .m { font-size: 12px; color: #aaa; margin-top: 8px; }
.sgj-empty { text-align: center; color: #999; padding: 60px 0; }

/* 密码锁屏 */
.sgj-lock {
  max-width: 420px; margin: 0 auto; padding: 30px 20px;
}
.sgj-lock-box {
  background: #fff; border-radius: 18px; padding: 30px 22px; text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.1); margin-top: 40px;
}
.sgj-lock-box .icon { font-size: 44px; }
.sgj-lock-box h2 { margin: 10px 0 4px; font-size: 20px; }
.sgj-lock-box p { color: #999; font-size: 13px; margin-bottom: 16px; }
.sgj-lock-box input {
  width: 100%; padding: 12px; font-size: 16px; text-align: center;
  border: 1px solid #ddd; border-radius: 10px; margin-bottom: 12px; outline: none;
}
.sgj-lock-box input:focus { border-color: #667eea; }
.sgj-lock-box button {
  width: 100%; padding: 12px; font-size: 16px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; cursor: pointer;
}
.sgj-lock-msg { color: #e5484d; font-size: 13px; min-height: 18px; margin-bottom: 8px; }

/* 底部后台小入口 */
.sgj-admin-entry {
  position: fixed; right: 10px; bottom: 8px;
  font-size: 10px; color: rgba(0,0,0,.28);
  background: rgba(255,255,255,.5);
  padding: 3px 8px; border-radius: 999px;
  text-decoration: none; z-index: 50;
  user-select: none;
}

/* 404 */
.sgj-404 { text-align: center; padding: 80px 20px; color: #888; }
.sgj-404 h2 { font-size: 22px; margin-bottom: 8px; }
