/* ========================================
   404 Has Found — Feature Styles
   功能模块: Camera, Detail, Market, Profile
   ======================================== */

/* ---------- Camera / Publish ---------- */
.publish-steps {
  display: flex; justify-content: center; gap: 12px; align-items: center;
  margin-bottom: 20px;
}
.pub-step {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted); font-weight: 600;
}
.pub-step.active { color: var(--primary); }
.pub-step.done { color: var(--green); }
.pub-step-dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
  background: var(--border);
  transition: all var(--transition);
}
.pub-step.active .pub-step-dot { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(232,115,74,0.3); }
.pub-step.done .pub-step-dot { background: var(--green); color: #fff; }

.camera-zone {
  position: relative;
  background: var(--card); border: 2.5px dashed var(--border);
  border-radius: var(--radius-lg); padding: 48px 24px;
  text-align: center; cursor: pointer; transition: all var(--transition);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.camera-zone:active { border-color: var(--primary); background: var(--primary-light); }
.camera-frame svg { color: var(--text-muted); margin-bottom: 12px; }
.camera-hint { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.camera-sub { font-size: 13px; color: var(--text-secondary); }

/* 拍照按钮样式 */
.capture-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 4px solid var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 10;
}
.capture-btn:hover {
  transform: translateX(-50%) scale(1.1);
  background: rgba(255, 255, 255, 1);
}
.capture-btn:active {
  transform: translateX(-50%) scale(0.95);
}

/* 退出摄像头按钮样式 */
.exit-camera-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 20;
}
.exit-camera-btn:hover {
  background: rgba(239, 68, 68, 0.9);
  transform: scale(1.1) rotate(90deg);
}
.exit-camera-btn svg {
  stroke: white;
  stroke-width: 2.5;
}

/* 照片栏样式 */
.photo-gallery {
  margin-top: 20px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-light);
}
.photo-gallery-header {
  margin-bottom: 12px;
}
.photo-gallery-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}
.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: all var(--transition);
}
.photo-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232, 115, 74, 0.15);
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 5;
}
.photo-delete:hover {
  background: rgba(239, 68, 68, 0.9);
  transform: scale(1.1);
}
.photo-delete svg {
  width: 16px;
  height: 16px;
  stroke: white;
  stroke-width: 2.5;
}

.ai-badge {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  margin-top: 14px; padding: 12px 18px;
  background: var(--green-light); border-radius: var(--radius);
  font-size: 13px; color: #065F46; font-weight: 600;
  border: 1px solid rgba(16,185,129,0.2);
  animation: fadeSlideIn 0.4s ease;
}
.ai-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  animation: pulseGlow 1.5s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}

.pub-form { margin-top: 20px; }
.input-group { margin-bottom: 14px; }
.input-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.input-field {
  width: 100%; padding: 12px 14px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); font-size: 15px; color: var(--text);
  outline: none; background: var(--card); transition: all var(--transition);
  box-shadow: var(--shadow-inner);
}
.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(232,115,74,0.06);
}
.input-row { display: flex; gap: 12px; }
.input-wrap { position: relative; display: flex; align-items: center; }

.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.mode-card {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-align: center; cursor: pointer;
  transition: all var(--transition); background: var(--card);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 3px 0 rgba(240,228,224,0.3);
}
.mode-card.selected {
  border-color: var(--primary); background: var(--primary-light);
  box-shadow: 0 4px 16px rgba(232,115,74,0.2);
}
.mode-card:active { transform: scale(0.97); }
.mode-card-icon { color: var(--text-secondary); transition: color var(--transition); }
.mode-card.selected .mode-card-icon { color: var(--primary); }
.mode-card-title { font-size: 14px; font-weight: 700; }
.mode-card-desc { font-size: 11px; color: var(--text-secondary); }

.pub-actions { margin-top: 24px; }
.btn-primary-full {
  width: 100%; padding: 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary-500));
  color: #fff; font-size: 16px;
  font-weight: 700; letter-spacing: 0.2px;
  box-shadow: var(--shadow-clay);
  transition: all var(--transition); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none;
}
.btn-primary-full:active {
  background: linear-gradient(135deg, var(--primary-600), var(--primary));
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(200,90,50,0.15), 0 4px 12px rgba(232,115,74,0.12);
}
.btn-primary-full:disabled { opacity: 0.5; pointer-events: none; }

