* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}
.container { max-width: 480px; margin: 0 auto; padding: 16px; }
.header {
  text-align: center;
  color: white;
  padding: 10px 0;
}
.header h1 { font-size: 24px; margin-bottom: 8px; }
.header p { opacity: 0.9; font-size: 14px; }
.map-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.map-container {
  height: 478px;
  width: 100%;
  position: relative;
}
#map { width: 100%; height: 100%; }
.locate-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.locate-btn svg { width: 20px; height: 20px; color: #667eea; }

/* 分类筛选按钮 */
.category-filter {
  position: absolute;
  right: 12px;
  top: 10px;
  display: flex;
  flex-direction: row;
  gap: 6px;
  z-index: 1000;
}
.category-btn {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.95);
  border: none;
  border-radius: 20px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.2s;
  white-space: nowrap;
  max-width: 80px;
  justify-content: center;
  pointer-events: auto;
  position: relative;
  z-index: 1001;
}
.category-btn:active {
  transform: scale(0.95);
}
.category-btn.active {
  background: #667eea;
  color: white;
}
/* 小区搜索栏 */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 12px;
  padding: 10px 14px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333;
  background: transparent;
}
.search-bar input::placeholder { color: #bbb; }
.search-bar #clearSearchBtn {
  background: #f0f0f0;
  border: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 11px;
  color: #999;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ========== 小区列表（新版）========== */
.point-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 4px;
}
@media (max-width: 360px) {
  .point-list { grid-template-columns: 1fr; }
}

.point-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.point-card:active { transform: scale(0.97); }
.point-card:hover { box-shadow: 0 6px 24px rgba(102,126,234,0.15); }

/* 有新消息：渐变边框 + 阴影 */
.point-card.has-new {
  border: 1.5px solid transparent;
  background:
    linear-gradient(white,white) padding-box,
    linear-gradient(135deg,#667eea,#764ba2) border-box;
  box-shadow: 0 4px 16px rgba(102,126,234,0.18);
  animation: newCardPulse 3s ease-in-out infinite;
}
@keyframes newCardPulse {
  0%,100% { box-shadow: 0 4px 16px rgba(102,126,234,0.18); }
  50% { box-shadow: 0 4px 24px rgba(102,126,234,0.35); }
}
.point-card.read {
  border: 1px solid #f0f0f0;
}

/* 封面图区域 */
.point-img-wrap {
  position: relative;
  width: 100%;
  height: 110px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8ecf4 0%, #d4dce8 100%);
}
.point-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.point-card:active .point-image { transform: scale(1.05); }

/* 新消息红点角标 */
.point-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  z-index: 2;
  animation: dotBlink 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(239,68,68,0.25);
}
@keyframes dotBlink {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* 图片底部遮罩 + 分类标签 */
.point-img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(transparent, rgba(0,0,0,0.45));
  display: flex;
  align-items: flex-end;
  padding: 0 8px 6px;
}
.point-cat-tag {
  font-size: 10px;
  color: white;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 标题行：名称 + 新消息标签 */
.point-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}
.point-name {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.has-new .point-name {
  background: linear-gradient(135deg,#667eea,#764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.point-desc {
  margin: 0 0 8px 0;
  font-size: 11.5px;
  color: #888;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 卡片文字区域 */
.point-body {
  padding: 10px 12px 12px;
}
.point-status {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}
.point-status.new-msg {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #dc2626;
  border: 1px solid #fecaca;
}
.point-status.read {
  display: none;
}
.checkin-time {
  margin-top: 8px;
  font-size: 12px;
  color: #22c55e;
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.active { display: flex; }
.modal-content {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px 20px;
  text-align: center;
  color: white;
}
.modal-header-banner h1 { margin: 0; font-size: 22px; }
.modal-header-banner p { margin: 6px 0 0; font-size: 13px; opacity: 0.9; }
.modal-body {
  padding: 20px;
  max-height: calc(90vh - 100px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.modal-desc { font-size: 14px; color: #666; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 12px; }
.btn {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}
.btn-primary:active { opacity: 0.9; }
.btn-secondary {
  background: #f0f0f0;
  color: #333;
}
.btn-secondary:active { background: #e0e0e0; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.upload-section { 
  margin-bottom: 12px; 
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  flex: 1;
}
.upload-tips {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 80px;
}
.tip-item {
  font-size: 11px;
  color: #666;
  padding: 4px 6px;
  background: #f8f9fa;
  border-radius: 4px;
  text-align: center;
  line-height: 1.2;
}
.upload-add {
  aspect-ratio: 1;
  border: 2px dashed #ddd;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  gap: 2px;
}
.upload-add svg {
  width: 24px;
  height: 24px;
}
.upload-label {
  font-size: 12px;
  color: #666;
}
.upload-add span {
  font-size: 11px;
}
.upload-text {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}
.upload-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.upload-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.note-section { position: relative; margin-bottom: 12px; }
.char-count {
  text-align: right;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
.note-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 14px;
  resize: none;
  margin-bottom: 12px;
}
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 新消息标记 - 红色光晕动画 */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

.marker-pulse-red {
  animation: pulse-glow 1.8s ease-in-out infinite;
}

/* 公开/私密开关样式 */
.switch {
  position: relative; display: inline-block; width: 36px; height: 20px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc; transition: 0.3s; border-radius: 20px;
}
.switch .slider:before {
  position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px;
  background-color: white; transition: 0.3s; border-radius: 50%;
}
.switch input:checked + .slider { background-color: #22c55e; }
.switch input:checked + .slider:before { transform: translateX(16px); }

/* 底部备案信息 */
.site-footer {
  text-align: center;
  padding: 20px 0 30px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}
.site-footer .footer-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer .footer-link:hover {
  color: white;
}
.site-footer .footer-sep {
  margin: 0 8px;
}

/* 联系我们弹窗 */
.modal-overlay {
  display: none; position: fixed; top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.5); z-index: 9999; justify-content: center; align-items: center;
}
.modal-overlay.active { display: flex; }
.modal-content { background: white; border-radius: 16px; padding: 28px; width: 85%; max-width: 320px; }
.modal-close { float:right; font-size:24px; line-height:1; border:none; background:none; cursor:pointer; color:#999; padding:0 4px; }
