/* =========================================================
 * Microsoft.com 风格整蛊站 · 样式
 * 前台：Fluent 浅色设计（Segoe UI / 白底 / #0067b8 蓝）
 * 弹层：微软风假加载 → 全屏惊吓图（无揭秘页，自动消失）
 * 后台：浅色管理面板
 * ========================================================= */

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

body {
  font-family: "Segoe UI", "Segoe UI Web (West European)", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fff;
  color: #1b1b1b;
  min-height: 100vh;
}

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

/* ---------------- 顶部导航（microsoft.com 风格） ---------------- */
.topnav {
  height: 54px;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1600px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #1b1b1b;
}
.logo-squares {
  display: grid;
  grid-template-columns: 11px 11px;
  grid-template-rows: 11px 11px;
  gap: 2px;
}
.logo-squares i:nth-child(1) { background: #f25022; }
.logo-squares i:nth-child(2) { background: #7fba00; }
.logo-squares i:nth-child(3) { background: #00a4ef; }
.logo-squares i:nth-child(4) { background: #ffb900; }

.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  font-size: 13px;
  color: #1b1b1b;
  padding: 6px 10px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { border-bottom-color: #1b1b1b; }

.nav-right { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.nav-icon { cursor: pointer; font-size: 15px; }
.nav-signin:hover { text-decoration: underline; }

/* ---------------- Hero ---------------- */
.hero {
  background: #f3f2f1;
  padding: 56px 24px 48px;
  text-align: center;
}
.hero h1 { font-size: 34px; font-weight: 600; letter-spacing: -0.5px; }
.hero p { margin-top: 10px; font-size: 15px; color: #505050; }

/* ---------------- 产品卡片 ---------------- */
.cards {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.ms-card {
  background: #fff;
  border: 1px solid #edebe9;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease;
}
.ms-card:hover { box-shadow: 0 6.4px 14.4px rgba(0,0,0,.13), 0 1.2px 3.6px rgba(0,0,0,.11); }

.ms-card-media {
  background: #f3f2f1;
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.ms-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.ms-card-body h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.ms-card-desc { font-size: 13px; color: #605e5c; line-height: 1.5; flex: 1; }

.ms-progress {
  height: 3px;
  background: #edebe9;
  margin: 16px 0 6px;
}
.ms-progress-bar { height: 100%; background: #0067b8; }
.ms-stock { font-size: 12px; color: #605e5c; margin-bottom: 14px; }
.ms-stock strong { color: #a4262c; font-weight: 600; }

.ms-btn {
  width: 100%;
  background: #0067b8;
  color: #fff;
  border: none;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 2px;
  cursor: pointer;
  transition: background .12s;
}
.ms-btn:hover { background: #005a9e; }
.ms-btn:active { background: #004578; }

.empty { text-align: center; padding: 60px 0; color: #605e5c; font-size: 14px; }

/* ---------------- 页脚 ---------------- */
.foot { background: #f3f2f1; padding: 36px 24px 0; }
.foot-cols {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  padding-bottom: 32px;
}
.foot-cols h4 { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.foot-cols a { display: block; font-size: 12px; color: #616161; margin-bottom: 8px; }
.foot-cols a:hover { text-decoration: underline; }
.foot-bottom {
  max-width: 1080px;
  margin: 0 auto;
  border-top: 1px solid #e1dfdd;
  padding: 14px 0 20px;
  font-size: 12px;
  color: #616161;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.foot-bottom span:first-child { margin-right: auto; }

/* ---------------- 假加载弹层（Fluent 对话框风） ---------------- */
.scare-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ms-loading {
  background: #fff;
  width: min(420px, 88vw);
  padding: 36px 40px;
  box-shadow: 0 25.6px 57.6px rgba(0,0,0,.22), 0 4.8px 14.4px rgba(0,0,0,.18);
  border-radius: 4px;
  text-align: center;
}
.ms-spinner {
  width: 40px; height: 40px;
  margin: 0 auto 20px;
  border: 3px solid #e6e6e6;
  border-top-color: #0067b8;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.ms-loading-title { font-size: 16px; font-weight: 600; margin-bottom: 20px; }
.ms-progress-track { height: 4px; background: #edebe9; }
.ms-progress-bar { height: 100%; background: #0067b8; transition: width .08s linear; }
.ms-loading-text { margin-top: 14px; font-size: 12px; color: #605e5c; }

/* ---------------- 惊吓画面（只放图片，无任何文字按钮） ---------------- */
.scare-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }

.scare-media-wrap { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

.scare-media {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  background: #000;
}

video.scare-media,
iframe.scare-media {
  object-fit: contain;
  border: none;
}

.pop { animation: scareZoom .22s cubic-bezier(.2, 2.4, .4, 1) both; }

/* ---------------- 后台登录页 ---------------- */
.login-page {
  min-height: 100vh;
  background: #f3f2f1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: #fff;
  width: min(400px, 92vw);
  padding: 40px 36px 32px;
  border-radius: 4px;
  box-shadow: 0 6.4px 14.4px rgba(0,0,0,.13), 0 1.2px 3.6px rgba(0,0,0,.11);
}
.login-card .logo { justify-content: center; margin-bottom: 22px; }
.login-card h1 { font-size: 22px; font-weight: 600; text-align: center; }
.login-sub { text-align: center; font-size: 13px; color: #605e5c; margin: 8px 0 24px; }
.login-field { margin-bottom: 14px; }
.login-field label { display: block; font-size: 13px; color: #605e5c; margin-bottom: 6px; }
.login-field input {
  width: 100%;
  border: 1px solid #8a8886;
  border-radius: 2px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.login-field input:focus { outline: none; border-color: #0067b8; box-shadow: inset 0 0 0 1px #0067b8; }
.login-error { color: #a4262c; font-size: 12px; margin-bottom: 12px; }
.login-card .ms-btn { margin-top: 6px; }
.login-back { display: block; text-align: center; margin-top: 18px; font-size: 12px; color: #0067b8; }
.login-back:hover { text-decoration: underline; }

/* ---------------- 后台（浅色管理面板） ---------------- */
.admin { max-width: 780px; margin: 0 auto; padding: 28px 16px 80px; }

.admin-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-head h1 { font-size: 24px; font-weight: 600; }
.saved { color: #107c10; font-size: 13px; }
.admin-head .spacer { flex: 1; }

.btn {
  border: 1px solid #8a8886;
  border-radius: 2px;
  padding: 8px 16px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: #1b1b1b;
  background: #fff;
  transition: background .12s;
}
.btn:hover { background: #f3f2f1; }
.btn-primary { background: #0067b8; border-color: #0067b8; color: #fff; font-weight: 600; }
.btn-primary:hover { background: #005a9e; }
.btn-danger { color: #a4262c; border-color: #a4262c; }
.btn-danger:hover { background: #fdf3f4; }

.panel {
  background: #fff;
  border: 1px solid #edebe9;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 18px;
}
.panel h2 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

.form-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.form-row label { width: 110px; font-size: 13px; color: #605e5c; flex-shrink: 0; }
.form-row input[type="text"],
.form-row input[type="number"],
.form-row select {
  flex: 1;
  min-width: 180px;
  background: #fff;
  border: 1px solid #8a8886;
  border-radius: 2px;
  color: #1b1b1b;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}
.form-row input:focus, .form-row select:focus { outline: none; border-color: #0067b8; box-shadow: inset 0 0 0 1px #0067b8; }
.form-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: #0067b8; }
.form-hint { font-size: 12px; color: #8a8886; width: 100%; }

.admin-item { border: 1px solid #edebe9; border-radius: 4px; margin-bottom: 12px; overflow: hidden; }
.admin-item.off { opacity: .55; }

.admin-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #faf9f8;
  cursor: pointer;
  user-select: none;
}
.admin-item-head:hover { background: #f3f2f1; }
.admin-item-head .ai-icon { font-size: 22px; }
.admin-item-head .ai-title { flex: 1; font-weight: 600; font-size: 14px; }
.admin-item-head .caret { transition: transform .2s; color: #605e5c; font-size: 12px; }
.admin-item-head .caret.open { transform: rotate(180deg); }

.admin-item-body { padding: 16px; border-top: 1px solid #edebe9; }

.item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.thumb {
  width: 86px; height: 86px;
  object-fit: cover;
  border: 1px solid #edebe9;
  border-radius: 2px;
  background: #000;
}

.danger-zone { border-color: #f3d1d4; }

/* ---------------- 动画 ---------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scareZoom {
  from { transform: scale(.05); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* 移动端 */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 26px; }
  .form-row label { width: 100%; }
}