/* ---------- Detail ---------- */
.detail-content { padding: 0; }
.detail-image {
  width: 100%; height: 240px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-light), #FFF5F3);
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; margin-bottom: 16px; overflow: hidden;
  border: 2px solid var(--border-light);
}
.detail-image img { width: 100%; height: 100%; object-fit: cover; }
.detail-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.detail-title { font-family: 'ZCOOL KuaiLe', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.detail-reward {
  background: var(--amber-light); color: #92400E; padding: 4px 14px;
  border-radius: 50px; font-size: 13px; font-weight: 700;
}
.detail-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 16px 0;
}
.detail-meta-item {
  background: #FFF8F5; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.detail-meta-label { font-size: 11px; color: var(--text-secondary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.detail-meta-value { font-size: 14px; font-weight: 700; margin-top: 2px; }

/* Status Timeline */
.status-timeline {
  display: flex; align-items: flex-start; overflow-x: auto;
  margin: 16px 0; padding: 8px 0; gap: 0;
}
.tl-item {
  display: flex; flex-direction: column; align-items: center;
  min-width: 70px; text-align: center; gap: 8px;
}
.tl-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--border); border: 3px solid var(--bg);
  transition: all var(--transition);
}
.tl-dot.active { background: var(--primary); box-shadow: 0 0 0 5px rgba(232,115,74,0.12); }
.tl-dot.done { background: var(--green); box-shadow: 0 0 0 5px rgba(16,185,129,0.1); }
.tl-line { height: 2px; flex: 1; min-width: 24px; background: var(--border); margin-top: 6px; }
.tl-line.done { background: var(--green); }
.tl-label { font-size: 10px; color: var(--text-secondary); font-weight: 600; }
.tl-item:last-child .tl-line { display: none; }

.detail-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.detail-btns .btn-primary-full { font-size: 15px; padding: 14px; }
.btn-outline-full {
  width: 100%; padding: 14px; border-radius: var(--radius);
  background: var(--card); color: var(--primary); font-size: 15px;
  font-weight: 700; border: 2px solid var(--primary);
  transition: all var(--transition); cursor: pointer;
  box-shadow: 0 3px 0 rgba(232,115,74,0.1);
}
.btn-outline-full:active {
  background: var(--primary-light);
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(232,115,74,0.1);
}

