/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #f5f6fa;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ===== 登录/注册页 ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.auth-logo {
  text-align: center;
  margin-bottom: 30px;
}
.auth-logo svg {
  width: 56px;
  height: 56px;
  stroke: #667eea;
}
.auth-logo h1 {
  font-size: 24px;
  margin-top: 12px;
  color: #1a1a2e;
}
.auth-logo p {
  font-size: 13px;
  color: #999;
  margin-top: 4px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
  font-weight: 500;
}
.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: #667eea;
}
.btn-primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: opacity 0.2s;
}
.btn-primary:active { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: #999;
}
.auth-footer a {
  color: #667eea;
  font-weight: 500;
}
.auth-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.auth-error.show { display: block; }

/* ===== 相机页顶部导航 ===== */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-header .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.app-header .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: #fff;
}
.app-header .username { font-size: 14px; font-weight: 500; }
.app-header .nav-links { display: flex; gap: 8px; }
.app-header .nav-link {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.1);
  border: none;
  transition: all 0.2s;
}
.app-header .nav-link.active,
.app-header .nav-link:hover {
  background: #ffd60a;
  color: #000;
}

/* ===== 我的照片页 ===== */
.photos-page {
  padding-top: 70px;
  padding-bottom: 30px;
  min-height: 100vh;
}
.photos-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.photos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.photos-header h2 { font-size: 20px; color: #1a1a2e; }
.photos-stats { font-size: 13px; color: #999; }
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.photo-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}
.photo-card:hover { transform: translateY(-2px); }
.photo-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.photo-info { padding: 12px; }
.photo-info .addr {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.photo-info .meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #999;
}
.photo-actions {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}
.photo-actions button {
  flex: 1;
  padding: 6px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #666;
  transition: all 0.2s;
}
.photo-actions .btn-del:hover {
  border-color: #f87171;
  color: #f87171;
}
.photo-actions .btn-dl:hover {
  border-color: #667eea;
  color: #667eea;
}
.empty-photos {
  text-align: center;
  padding: 80px 20px;
  color: #999;
}
.empty-photos svg {
  width: 80px; height: 80px;
  stroke: #ddd;
  margin-bottom: 16px;
}
.empty-photos p { font-size: 15px; }
.empty-photos a {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: #667eea;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}
.pagination button {
  padding: 8px 14px;
  border: 1px solid #e0e0e0;
  background: #fff;
  border-radius: 6px;
  font-size: 13px;
  color: #666;
}
.pagination button.active {
  background: #667eea;
  color: #fff;
  border-color: #667eea;
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(30,30,30,0.95);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: rgba(34,197,94,0.95); }
.toast.error { background: rgba(239,68,68,0.95); }
