/* ============================================================
   去哪玩 - 清新亲子风 主样式
   色彩: 浅蓝#4FC3F7 浅绿#81C784 红#E53935 背景#F5F7FA
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #F5F7FA;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: #4FC3F7; text-decoration: none; }

input, textarea, button, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* --- Disclaimer Bar (红色免责声明悬浮条) --- */
.disclaimer-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #E53935;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 16px;
  text-align: center;
}

/* --- Disclaimer Card (卡片底部灰色小字) --- */
.disclaimer-card {
  font-size: 11px;
  color: #999;
  line-height: 1.4;
  padding: 8px 0 0;
  border-top: 1px solid #F0F0F0;
  margin-top: 10px;
}

/* --- Top Bar --- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.top-bar .title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.top-bar .actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.top-bar .actions a,
.top-bar .actions button {
  font-size: 14px;
  color: #4FC3F7;
  background: none;
  cursor: pointer;
}

/* --- Has Disclaimer: adjust top-bar sticky position --- */
.has-disclaimer .top-bar {
  position: relative;
  top: auto;
}

/* --- Page Container --- */
.page-container {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 80px;
}

/* --- Card --- */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin: 12px 16px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.15s;
}

.card:active {
  transform: scale(0.98);
}

.card .location {
  font-size: 17px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.card .meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card .desc {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #999;
}

.card .footer .author {
  color: #666;
}

.card .footer .encounter-info {
  color: #4FC3F7;
  font-weight: 500;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}

.btn:active { opacity: 0.8; }

.btn-primary {
  background: linear-gradient(135deg, #4FC3F7, #29B6F6);
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, #81C784, #66BB6A);
  color: #fff;
}

.btn-encounter {
  background: linear-gradient(135deg, #4FC3F7, #29B6F6);
  color: #fff;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: 24px;
  gap: 6px;
}

.btn-encounter.active {
  background: #E0E0E0;
  color: #999;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-outline {
  background: transparent;
  border: 1px solid #4FC3F7;
  color: #4FC3F7;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
}

/* --- Form --- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  background: #F5F7FA;
  border: 1px solid #E8E8E8;
  border-radius: 10px;
  transition: border-color 0.2s;
  color: #333;
}

.form-input:focus {
  border-color: #4FC3F7;
  background: #fff;
}

.form-input::placeholder {
  color: #bbb;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

/* --- Checkbox --- */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #666;
  margin: 16px 0;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #4FC3F7;
  flex-shrink: 0;
}

/* --- Login Page --- */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(180deg, #E3F2FD 0%, #F5F7FA 50%);
}

.login-logo {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.login-logo h1 {
  font-size: 28px;
  font-weight: 700;
  color: #333;
}

.login-logo .subtitle {
  font-size: 14px;
  color: #999;
  margin-top: 4px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.login-card .form-group {
  margin-bottom: 18px;
}

.login-card .form-input {
  padding: 14px;
  border-radius: 12px;
}

.login-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: #999;
}

.login-switch a {
  color: #4FC3F7;
  font-weight: 500;
}

/* --- Detail Page --- */
.detail-header {
  background: #fff;
  padding: 20px 16px;
  margin-bottom: 12px;
}

.detail-header .location {
  font-size: 22px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.detail-header .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
}

.detail-header .author {
  font-size: 13px;
  color: #999;
}

.detail-body {
  background: #fff;
  padding: 16px;
  margin: 0 16px 12px;
  border-radius: 12px;
}

.detail-body .description {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  white-space: pre-wrap;
}

.encounter-section {
  margin: 0 16px 12px;
}

.encounter-section .section-title {
  font-size: 14px;
  font-weight: 500;
  color: #999;
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.encounter-section .section-title::before,
.encounter-section .section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E8E8E8;
}

.encounter-item {
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.encounter-item .name {
  color: #333;
  font-weight: 500;
}

.encounter-item .time {
  color: #bbb;
  font-size: 12px;
}

/* --- Fixed Bottom --- */
.fixed-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px 16px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  z-index: 80;
}

.fixed-bottom .inner {
  max-width: 480px;
  margin: 0 auto;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: #bbb;
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state .text {
  font-size: 15px;
}

/* --- Loading --- */
.loading {
  text-align: center;
  padding: 20px;
  color: #bbb;
  font-size: 14px;
}

/* --- Toast --- */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* --- Load More --- */
.load-more {
  text-align: center;
  padding: 16px;
}

.load-more a {
  font-size: 14px;
  color: #4FC3F7;
}

/* --- Back Link --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #666;
}

/* --- Utility --- */
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.text-center { text-align: center; }
.text-muted { color: #999; }
.text-sm { font-size: 13px; }
