/* h5/site/site.css - 没事儿微记官网样式 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
  min-height: 100vh;
  color: #E2E8F0;
  -webkit-font-smoothing: antialiased;
}

/* ===== 通用 ===== */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icp-info {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.5);
  margin-top: 8px;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(30, 41, 59, 0.95);
  color: #F1F5F9;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.toast.show {
  opacity: 1;
}

/* ===== 首页 ===== */
.main-container {
  width: 100%;
  max-width: 400px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  justify-content: center;
}

.brand-area {
  text-align: center;
  margin-bottom: 36px;
}

.brand-name {
  font-size: 36px;
  font-weight: 900;
  color: #F59E0B;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
  margin-bottom: 8px;
}

.brand-slogan {
  font-size: 14px;
  color: rgba(148, 163, 184, 0.7);
  letter-spacing: 4px;
  font-weight: 300;
}

/* ===== 扫码区 ===== */
.scan-area {
  text-align: center;
  margin-bottom: 28px;
  width: 100%;
}

.scan-hint {
  font-size: 17px;
  color: rgba(245, 158, 11, 0.9);
  font-weight: 600;
  margin-bottom: 6px;
}

.scan-sub-hint {
  font-size: 14px;
  color: rgba(226, 232, 240, 0.6);
  margin-bottom: 20px;
}

.qr-wrapper {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.15);
  position: relative;
  overflow: hidden;
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.qr-image.error {
  display: none;
}

.qr-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #F8FAFC;
  border-radius: 8px;
}

.qr-fallback-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.qr-fallback-text {
  font-size: 13px;
  color: #94A3B8;
}

.scan-tip {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.5);
  margin-top: 14px;
}

/* ===== 折叠登录区 ===== */
.login-fold {
  width: 100%;
  max-width: 340px;
  margin-top: 4px;
}

.fold-toggle {
  text-align: center;
  padding: 10px;
  cursor: pointer;
  transition: color 0.2s;
  user-select: none;
}

.fold-toggle:hover {
  color: #F59E0B;
}

.fold-text {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.6);
}

.fold-arrow {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.4);
  margin-left: 4px;
  transition: transform 0.3s;
  display: inline-block;
}

.fold-arrow.up {
  transform: rotate(180deg);
}

.fold-content {
  padding: 8px 0 0;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.input-group {
  margin-bottom: 12px;
}

.input-field {
  width: 100%;
  height: 46px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 15px;
  color: #F1F5F9;
  outline: none;
  transition: border-color 0.2s;
}

.input-field::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.input-field:focus {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.04);
}

.code-group {
  display: flex;
  gap: 10px;
}

.code-group .input-field {
  flex: 1;
}

.code-btn {
  flex-shrink: 0;
  height: 46px;
  padding: 0 16px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  color: #F59E0B;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.code-btn:hover {
  background: rgba(245, 158, 11, 0.25);
}

.code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
  border: none;
  border-radius: 14px;
  color: #1E293B;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
  transition: transform 0.15s;
}

.login-btn:hover {
  transform: scale(1.02);
}

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

.form-tip {
  text-align: center;
  margin-top: 14px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tip-icon {
  font-size: 13px;
}

.footer-info {
  text-align: center;
  margin-top: 36px;
}

/* ===== 通知列表页 ===== */
.notif-container {
  width: 100%;
  max-width: 600px;
  min-height: 100vh;
  padding: 0;
}

.notif-header {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #1E293B 0%, #162032 100%);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
}

.notif-brand {
  font-size: 18px;
  font-weight: 700;
  color: #F59E0B;
}

.notif-phone {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.6);
  flex: 1;
}

.logout-btn {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
}

.notif-list {
  padding: 16px;
}

.notif-loading {
  text-align: center;
  padding: 60px 0;
  color: rgba(148, 163, 184, 0.5);
  font-size: 14px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(245, 158, 11, 0.2);
  border-top-color: #F59E0B;
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 通知卡片 */
.notif-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: background 0.2s;
}

.notif-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.notif-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.notif-type-icon {
  font-size: 20px;
}

.notif-type-label {
  font-size: 15px;
  font-weight: 600;
  color: #F1F5F9;
  flex: 1;
}

.notif-time {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.5);
}

.notif-summary {
  font-size: 14px;
  color: rgba(226, 232, 240, 0.7);
  line-height: 1.6;
}

.notif-status {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.4);
}

.notif-status.read {
  color: rgba(52, 211, 153, 0.5);
}

/* 通知类型配色 */
.notif-card[data-type="guardian"] .notif-type-label { color: #34D399; }
.notif-card[data-type="trust"] .notif-type-label { color: #60A5FA; }
.notif-card[data-type="greeting_card"] .notif-type-label { color: #F472B6; }
.notif-card[data-type="blessing"] .notif-type-label { color: #FBBF24; }
.notif-card[data-type="reminder"] .notif-type-label { color: #A78BFA; }
.notif-card[data-type="message"] .notif-type-label { color: #FB923C; }
.notif-card[data-type="membership"] .notif-type-label { color: #F59E0B; }
.notif-card[data-type="verify"] .notif-type-label { color: #94A3B8; }

/* 空状态 */
.notif-empty {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 16px;
  color: rgba(226, 232, 240, 0.6);
  margin-bottom: 8px;
}

.empty-hint {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.4);
}

.notif-footer {
  padding: 24px 20px;
  text-align: center;
}

.notif-disclaimer {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.4);
  margin-bottom: 4px;
  line-height: 1.6;
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
  .brand-name { font-size: 30px; }
  .main-container { padding: 32px 24px; }
  .qr-wrapper { width: 200px; height: 200px; }
  .notif-card { padding: 14px 16px; }
}
