﻿/* ============================
   Stardew Valley Guide - Style
   Modern Western UI + Bilingual
   ============================ */

:root {
  --primary: #5b8c3e;
  --primary-dark: #3d6b2a;
  --primary-light: #7db85a;
  --accent: #e8a838;
  --accent-dark: #c98a2a;
  --warm-bg: #fdf8f0;
  --card-bg: #ffffff;
  --text-dark: #2c2c2c;
  --text-muted: #6b6b6b;
  --text-light: #f5f0e8;
  --border: #e0d8cc;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-width: 480px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--warm-bg);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================
   Language Toggle
   ============================ */
.lang-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.85);
}

.lang-toggle:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--primary-light);
}

.lang-toggle:active {
  transform: translateY(0);
}

/* ============================
   Language Toggle - Core i18n
   ============================ */
.lang-zh [data-lang="en"] { display: none !important; }
.lang-zh [data-lang="zh"] { display: revert !important; }
[data-lang="zh"] { display: none; }
[data-lang="en"] { display: revert; }

/* ============================
   Utility: i18n hidden
   ============================ */
[data-lang="en"].hidden-lang,
[data-lang="zh"].hidden-lang {
  display: none !important;
}

/* ============================
   Header / Banner
   ============================ */
.banner {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  max-height: 900px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.35) 50%,
    rgba(0,0,0,0.55) 100%
  );
  z-index: 1;
}

.banner-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* CSS animation as video fallback */
.banner-anim {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.banner-anim img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: slowZoom 20s ease-in-out infinite alternate;
}

@keyframes slowZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.banner-anim::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(91,140,62,0.08) 0%,
    transparent 30%,
    transparent 70%,
    rgba(232,168,56,0.06) 100%
  );
  animation: shimmer 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes shimmer {
  0% { opacity: 0.3; }
  100% { opacity: 0.7; }
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: var(--max-width);
}

.banner-content h1 {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  margin-bottom: 8px;
}

.banner-content .subtitle {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  margin-bottom: 28px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.banner-content .badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(232,168,56,0.4);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

.scroll-indicator .arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(255,255,255,0.4);
  border-bottom: 2px solid rgba(255,255,255,0.4);
  transform: rotate(45deg);
}

/* ============================
   Navigation
   ============================ */
.nav-section {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 8px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar {
  display: none;
}

.nav-link {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-dark);
  background: rgba(91,140,62,0.08);
}

.nav-link.active {
  color: #fff;
  background: var(--primary);
}

/* ============================
   Sections
   ============================ */
.section {
  padding: 48px 16px;
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.section-header p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================
   Feature Cards
   ============================ */
.feature-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.feature-card-body {
  padding: 16px 20px 20px;
}

.feature-card-body h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.feature-card-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.feature-card-body .tag {
  display: inline-block;
  background: rgba(91,140,62,0.1);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 40px;
  letter-spacing: 0.3px;
}

/* ============================
   Crop Table
   ============================ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
}

.crop-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 420px;
}

.crop-table thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 10px;
  position: sticky;
  top: 0;
  text-align: left;
}

.crop-table thead th:first-child {
  border-radius: 12px 0 0 0;
}

.crop-table thead th:last-child {
  border-radius: 0 12px 0 0;
}

.crop-table tbody tr {
  transition: background 0.15s ease;
}

.crop-table tbody tr:nth-child(even) {
  background: rgba(245,240,232,0.4);
}

.crop-table tbody tr:hover {
  background: rgba(91,140,62,0.06);
}

.crop-table tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.crop-table tbody tr:last-child td {
  border-bottom: none;
}

.crop-table .crop-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crop-table .crop-cell img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.crop-table .crop-name {
  font-weight: 600;
  font-size: 13px;
}

.crop-table .crop-name-en {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.crop-table .profit {
  font-weight: 700;
  color: var(--primary-dark);
}

.crop-table .season-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 40px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(91,140,62,0.1);
  color: var(--primary);
}

/* ============================
   NPC Cards
   ============================ */
.npc-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.npc-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.npc-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.npc-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(91,140,62,0.03), rgba(232,168,56,0.03));
}

.npc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.npc-meta h3 {
  font-size: 16px;
  font-weight: 700;
}

.npc-meta .npc-name-en {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.npc-card-body {
  padding: 16px 20px;
}

.gift-category {
  margin-bottom: 12px;
}

.gift-category:last-child {
  margin-bottom: 0;
}

.gift-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-dark);
  margin-bottom: 4px;
}

.gift-label.loved {
  color: #c0392b;
}

.gift-label.liked {
  color: var(--primary);
}

.gift-items {
  font-size: 13px;
  color: var(--text-dark);
  line-height: 1.6;
}

.gift-items .tag {
  display: inline-block;
  background: rgba(232,168,56,0.1);
  color: var(--accent-dark);
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 40px;
  margin: 1px 2px;
}

/* ============================
   CTA Button
   ============================ */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(91,140,62,0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(91,140,62,0.4);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(232,168,56,0.3);
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* ============================
   Footer
   ============================ */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
}

.site-footer a {
  color: var(--primary-light);
  text-decoration: none;
}

/* ============================
   Responsive
   ============================ */
@media (min-width: 768px) {
  :root {
    --max-width: 720px;
  }

  .banner-content h1 {
    font-size: 52px;
  }

  .banner-content .subtitle {
    font-size: 20px;
  }

  .feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .feature-card img {
    height: 220px;
  }

  .section-header h2 {
    font-size: 30px;
  }
}

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

  .feature-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .npc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

/* ============================
   Page Hero (subpages)
   ============================ */
.page-hero {
  position: relative;
  padding: 100px 16px 56px;
  text-align: center;
  background: linear-gradient(135deg, #5b8c3e 0%, #3d6b2a 50%, #2d5a1e 100%);
  color: #fff;
}

.page-hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 6px;
}

.page-hero p {
  font-size: 14px;
  opacity: 0.85;
  max-width: 480px;
  margin: 0 auto;
}



