/* ═══════════════════════════════════════════
   威你而来 · 青春夏日主题 CSS
   面向年轻人 - 手机优先设计
   ═══════════════════════════════════════════ */

:root {
  /* 夏天配色 */
  --sunshine: #FFE66D;
  --sunshine-dark: #FFD166;
  --ocean-light: #72DDFF;
  --ocean: #06D6A0;
  --ocean-dark: #118AB2;
  --sand: #FFCB69;
  --coral: #FF6B6B;
  --sky: #A8E6CF;
  
  /* 中性色 */
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #868E96;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;
  
  /* 阴影 */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.15);
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   手机优先 - 基础布局
   ============================================ */

.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 960px;
  }
}

/* ============================================
   Hero Section - 震撼海景大图
   ============================================ */

.youth-hero {
  position: relative;
  height: 45vh;
  min-height: 320px;
  background: linear-gradient(180deg, 
    #87CEEB 0%, 
    #98D8E8 30%, 
    #B8E8F0 60%, 
    #E8F8FF 100%);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=800&q=80') center/cover;
  opacity: 0.9;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(0,0,0,0.1) 0%, 
    rgba(0,0,0,0.2) 40%, 
    rgba(0,0,0,0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 40px;
  color: white;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  width: fit-content;
}

.hero-title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 12px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 16px;
  opacity: 0.95;
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stat {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 10px 16px;
  border-radius: 12px;
  text-align: center;
}

.hero-stat-num {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.hero-stat-label {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 4px;
}

/* ============================================
   浮动导航栏
   ============================================ */

.youth-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 448px;
}

@media (min-width: 768px) {
  .youth-nav {
    max-width: 680px;
  }
}

.nav-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  color: var(--ocean-dark);
}

.nav-logo {
  font-size: 24px;
}

.nav-upload-btn {
  background: linear-gradient(135deg, var(--sunshine), var(--sunshine-dark));
  color: var(--gray-900);
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255,210,102,0.4);
}

.nav-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255,210,102,0.5);
}

/* ============================================
   Section 通用样式
   ============================================ */

.section {
  padding: 32px 0;
}

.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-desc {
  font-size: 14px;
  color: var(--gray-600);
}

/* ============================================
   景点入口 - 精致小标签设计
   ============================================ */

.spots-section {
  background: var(--white);
  border-radius: 24px 24px 0 0;
  margin-top: -24px;
  position: relative;
  z-index: 30;
}

.spots-section .section-header {
  margin-bottom: 32px;
  text-align: center;
}

.spots-section .section-title {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 4px;
  color: var(--gray-900);
  margin-bottom: 12px;
  justify-content: center;
}

.spots-section .section-desc {
  font-size: 13px;
  color: var(--gray-500);
  letter-spacing: 1px;
}

.spots-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 8px 0;
}

.spot-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.spot-tag:hover {
  transform: translateY(-2px);
  border-color: var(--gray-400);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.spot-tag:active {
  transform: translateY(0);
}

.spot-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-600);
  letter-spacing: 0.5px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.spot-tag:hover .spot-number {
  background: linear-gradient(135deg, var(--ocean-light), var(--ocean));
  color: white;
}

.spot-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  letter-spacing: 0.5px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.spot-tag:hover .spot-name {
  color: var(--gray-900);
  font-weight: 600;
}

.spot-count {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 400;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid var(--gray-200);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.spot-tag:hover .spot-count {
  color: var(--gray-500);
  border-left-color: var(--gray-300);
}

@media (min-width: 768px) {
  .spots-container {
    gap: 12px;
  }
  
  .spot-tag {
    padding: 16px 24px;
    gap: 12px;
  }
  
  .spot-number {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .spot-name {
    font-size: 15px;
  }
}

/* ============================================
   精选照片流 - 2列竖屏网格
   ============================================ */

.gallery-section {
  background: var(--gray-50);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.photo-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  background: var(--gray-200);
}

.photo-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.photo-item::before {
  content: '';
  display: block;
  padding-top: 125%;
}

.photo-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
  opacity: 1;
}

.photo-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.photo-category {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.2);
  padding: 4px 8px;
  border-radius: 50px;
}