/* ---------- Market Grid ---------- */
.market-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.market-card {
  background: var(--card); border: 2px solid var(--border-light);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition); cursor: pointer;
  box-shadow: 0 3px 0 rgba(240,228,224,0.4);
}
.market-card:active {
  border-color: var(--primary-400);
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(240,228,224,0.4);
}
.market-card-img {
  height: 140px; background: linear-gradient(135deg, #FFF8F5, var(--bg));
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; overflow: hidden;
}
.market-card-img img { width: 100%; height: 100%; object-fit: cover; }
.market-card-body { padding: 12px; }
.market-price { font-family: 'ZCOOL KuaiLe', sans-serif; font-size: 18px; font-weight: 700; color: var(--cta); }
.market-meta { font-size: 12px; color: var(--text-secondary); margin: 4px 0; display: flex; align-items: center; gap: 6px; }

/* ---------- Profile ---------- */
.profile-hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, #FFE8E0 100%);
  border-radius: var(--radius-xl); padding: 28px 20px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 12px;
  border: 2px solid rgba(232,115,74,0.08);
  position: relative; overflow: hidden;
}
.profile-hero::after {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(232,115,74,0.05); pointer-events: none;
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--cta));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(232,115,74,0.35);
  cursor: pointer; transition: transform 0.3s ease;
}
.profile-avatar:hover {
  animation: avatarSpin 0.5s ease-in-out;
}
.profile-name { font-family: 'ZCOOL KuaiLe', sans-serif; font-size: 20px; font-weight: 700; }
.profile-badge {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  color: #92400E; font-size: 12px; font-weight: 700; padding: 4px 14px;
  border-radius: 50px; border: 1px solid #FCD34D;
}
.profile-score { margin-top: 4px; }
.score-num { font-family: 'Caveat', 'ZCOOL KuaiLe', cursive; font-size: 40px; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.score-unit { font-size: 14px; color: var(--text-secondary); font-weight: 600; margin-left: 4px; }

/* Medal Scroll */
.medal-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.medal-scroll::-webkit-scrollbar { display: none; }
.medal-item {
  min-width: 90px; padding: 16px 12px; border-radius: var(--radius);
  text-align: center; flex-shrink: 0;
  background: var(--card); border: 2px solid var(--border-light);
  transition: all var(--transition); cursor: pointer;
}
.medal-item.earned {
  border-color: rgba(245,158,11,0.2);
  background: linear-gradient(135deg, #FFFDF7, #FFFBEB);
}
.medal-item.locked { opacity: 0.4; }
.medal-item-icon { font-size: 32px; margin-bottom: 6px; display: block; }
.medal-item-name { font-size: 13px; font-weight: 700; }
.medal-item-desc { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* Timeline Log */
.timeline-log { display: flex; flex-direction: column; gap: 0; }
.log-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.log-dot {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}
.log-dot.plus { background: var(--green-light); color: var(--green); }
.log-dot.minus { background: var(--rose-light); color: var(--rose); }
.log-info { flex: 1; min-width: 0; }
.log-title { font-size: 14px; font-weight: 700; }
.log-time { font-size: 12px; color: var(--text-secondary); }
.log-pts { font-family: 'ZCOOL KuaiLe', sans-serif; font-size: 16px; font-weight: 700; }
.log-pts.plus { color: var(--green); }
.log-pts.minus { color: var(--rose); }

/* Exchange Card */
.exchange-card {
  background: var(--card); border: 2px solid var(--border-light);
  border-radius: var(--radius); padding: 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; box-shadow: 0 3px 0 rgba(240,228,224,0.4);
}
.exchange-title { font-size: 16px; font-weight: 700; }
.exchange-desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.btn-sm-primary {
  padding: 10px 22px; border-radius: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-500));
  color: #fff; font-size: 14px;
  font-weight: 700; box-shadow: 0 4px 12px rgba(232,115,74,0.25);
  transition: all var(--transition); white-space: nowrap; cursor: pointer; border: none;
}
.btn-sm-primary:active {
  background: var(--primary-600);
  transform: scale(0.96);
}

/* =============================================
   PROFILE — 个人中心 (Extended)
   ============================================= */
.profile-screen { padding: 0; }
.profile-hero-card {
  margin: 16px; background: linear-gradient(135deg, #FFF0EB 0%, #FFE8E0 35%, #FFFDF5 70%);
  border-radius: var(--radius-xl); padding: 28px 20px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  border: 2px solid rgba(232,115,74,0.06); position: relative; overflow: hidden;
}
.profile-hero-card::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(232,115,74,0.06) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}

.profile-menu-list {
  margin: 0 16px; background: var(--card); border-radius: var(--radius);
  border: 2px solid var(--border-light); overflow: hidden;
  box-shadow: 0 3px 0 rgba(240,228,224,0.4);
}
.profile-menu-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  transition: all var(--transition); cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:active { background: #FFF8F5; }
.profile-menu-item span:first-of-type { flex: 1; font-size: 14px; font-weight: 650; }
.pm-icon-sm { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pm-badge-sm {
  background: var(--primary-light); color: var(--primary);
  font-size: 11px; font-weight: 700; padding: 2px 9px;
  border-radius: 50px; flex: none !important;
}

/* ---------- Secondary button style ---------- */
.btn-outline-full {
  box-shadow: 0 3px 0 rgba(232,115,74,0.08);
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Larger screens (tablet+) ---------- */
@media (min-width: 768px) {
  .app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .screen { padding: 24px; }
  .market-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-404-glitch .glitch-digit { font-size: 100px; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .login-card, .register-card { max-width: 380px; margin: 0 auto; }
}

/* =============================================
   SETTINGS — 设置页面
   ============================================= */

/* Settings gear button on profile hero */
.settings-gear-btn {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  backdrop-filter: blur(6px);
}
.settings-gear-btn:hover { color: var(--primary); border-color: var(--primary-400); }
.settings-gear-btn:active { transform: scale(0.9) rotate(60deg); }

/* Settings menu list */
.settings-menu-list {
  margin: 0; background: var(--card); border-radius: var(--radius);
  border: 2px solid var(--border-light); overflow: hidden;
  box-shadow: 0 3px 0 rgba(240,228,224,0.4);
}
.settings-menu-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  transition: all var(--transition); cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}
.settings-menu-item:last-child { border-bottom: none; }
.settings-menu-item:active { background: #FFF8F5; }
.settings-menu-item.disabled {
  cursor: not-allowed; opacity: 0.55;
}
.settings-menu-item.disabled:active { background: transparent; }
.settings-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.settings-label {
  flex: 1; font-size: 15px; font-weight: 650; color: var(--text);
}
.settings-desc {
  font-size: 12px; color: var(--text-muted); margin-right: 4px;
  display: none; /* hidden on mobile, show on wider */
}
.settings-coming {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
  background: #F5F0ED; padding: 3px 10px; border-radius: 50px;
  white-space: nowrap;
}

/* Feedback Form Card */
.feedback-form-card {
  margin-top: 20px; padding: 20px;
  background: var(--card); border-radius: var(--radius);
  border: 2px solid var(--border-light); box-shadow: 0 3px 0 rgba(240,228,224,0.4);
  animation: fadeSlideIn 0.35s ease;
}
.feedback-form-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.feedback-form-header h3 {
  font-family: 'ZCOOL KuaiLe', sans-serif;
  font-size: 18px; font-weight: 700; margin: 0;
}
.feedback-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all var(--transition);
}
.feedback-close-btn:hover { background: var(--rose-light); color: var(--rose); }

/* Feedback type selector */
.fb-type-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 18px;
}
.fb-type-btn {
  padding: 10px 8px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 650; text-align: center;
  background: var(--bg); color: var(--text-secondary);
  border: 2px solid var(--border); cursor: pointer;
  transition: all var(--transition);
}
.fb-type-btn.active {
  background: var(--primary-light); color: var(--primary);
  border-color: var(--primary-400);
}
.fb-type-btn:active { transform: scale(0.96); }

/* AI识别按钮脉冲动画 */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
