/* 海角社区 全站样式 */
:root {
  --brand-blue: #1677EE;
  --bright-blue: #3395FF;
  --deep-blue: #075FC6;
  --dark-blue: #08488D;
  --navy: #0A315E;
  --footer-bg: #071D37;
  --white: #FFFFFF;
  --light-bg: #F7FAFF;
  --soft-blue: #EDF5FF;
  --pale-blue: #E5F1FF;
  --title: #16243A;
  --body: #3C485A;
  --secondary: #6B7787;
  --muted: #929BA8;
  --light-text: #DCEEFF;
  --border: rgba(22,119,238,0.12);
  --shadow: 0 12px 34px rgba(30,72,120,0.08);
  --brand-shadow: 0 14px 40px rgba(22,119,238,0.14);
  --max-width: 1320px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--deep-blue); }
a:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(30,72,120,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--title);
  letter-spacing: 0.5px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desktop-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--body);
  border-radius: 8px;
  position: relative;
}

.desktop-nav a:hover {
  color: var(--brand-blue);
  background: var(--soft-blue);
}

.desktop-nav a.active {
  color: var(--brand-blue);
  background: var(--pale-blue);
  font-weight: 600;
}

.desktop-nav a.active::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: var(--brand-blue);
  border-radius: 50%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions a,
.header-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--body);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.header-actions a:hover,
.header-actions button:hover {
  background: var(--soft-blue);
  color: var(--brand-blue);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--white) !important;
  background: linear-gradient(135deg, #3998FF 0%, #1677EE 55%, #075FC6 100%);
  border: none;
  border-radius: 10px;
  box-shadow: var(--brand-shadow);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 44px rgba(22,119,238,0.22);
  color: var(--white) !important;
}

/* Mobile header */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 16px;
  background: var(--white);
}

.mobile-header .brand img { height: 30px; }
.mobile-header .brand-name { font-size: 16px; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--title);
  font-size: 20px;
}

/* ===== Mega Menu ===== */
.mega-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,29,55,0.45);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}

.mega-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mega-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(920px, 100%);
  height: 100%;
  background: var(--white);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
}

.mega-menu.open {
  transform: translateX(0);
}

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

.mega-close {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--soft-blue);
  border-radius: 10px;
  font-size: 22px;
  cursor: pointer;
  color: var(--title);
}

.mega-body {
  padding: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.mega-group h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-blue);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.mega-group a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  color: var(--body);
  min-height: 44px;
  line-height: 24px;
}

.mega-group a:hover {
  color: var(--brand-blue);
}

/* ===== Search Panel ===== */
.search-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  z-index: 1300;
  padding: 20px 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  transform: translateY(-100%);
  transition: transform 0.25s;
  visibility: hidden;
  pointer-events: none;
}

.search-panel.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.search-form {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
}

.search-form input {
  flex: 1;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  color: var(--title);
  background: var(--light-bg);
}

.search-form input:focus {
  outline: none;
  border-color: var(--brand-blue);
}

/* ===== Mobile Bottom Nav ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 900;
  justify-content: space-around;
  align-items: center;
}

.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 48px;
  font-size: 11px;
  color: var(--secondary);
  gap: 2px;
}

.mobile-bottom-nav a.active {
  color: var(--brand-blue);
  font-weight: 600;
}

.mobile-bottom-nav span {
  font-size: 18px;
  line-height: 1;
}

/* ===== Hero Banner ===== */
.hero-banner {
  position: relative;
  width: 100%;
  max-height: 520px;
  aspect-ratio: 16 / 7;
  background: linear-gradient(135deg, #E5F1FF 0%, #EDF5FF 40%, #F7FAFF 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(to bottom, rgba(10,49,94,0.25) 0%, rgba(7,29,55,0.55) 100%);
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.hero-content p {
  font-size: 18px;
  color: var(--light-text);
  max-width: 640px;
  margin-bottom: 28px;
}

/* ===== Sections ===== */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--light-bg);
}

.section-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 12px;
  text-align: center;
}

.section-desc {
  font-size: 16px;
  color: var(--secondary);
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.card {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--brand-shadow);
}

.card-body {
  padding: 22px;
}

.card h3 {
  font-size: 18px;
  font-weight: 650;
  color: var(--title);
  margin-bottom: 10px;
}

.card p {
  font-size: 15px;
  color: var(--body);
  line-height: 1.65;
}

.card a {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-blue);
}

/* Feature block */
.feature-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.feature-row.reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.feature-row.reverse .feature-text { order: 2; }
.feature-row.reverse .feature-media { order: 1; }

.feature-media {
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #E5F1FF, #F7FAFF);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.city-feature-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-text h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 16px;
}

.feature-text p {
  font-size: 16px;
  color: var(--body);
  margin-bottom: 12px;
}

/* Time blocks for weekend */
.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.time-card {
  background: var(--white);
  border-radius: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.time-card .time-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-blue);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.time-card h3 {
  font-size: 18px;
  color: var(--title);
  margin-bottom: 10px;
}

.time-card p {
  font-size: 14px;
  color: var(--body);
}