.photo-votes {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
}

/* ============================================
   底部 Tab Bar
   ============================================ */

.bottom-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--gray-200);
  padding: 8px 0 calc(12px + env(safe-area-inset-bottom));
  z-index: 200;
  -webkit-tap-highlight-color: transparent;
}

.tabbar-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
}

.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--gray-500);
  text-decoration: none;
}

.tabbar-item.active {
  color: var(--ocean-dark);
  background: var(--gray-100);
}

.tabbar-icon {
  font-size: 22px;
}

.tabbar-label {
  font-size: 11px;
  font-weight: 600;
}

.tabbar-upload {
  position: relative;
  top: -24px;
}

.tabbar-upload .tabbar-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--coral), #FF8E8E);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 24px rgba(255,107,107,0.4);
  color: white;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================
   页面底部占位
   ============================================ */

.page-bottom-spacer {
  height: 100px;
}

/* ============================================
   Modal 样式
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

@media (min-width: 768px) {
  .modal {
    border-radius: 24px;
    max-width: 540px;
    margin: auto;
    max-height: 85vh;
  }
}

.modal-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
}

.modal-body {
  padding: 20px;
}

/* ============================================
   表单样式
   ============================================ */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.form-select,
.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 16px;
  background: var(--white);
  color: var(--gray-800);
  transition: all 0.3s ease;
}

.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: 0 0 0 4px rgba(6,214,160,0.1);
}

/* ============================================
   上传区域
   ============================================ */

.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--gray-50);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.upload-zone:hover {
  border-color: var(--ocean);
  background: var(--gray-100);
}

.upload-zone-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.upload-zone-text {
  font-size: 15px;
  color: var(--gray-700);
  font-weight: 600;
  margin-bottom: 4px;
}

.upload-zone-hint {
  font-size: 13px;
  color: var(--gray-500);
}

.upload-preview {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  display: none;
}

.upload-preview.active {
  display: block;
}

.upload-preview img {
  width: 100%;
  display: block;
}

/* ============================================
   按钮样式
   ============================================ */

.btn {
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ocean), var(--ocean-dark));
  color: white;
  box-shadow: 0 6px 20px rgba(17,138,178,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(17,138,178,0.45);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 17px;
}

/* ============================================
   照片详情页 Modal
   ============================================ */

.photo-preview-modal .modal {
  border-radius: 0;
  max-width: 100%;
  height: 100vh;
  background: var(--gray-900);
}

.photo-preview-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.photo-preview-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
}

.photo-preview-back {
  color: white;
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.photo-preview-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.photo-preview-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.photo-preview-info {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  padding: 20px;
  color: white;
}

.photo-preview-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.photo-preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.photo-preview-author {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.vote-btn:hover {
  background: rgba(255,255,255,0.25);
}

.vote-btn.voted {
  background: var(--coral);
}

.vote-btn .vote-icon {
  font-size: 20px;
}

/* ============================================
   景点照片页
   ============================================ */

.spot-page {
  min-height: 100vh;
  background: var(--gray-50);
}

.spot-page-header {
  position: relative;
  height: 300px;
  background: linear-gradient(135deg, var(--ocean-light), var(--ocean-dark));
  overflow: hidden;
}

.spot-page-back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spot-page-content {
  position: relative;
  margin-top: -32px;
  border-radius: 32px 32px 0 0;
  background: var(--gray-50);
  padding-top: 24px;
  min-height: calc(100vh - 268px);
}

.spot-page-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.spot-page-desc {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 24px;
}

.spot-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .spot-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .spot-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   Toast 提示
   ============================================ */

.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  width: calc(100% - 32px);
  max-width: 400px;
}

.toast {
  background: var(--gray-900);
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

.toast.success {
  background: linear-gradient(135deg, var(--ocean), var(--ocean-dark));
}

.toast.error {
  background: var(--coral);
}

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

/* ============================================
   加载状态
   ============================================ */

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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