/* ============================================
   王者农场攻略站 - 清新农场风主题
   ============================================ */

/* --- CSS Variables --- */
:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;

  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-400: #38bdf8;

  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;

  --red-400: #f87171;
  --red-500: #ef4444;

  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --max-width: 1200px;
  --header-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
               'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  color: var(--stone-800);
  background: var(--green-50);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--green-600);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--green-500); }

img { max-width: 100%; height: auto; }

/* --- Typography --- */
h1, h2, h3, h4 {
  line-height: 1.3;
  color: var(--stone-900);
}

/* --- Utility Classes --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.text-center { text-align: center; }

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-green { background: var(--green-100); color: var(--green-800); }
.tag-amber { background: var(--amber-100); color: var(--amber-600); }
.tag-sky { background: var(--sky-100); color: #0369a1; }
.tag-red { background: #fef2f2; color: var(--red-500); }

/* --- Header / Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--green-200);
  z-index: 100;
  transition: box-shadow 0.3s;
}
.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green-700);
  text-decoration: none;
  white-space: nowrap;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}

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

.nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--stone-600);
  transition: all 0.2s;
}
.nav a:hover,
.nav a.active {
  background: var(--green-100);
  color: var(--green-700);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  color: var(--stone-600);
}

/* --- Hero / Banner --- */
.hero {
  margin-top: var(--header-height);
  padding: 60px 0 50px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 40%, #bbf7d0 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(74,222,128,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(56,189,248,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--stone-600);
  margin-bottom: 28px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: white;
  box-shadow: 0 4px 14px rgba(34,197,94,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34,197,94,0.5);
  color: white;
}
.btn-secondary {
  background: white;
  color: var(--green-700);
  border: 2px solid var(--green-200);
}
.btn-secondary:hover {
  border-color: var(--green-400);
  transform: translateY(-2px);
}

/* --- Quick Features --- */
.features {
  padding: 40px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border: 2px solid var(--green-100);
  transition: all 0.3s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-300);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.feature-icon.green { background: var(--green-100); }
.feature-icon.sky { background: var(--sky-100); }
.feature-icon.amber { background: var(--amber-100); }

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--stone-500);
  line-height: 1.6;
}

/* --- Section Common --- */
.section {
  padding: 50px 0;
}
.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--stone-500);
  margin-bottom: 36px;
  font-size: 0.95rem;
}

/* --- Crop Cards Grid --- */
.crop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.crop-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  border: 2px solid var(--stone-100);
  transition: all 0.3s;
  position: relative;
}
.crop-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-300);
}
.crop-card .crop-emoji {
  font-size: 2.8rem;
  display: block;
  margin-bottom: 8px;
}
.crop-card .crop-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}
.crop-card .crop-level {
  font-size: 0.78rem;
  color: var(--stone-400);
  margin-bottom: 8px;
}
.crop-card .crop-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  font-size: 0.78rem;
}
.crop-card .crop-stats span {
  padding: 3px 6px;
  background: var(--green-50);
  border-radius: 4px;
  color: var(--stone-600);
}
.crop-card .crop-stats .label {
  background: none;
  color: var(--stone-400);
  font-size: 0.72rem;
}
.crop-card .badge {
  position: absolute;
  top: 8px;
  right: 8px;
}

/* --- Guide Cards --- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.guide-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 2px solid var(--stone-100);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.guide-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green-400), var(--green-500));
  opacity: 0;
  transition: opacity 0.3s;
}
.guide-card:hover::before { opacity: 1; }
.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-200);
}

.guide-card .guide-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 12px;
  background: var(--green-100);
}
.guide-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.guide-card p {
  font-size: 0.88rem;
  color: var(--stone-500);
  line-height: 1.7;
  margin-bottom: 14px;
}
.guide-card .read-more {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--green-600);
}
.guide-card .read-more:hover { color: var(--green-500); }

/* --- Page Content (for guide pages) --- */
.page-content {
  margin-top: var(--header-height);
  padding: 40px 0 60px;
}

.page-header {
  text-align: center;
  padding: 40px 0 30px;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
}
.page-header p {
  color: var(--stone-500);
  margin-top: 8px;
  font-size: 0.95rem;
}

.content-body {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  max-width: 860px;
  margin: 0 auto;
}

.content-body h2 {
  font-size: 1.4rem;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-100);
}
.content-body h2:first-child { margin-top: 0; }

.content-body h3 {
  font-size: 1.1rem;
  margin: 24px 0 8px;
  color: var(--green-800);
}

.content-body p {
  margin-bottom: 14px;
  color: var(--stone-600);
  line-height: 1.8;
}

