@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+SC:wght@400;500;600;700;900&display=swap');

/* BugCapturer 账号页共享样式（与 share.html 同一设计体系） */
:root {
  --bg: #050a18;
  --bg-soft: #0a1128;
  --card: #0e1630;
  --card-border: rgba(99, 102, 241, 0.18);
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-faint: #64748b;
  --accent: #6366f1;
  --accent2: #8b5cf6;
  --danger: #ef4444;
  --green: #10b981;
  --amber: #f59e0b;
}

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

html,
body {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 85% 10%, rgba(139, 92, 246, 0.10), transparent);
  color: var(--text);
  font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
}

/* ===== 顶栏 ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
  background: rgba(5, 10, 24, 0.8);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-dim);
}

.topbar-btn:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.55);
}

.topbar-btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.topbar-btn.primary:hover {
  color: #fff;
  opacity: 0.9;
}

@media (max-width: 640px) {
  .topbar {
    padding: 12px 16px;
  }

  .brand-name {
    display: none;
  }
}

/* ===== 居中卡片布局 ===== */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px 64px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 32px 30px;
}

@media (max-width: 640px) {
  .auth-wrap {
    padding: 24px 14px 48px;
  }

  .auth-card {
    padding: 26px 20px;
  }
}

.auth-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.auth-sub {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-top: 6px;
}

.auth-body {
  margin-top: 24px;
}

/* ===== 表单 ===== */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}

.field input::placeholder {
  color: var(--text-faint);
}

.field input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.field .hint {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 5px;
}

.btn-main {
  width: 100%;
  padding: 11px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: 9px;
  cursor: pointer;
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: opacity .15s, transform .1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-main:hover {
  opacity: 0.92;
}

.btn-main:active {
  transform: scale(0.98);
}

.btn-main:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-ghost {
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 9px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.55);
}

/* ===== Google 分割线 ===== */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-faint);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(99, 102, 241, 0.15);
}

/* ===== 提示与状态 ===== */
.alert {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 9px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  display: none;
}

.alert.show {
  display: block;
}

.alert.error {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.alert.success {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
}

.auth-foot {
  margin-top: 22px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

.auth-foot a {
  color: #a5b4fc;
  text-decoration: none;
  font-weight: 600;
}

.auth-foot a:hover {
  text-decoration: underline;
}

/* 成功态（图标 + 文案） */
.state-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 16px;
}

.state-icon.ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--green);
}

.state-icon.err {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--danger);
}

.state-icon.wait {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.state-center {
  text-align: center;
}

/* 页面页脚（合规信息，与官网页脚一致：上下 40px 均等 + 顶部分隔线 + 主题色链接） */
.app-foot {
  margin-top: auto;
  padding: 40px 20px;
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

.app-foot a {
  color: var(--accent);
  text-decoration: none;
  transition: color .2s;
}

.app-foot a:hover {
  color: var(--accent2);
}

/* 已登录信息卡 */
.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.user-chip img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.user-chip .avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.user-chip .meta {
  min-width: 0;
}

.user-chip .name {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip .email {
  font-size: 12px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perk {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 10px;
}

.perk svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--green);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: var(--text);
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 我的分享页 ===== */
.ms-wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

@media (max-width: 640px) {
  .ms-wrap {
    padding: 20px 14px 48px;
  }
}

.ms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ms-head .auth-title {
  font-size: 22px;
}

.ms-head .user-chip {
  margin-bottom: 0;
}

.ms-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 6px;
}

.ms-list {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.ms-item {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color .15s;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ms-main {
  flex: 1;
  min-width: 0;
}

.ms-thumb {
  flex-shrink: 0;
  width: 200px;
  height: 125px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #0b1120;
  cursor: zoom-in;
}

.ms-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .15s;
}

.ms-thumb:hover {
  border-color: rgba(99, 102, 241, 0.5);
}

.ms-thumb:hover img {
  transform: scale(1.05);
}

@media (max-width: 640px) {
  .ms-thumb {
    width: 96px;
    height: 64px;
  }
}

.ms-item:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.ms-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.type-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  letter-spacing: 0.3px;
}

.ms-meta {
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.ms-meta .days.warn {
  color: var(--amber);
  font-weight: 700;
}

.ms-meta .days.danger {
  color: var(--danger);
  font-weight: 700;
}

.ms-desc {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

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

.ms-btn {
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-dim);
}

.ms-btn:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.55);
}

.ms-btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: #fff;
}

.ms-btn.primary:hover {
  color: #fff;
  opacity: 0.9;
}

.ms-btn.danger:hover {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
}

.ms-empty {
  text-align: center;
  padding: 48px 20px;
}

.ms-empty .state-icon {
  margin-bottom: 16px;
}

.ms-empty p {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-top: 8px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.ms-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.ms-pager .info {
  font-size: 12.5px;
  color: var(--text-faint);
}

.ms-pager button {
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-dim);
  transition: all .15s;
}

.ms-pager button:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.55);
}

.ms-pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== 顶栏账号头像（Google 风格） ===== */
.user-menu {
  position: relative;
}

.avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  transition: box-shadow .15s, transform .15s;
}

.avatar-btn:hover {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.45);
  transform: scale(1.05);
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 210px;
  display: none;
  z-index: 60;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.user-dropdown.open {
  display: block;
}

.ud-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.ud-email {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
  word-break: break-all;
}

.ud-signout {
  margin-top: 10px;
  width: 100%;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-dim);
  transition: all .15s;
}

.ud-signout:hover {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
}

/* ===== 截图灯箱 ===== */
.ms-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(2, 6, 18, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.ms-lightbox.open {
  display: flex;
}

.ms-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* 确认弹层 */
.ms-mask {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(2, 6, 18, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ms-mask.open {
  display: flex;
}

.ms-dialog {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 24px;
}

.ms-dialog .msg {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 20px;
}

.ms-dialog .row {
  display: flex;
  gap: 10px;
}

.ms-dialog .row .btn-main {
  flex: 1;
  background: var(--danger);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.ms-dialog .row .btn-ghost {
  flex: 1;
}