/* Interest tags */
.interest-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.interest-tag {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--pale-blue);
  color: var(--dark-blue);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s;
}

.interest-tag:hover {
  background: var(--brand-blue);
  color: var(--white);
}

/* Media slots for album */
.media-slot {
  background: linear-gradient(145deg, #E5F1FF 0%, #F7FAFF 60%, #FFFFFF 100%);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.media-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-slot.wide { aspect-ratio: 16 / 9; }
.media-slot.medium { aspect-ratio: 4 / 3; }
.media-slot.small { aspect-ratio: 1 / 1; }

.album-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
}

.album-grid .wide { grid-column: 1 / 2; grid-row: 1 / 3; }
.album-grid .medium { aspect-ratio: 4 / 3; }
.album-grid .small { aspect-ratio: 1 / 1; }

/* App section */
.app-preview {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.app-preview-image {
  max-height: 520px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
}

.app-preview-media {
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, #EDF5FF, #F7FAFF);
  border-radius: 20px;
  padding: 32px;
}

/* Security dark */
.security-block {
  background: var(--navy);
  border-radius: 16px;
  padding: 40px;
  color: var(--white);
}

.security-block h2 {
  color: var(--white);
  font-size: 26px;
  margin-bottom: 16px;
}

.security-block p,
.security-block li {
  color: var(--light-text);
  font-size: 15px;
}

.security-block ul {
  list-style: none;
  margin-top: 16px;
}

.security-block li {
  padding: 8px 0 8px 20px;
  position: relative;
}

.security-block li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--bright-blue);
}

/* Privacy */
.privacy-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
}

.privacy-block h3 {
  color: var(--title);
  font-size: 18px;
  margin-bottom: 10px;
}

.privacy-block p {
  color: var(--body);
  font-size: 15px;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--light-text);
  padding: 56px 0 32px;
  margin-top: 40px;
}

.footer-top {
  border-top: 1px solid rgba(220,238,255,0.15);
  padding-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand img {
  height: 32px;
  margin-bottom: 12px;
}

.footer-brand .brand-name {
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
}

.footer-brand .brand-en {
  font-size: 12px;
  color: var(--light-text);
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 14px;
  color: rgba(220,238,255,0.75);
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(220,238,255,0.7);
  padding: 6px 0;
  min-height: 36px;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(220,238,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: rgba(220,238,255,0.55);
}

/* Page header for inner pages */
.page-hero {
  background: linear-gradient(135deg, #0A315E 0%, #075FC6 100%);
  padding: 56px 0 48px;
  text-align: center;
}

.page-hero h1 {
  font-size: 40px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 17px;
  color: var(--light-text);
  max-width: 640px;
  margin: 0 auto;
}

/* Article content */
.article-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px;
}

.article-content h2 {
  font-size: 24px;
  color: var(--title);
  margin: 36px 0 16px;
}

.article-content h3 {
  font-size: 19px;
  color: var(--title);
  margin: 28px 0 12px;
}

.article-content p {
  font-size: 16px;
  color: var(--body);
  margin-bottom: 16px;
  line-height: 1.8;
}

.article-content ul, .article-content ol {
  margin: 16px 0 16px 24px;
}

.article-content li {
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--body);
}

/* FAQ */
details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 0;
}

summary {
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--title);
  cursor: pointer;
  list-style: none;
  min-height: 56px;
  display: flex;
  align-items: center;
}

summary::-webkit-details-marker { display: none; }

details[open] summary {
  border-bottom: 1px solid var(--border);
}

details p {
  padding: 16px 22px 20px;
  font-size: 15px;
  color: var(--body);
  line-height: 1.7;
}

/* Utility */
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }

/* ===== Responsive ===== */
@media (max-width: 1280px) {
  .container { padding: 0 20px; }
  .hero-content h1 { font-size: 42px; }
}

@media (max-width: 1024px) {
  .desktop-nav { display: none; }
  .header-actions .hide-tablet { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .time-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-row, .feature-row.reverse, .app-preview {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .feature-row.reverse .feature-text,
  .feature-row.reverse .feature-media { order: unset; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .mega-body { grid-template-columns: 1fr 1fr; }
  .album-grid { grid-template-columns: 1fr 1fr; }
  .album-grid .wide { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 768px) {
  .site-header .header-inner { display: none; }
  .mobile-header { display: flex; }
  .mobile-bottom-nav { display: flex; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .hero-banner { aspect-ratio: 16 / 10; max-height: 360px; }
  .hero-content h1 { font-size: 32px; }
  .hero-content p { font-size: 15px; }
  .section { padding: 48px 0; }
  .section-title { font-size: 26px; }
  .page-hero h1 { font-size: 30px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .time-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .mega-menu { width: 100%; }
  .mega-body { grid-template-columns: 1fr; gap: 24px; }
  .app-preview-image { max-width: 280px; max-height: 420px; }
}

@media (max-width: 560px) {
  .hero-content h1 { font-size: 28px; }
  .section-title { font-size: 24px; }
  .card-body { padding: 18px; }
  .btn-primary { padding: 0 18px; font-size: 14px; }
}