.content-body ul, .content-body ol {
  margin: 0 0 16px 20px;
  color: var(--stone-600);
  line-height: 1.8;
}
.content-body li { margin-bottom: 6px; }

.content-body strong { color: var(--stone-800); }

/* --- Info Boxes --- */
.info-box {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 16px 0;
  border-left: 4px solid;
}
.info-box.tip {
  background: var(--green-50);
  border-color: var(--green-400);
}
.info-box.warn {
  background: var(--amber-100);
  border-color: var(--amber-400);
}
.info-box.alert {
  background: #fef2f2;
  border-color: var(--red-400);
}
.info-box.info {
  background: var(--sky-100);
  border-color: var(--sky-400);
}
.info-box strong { display: block; margin-bottom: 4px; }

/* --- Table Styling --- */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead th {
  background: var(--green-100);
  color: var(--green-800);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}
thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--stone-100);
  color: var(--stone-600);
}
tbody tr:hover { background: var(--green-50); }
tbody tr:last-child td:first-child { border-radius: 0 0 0 var(--radius-sm); }
tbody tr:last-child td:last-child { border-radius: 0 0 var(--radius-sm) 0; }

/* --- Step-by-step Guide --- */
.steps {
  counter-reset: step;
  margin: 16px 0;
}
.step {
  counter-increment: step;
  padding: 16px 20px 16px 52px;
  position: relative;
  margin-bottom: 12px;
  background: var(--stone-50);
  border-radius: var(--radius);
  border: 1px solid var(--stone-100);
}
.step::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}
.step strong { display: block; margin-bottom: 4px; }

/* --- Strategy Comparison --- */
.compare-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}
.compare-item {
  padding: 20px;
  border-radius: var(--radius);
  border: 2px solid var(--stone-200);
}
.compare-item.good { border-color: var(--green-300); background: var(--green-50); }
.compare-item.bad { border-color: var(--red-400); background: #fef2f2; }
.compare-item h4 { margin-bottom: 8px; }
.compare-item ul { margin: 0; }
.compare-item li { margin-bottom: 4px !important; }

/* --- Status Update / News --- */
.news-list {
  list-style: none;
  margin: 0 !important;
}
.news-list li {
  padding: 12px 16px;
  border-bottom: 1px solid var(--stone-100);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.news-list li:last-child { border-bottom: none; }
.news-date {
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--stone-400);
  min-width: 70px;
  padding-top: 2px;
}

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: 860px;
  margin: 0 auto 20px;
  font-size: 0.85rem;
  color: var(--stone-400);
}
.breadcrumb a { color: var(--stone-500); }
.breadcrumb a:hover { color: var(--green-600); }
.breadcrumb span { color: var(--stone-400); }

/* --- Footer --- */
.footer {
  background: white;
  border-top: 2px solid var(--green-100);
  padding: 32px 0;
  margin-top: 40px;
  text-align: center;
}
.footer p {
  color: var(--stone-400);
  font-size: 0.85rem;
}
.footer a { color: var(--green-600); }

/* --- Ad Slots --- */
.ad-slot {
  display: none;
  overflow: hidden;
}
.ad-slot iframe,
.ad-slot ins {
  display: block !important;
  margin: 0 auto !important;
}

/* --- Back to Top --- */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-500);
  color: white;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 50;
}
.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-top:hover {
  background: var(--green-600);
  transform: translateY(-2px);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .ad-slot[data-ad-slot="home-banner"] iframe,
  .ad-slot[data-ad-slot="content-top"] iframe,
  .ad-slot[data-ad-slot="content-bottom"] iframe {
    max-width: 100% !important;
    height: auto !important;
  }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.95rem; }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 12px;
    border-bottom: 2px solid var(--green-100);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    transition: transform 0.3s;
    z-index: 99;
  }
  .nav.open { transform: translateY(0); }
  .nav a { width: 100%; padding: 12px 16px; }

  .menu-toggle { display: block; }

  .content-body { padding: 24px 18px; }

  .page-header { padding: 24px 0; }
  .page-header h1 { font-size: 1.5rem; }

  .crop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .guide-grid { grid-template-columns: 1fr; }

  .compare-box { grid-template-columns: 1fr; }

  .section-title { font-size: 1.4rem; }

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

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .crop-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 40px 0 30px; }
  .btn { padding: 10px 20px; font-size: 0.88rem; }
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate { animation: fadeUp 0.6s ease forwards; }
.animate-d1 { animation-delay: 0.1s; }
.animate-d2 { animation-delay: 0.2s; }
.animate-d3 { animation-delay: 0.3s; }
.animate-d4 { animation-delay: 0.4s; }
