/* CS209A demo pages — built on the shared portfolio design tokens */
.demo-page {
  max-width: 1100px;
  margin:0 auto;
  padding: 96px 24px 48px;
}

/* ===== Hero Section ===== */
.main-hero {
  display: block;
  background: linear-gradient(135deg, #1a1740 0%, #342c78 40%, var(--purple) 100%);
}

.hero-content { z-index: 1; }

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 560px;
}

.hero-tech {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-tech-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.hero-tech-item {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.jump-btn {
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.jump-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.farm-btn {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
}

.data-btn {
  background: white;
  color: var(--purple-dark);
}

.jump-btn.farm-btn:hover {
  box-shadow: 0 10px 25px rgba(46, 204, 113, 0.4);
}

.jump-btn.data-btn:hover {
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.demo-hero {
  position: relative;
  overflow: hidden;
  padding: 36px 40px;
  border-radius: 20px;
  background: linear-gradient(125deg, #342c78, var(--purple) 52%, var(--purple-light));
  color: var(--white);
  box-shadow: 0 12px 32px rgba(84, 65, 215, 0.18);
}

.demo-hero::after {
  content: "";
  position: absolute;
  top: -160px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

.farm-hero { background: linear-gradient(125deg, #1a5c3a, var(--teal) 55%, var(--teal-light)); position: relative; }
.data-hero { background: linear-gradient(125deg, #342c78, var(--purple) 52%, var(--purple-light)); }

/* Hero glow effect */
.hero-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  top: -60px;
  right: -40px;
  pointer-events: none;
  animation: floatGlow 4s ease-in-out infinite alternate;
}
@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  100% { transform: translate(-30px, 20px) scale(1.2); opacity: 1; }
}

/* ===== Rules Section (standalone) ===== */
.rules-section {
  margin-top: 48px;
  padding: 0;
}

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

.rules-section-header .eyebrow {
  color: var(--teal);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
}

.rules-section-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin: 8px 0 6px;
}

.rules-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
}

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

.rule-card {
  position: relative;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.rule-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  border-color: transparent;
}

.rule-card-inner {
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

/* Card top accent strip */
.rule-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.rule-card[data-rule="mutex"]::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.rule-card[data-rule="home"]::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.rule-card[data-rule="limit"]::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.rule-card[data-rule="concurrent"]::before { background: linear-gradient(90deg, #10b981, #34d399); }

/* Hover color glow effect */
.rule-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.rule-card[data-rule="mutex"]::after { box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.3); }
.rule-card[data-rule="home"]::after { box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.3); }
.rule-card[data-rule="limit"]::after { box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.3); }
.rule-card[data-rule="concurrent"]::after { box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.3); }
.rule-card:hover::after { opacity: 1; }

.rule-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.3s ease;
}
.rule-card[data-rule="mutex"] .rule-icon { background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05)); color: #3b82f6; }
.rule-card[data-rule="home"] .rule-icon { background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05)); color: #d97706; }
.rule-card[data-rule="limit"] .rule-icon { background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05)); color: #7c3aed; }
.rule-card[data-rule="concurrent"] .rule-icon { background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05)); color: #059669; }

.rule-card:hover .rule-icon {
  transform: scale(1.05);
}

.rule-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.rule-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.rule-card p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-light);
  margin: 0;
}

.rule-card p strong {
  color: var(--text);
  font-weight: 600;
}

.rule-card p code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78em;
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--teal);
}

.rule-number {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 1.6rem;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.04);
  font-style: italic;
  line-height: 1;
  transition: color 0.3s ease;
}
.rule-card:hover .rule-number {
  color: rgba(0, 0, 0, 0.08);
}

.demo-kicker,
.eyebrow,
.analytics-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.demo-kicker { color: rgba(255, 255, 255, 0.78); }
.eyebrow,
.analytics-label { color: var(--purple-dark); }

.demo-hero h1 {
  position: relative;
  z-index: 1;
  margin: 10px 0 14px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
}

.demo-hero p {
  position: relative;
  z-index: 1;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
}

.demo-jump-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.demo-jump-links a,
.repo-button,
.demo-back {
  border-radius: 999px;
  font-weight: 700;
}

.demo-jump-links a {
  padding: 9px 16px;
  background: var(--white);
  color: var(--purple-dark);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.demo-jump-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.14);
}

.demo-section { margin-top: 48px; }

.demo-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.demo-section-heading h2 {
  margin: 5px 0;
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1.25;
}

.demo-section-heading p {
  max-width: 690px;
  color: var(--text-light);
}

.demo-back {
  padding: 7px 13px;
  background: var(--bg-alt);
  color: var(--purple-dark);
  font-size: 0.82rem;
}

.farm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--text-light);
  font-size: 0.78rem;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-radius: 50%;
}

.legend-dot.soil { background: #a46c3e; }
.legend-dot.growing { background: #55b95a; }
.legend-dot.ripe { background: #f8c947; }

.farm-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.farm-panel {
  padding: 28px;
  background: linear-gradient(160deg, #f0f9df, #d9f3d0);
}

.farm-player,
.coin-card {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar { font-size: 2.25rem; }
.farm-player small {
  display: block;
  color: #4b7753;
  font-size: 0.8rem;
}

.coin-card {
  margin: 22px 0;
  padding: 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
}

.coin-card > span { font-size: 1.7rem; }
.coin-card small { display: block; color: var(--text-light); }
.coin-card strong { font-size: 1.65rem; color: #b98000; }

.farm-actions { display: grid; gap: 10px; }

.farm-action {
  border: 0;
  border-radius: 11px;
  padding: 12px;
  cursor: pointer;
  font: 700 0.9rem inherit;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.farm-action:hover { transform: translateY(-2px); filter: brightness(1.03); }
.farm-action em { font-style: normal; opacity: 0.8; }
.farm-action.plant { background: #42a85a; color: var(--white); }
.farm-action.harvest { background: #f6c94d; color: #5b4300; }
.farm-action.reset { border: 1px solid #a6c5a7; background: transparent; color: #64726a; }
.farm-tip { margin-top: 20px; color: #547059; font-size: 0.78rem; line-height: 1.55; }

.farm-board-wrap { padding: 25px; background: linear-gradient(135deg, #fffdf7, #f8f0df); }

.farm-board-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  color: #694c32;
  font-weight: 800;
}

.farm-board-header strong { color: #7d8a77; font-size: 0.8rem; }

.farm-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 12px;
}

.plot {
  aspect-ratio: 1;
  border: 2px solid #c69566;
  border-radius: 15px;
  background: linear-gradient(145deg, #dba86c, #ad7043);
  color: var(--white);
  cursor: pointer;
  font: 700 0.85rem inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plot:hover { transform: translateY(-3px); box-shadow: 0 7px 13px rgba(100, 57, 25, 0.18); }
.plot.selected { outline: 4px solid rgba(108, 92, 231, 0.28); border-color: var(--purple); }
.plot .crop { display: block; margin-bottom: 3px; font-size: 1.75rem; }
.plot.growing { border-color: #4f9142; background: linear-gradient(145deg, #a6d46e, #5ca948); }
.plot.ripe { border-color: #db9923; background: linear-gradient(145deg, #f8d962, #edac38); animation: ripePulse 1.4s infinite; }
.plot .timer { font-size: 0.7rem; }

@keyframes ripePulse { 50% { box-shadow: 0 0 0 6px rgba(243, 185, 50, 0.22); } }

.dashboard-section {
  padding: 38px;
  border-radius: 28px;
  background: #f5f7ff;
}

.repo-button { padding: 10px 16px; background: var(--text); color: var(--white); white-space: nowrap; }

.pipeline {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 25px;
}

.pipeline article {
  position: relative;
  flex: 1;
  padding: 20px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 3px 12px rgba(54, 57, 100, 0.05);
}

.pipeline article > span {
  position: absolute;
  top: 11px;
  right: 14px;
  color: #c5c6d9;
  font-size: 0.72rem;
  font-weight: 800;
}

.pipeline-icon { font-size: 1.65rem; }
.pipeline h3 { margin: 7px 0 3px; font-size: 1rem; }
.pipeline p { color: var(--text-light); font-size: 0.8rem; line-height: 1.5; }
.pipeline-line { align-self: center; width: 22px; height: 2px; background: #b9b4e7; }

/* ===== Project Cards ===== */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  margin: 8px 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  text-decoration: none;
  color: inherit;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.project-banner {
  position: relative;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.farm-banner {
  background: linear-gradient(135deg, #27ae60, #2ecc71, #55d98c);
}

.data-banner {
  background: linear-gradient(135deg, #342c78, var(--purple), var(--purple-light));
}

.banner-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 40%);
}

.banner-emoji {
  position: relative;
  font-size: 4rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
  transition: transform 0.4s ease;
}

.project-card:hover .banner-emoji {
  transform: scale(1.15) rotate(-5deg);
}

.project-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.meta-tag {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag-assignment { background: #e8f5e9; color: #2e7d32; }
.tag-javafx { background: #fff3e0; color: #e65100; }
.tag-final { background: #e8e4ff; color: #5e35b1; }
.tag-stack { background: #e3f2fd; color: #1565c0; }

.project-body h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text);
}

.project-body p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.project-features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.feature {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bg-alt);
  font-size: 0.8rem;
  color: var(--text-light);
}

.project-cta {
  font-weight: 700;
  color: var(--purple);
  transition: all 0.3s ease;
}

.project-card:hover .project-cta {
  color: var(--purple-dark);
}

.farm-card:hover .project-cta { color: #27ae60; }

/* ===== Tech Section ===== */
.tech-section {
  padding: 48px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f8f9ff, #f0f4ff);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.tech-icon { font-size: 2.5rem; }
.tech-item strong { font-size: 1rem; color: var(--text); }
.tech-item span:last-child { font-size: 0.8rem; color: var(--text-light); }

/* ===== Footer ===== */
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  font-weight: 800;
  font-size: 1rem;
  color: var(--purple-dark);
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-light);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-right a {
  color: var(--purple-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.footer-right a:hover { text-decoration: underline; }

.footer-divider {
  color: var(--text-light);
  opacity: 0.5;
}

.analytics-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
.analytics-card { min-height: 230px; padding: 23px; border-radius: 18px; background: var(--white); }
.analytics-card h3 { margin: 5px 0 16px; font-size: 1.15rem; }
.analytics-card-head { display: flex; justify-content: space-between; gap: 12px; }
.analytics-card select { height: 32px; border: 1px solid #ddd9f4; border-radius: 8px; padding: 0 7px; background: #faf9ff; color: var(--purple-dark); font: 600 0.76rem inherit; }

.trend-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; height: 145px; padding: 8px 4px 0; border-bottom: 1px solid #eceaf6; }
.bar { position: relative; min-height: 8px; border-radius: 7px 7px 0 0; background: linear-gradient(180deg, var(--purple-light), var(--purple)); transition: height 0.45s ease; }
.bar::after { position: absolute; top: -19px; width: 100%; content: attr(data-value); color: #706d8a; font-size: 0.64rem; font-weight: 700; text-align: center; }
.chart-axis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 7px; color: #9896aa; font-size: 0.65rem; text-align: center; }
.chart-note,
.card-footnote { margin-top: 14px; color: var(--text-light); font-size: 0.76rem; }

.tag-pairs { display: grid; gap: 13px; }
.tag-pairs div { display: flex; gap: 7px; align-items: center; font-size: 0.78rem; }
.tag-pairs strong { margin-left: auto; color: #514d66; }
.tag { padding: 4px 8px; border-radius: 7px; font-weight: 700; }
.tag.purple { background: #eeeaff; color: #6654d7; }
.tag.blue { background: #e3f0ff; color: #397fbd; }
.tag.coral { background: #ffe6e6; color: #d85e5e; }
.tag.green { background: #e0f7e9; color: #238154; }
.api-card code { display: block; margin: 10px 0; padding: 8px 10px; overflow: auto; border-radius: 7px; background: #292b3e; color: #dce3ff; font-size: 0.7rem; }

/* ===== QQ Farm Redesign ===== */
.farm-hero {
  background: linear-gradient(135deg, #1a5c2a 0%, #216947 40%, var(--teal) 100%);
}

.farm-visual .floating-card {
  background: rgba(255, 255, 255, 0.18);
}

.card-sun { top: 10px; right: 30px; }
.card-wheat { top: 80px; left: 0; background: rgba(241, 196, 15, 0.25) !important; }
.card-tree { bottom: 10px; right: 10px; background: rgba(39, 174, 96, 0.25) !important; }

.outline-btn {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
}

.outline-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
}

.game-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.game-panel {
  padding: 28px;
  background: linear-gradient(180deg, #f0f9df 0%, #e8f5e9 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-header {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-avatar {
  font-size: 2.5rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.player-info strong {
  display: block;
  font-size: 1.1rem;
  color: #2e7d32;
}

.player-info small {
  color: #66bb6a;
  font-size: 0.85rem;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-icon { font-size: 1.5rem; }

.stat-info small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-info strong {
  font-size: 1.3rem;
  color: var(--text);
}

.coins-card .stat-info strong { color: #f59e0b; }
.plots-card .stat-info strong { color: #22c55e; }

.actions-section h4,
.game-tips h4,
.legend-box h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4b7753;
  margin-bottom: 12px;
}

.game-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.farm-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
  text-align: left;
}

.farm-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.farm-action:active { transform: translateY(0); }

.action-icon { font-size: 1.3rem; }

.action-text {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
}

.action-cost {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.9;
}

.farm-action.plant {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.farm-action.harvest {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.farm-action.reset {
  background: transparent;
  border: 2px solid #d1d5db;
  color: #6b7280;
  justify-content: center;
}

.farm-action.reset:hover {
  border-color: #9ca3af;
  color: #374151;
}

.game-tips {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.game-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-tips li {
  font-size: 0.8rem;
  color: #4b7753;
  padding-left: 16px;
  position: relative;
}

.game-tips li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #22c55e;
}

.legend-box {
  margin-top: auto;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.soil { background: #a46c3e; }
.legend-dot.growing { background: #55b95a; }
.legend-dot.ripe { background: #f8c947; }

/* Game Board */
.game-board-container {
  padding: 28px;
  background: linear-gradient(135deg, #fffdf7 0%, #f8f0df 100%);
}

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

.board-header h3 {
  font-size: 1.3rem;
  color: #694c32;
  margin-bottom: 4px;
}

.board-subtitle {
  font-size: 0.85rem;
  color: #a08060;
}

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

.plot {
  aspect-ratio: 1;
  border: 3px solid #c69566;
  border-radius: 18px;
  background: linear-gradient(145deg, #dba86c, #ad7043);
  color: white;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.plot:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(100, 57, 25, 0.25);
}

.plot.selected {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.3), 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}

.plot .crop {
  font-size: 2rem;
  margin-bottom: 4px;
}

.plot .timer {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0,0,0,0.2);
  padding: 2px 8px;
  border-radius: 999px;
}

.plot.growing {
  border-color: #4f9142;
  background: linear-gradient(145deg, #a6d46e, #5ca948);
}

.plot.ripe {
  border-color: #db9923;
  background: linear-gradient(145deg, #f8d962, #edac38);
  animation: ripePulse 1.5s infinite;
}

@keyframes ripePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(243, 185, 50, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(243, 185, 50, 0); }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .main-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-visual { display: none; }
  
  .demo-jump-links { justify-content: center; }
  
  .projects-grid { grid-template-columns: 1fr; }
  
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  
  .game-container { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .demo-page { padding: 95px 16px 48px; }
  .demo-hero { padding: 32px 26px; }
  .demo-section { margin-top: 52px; }
  .demo-section-heading { display: block; }
  .farm-legend { margin-top: 15px; }
  .farm-layout { grid-template-columns: 1fr; }
  .pipeline { display: grid; grid-template-columns: 1fr 1fr; }
  .pipeline-line { display: none; }
  .analytics-grid { grid-template-columns: 1fr; }
  .repo-button { display: inline-block; margin-top: 16px; }
  .demo-back { display: none; }
  .farm-board { gap: 8px; }
  .farm-board-wrap { padding: 18px; }
  .dashboard-section { padding: 26px 18px; }
  .footer-content { justify-content: center; text-align: center; }
.footer-left, .footer-right { justify-content: center; }
  .stats-row { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .pipeline { grid-template-columns: 1fr; }
  .farm-board { gap: 6px; }
  .plot .crop { font-size: 1.35rem; }
  .plot { font-size: 0.7rem; }
  .tech-grid { grid-template-columns: 1fr; }
.rules-grid { grid-template-columns: 1fr; }
}

/* ============================================================ */
/* ===== QQ Farm Terminal Client ===== */
/* ============================================================ */

.farm-terminal-page { max-width: 1200px; }

/* -- Concurrency Info Cards -- */
.concurrency-info { margin-top: 40px; }
.concurrency-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.concurrency-card {
  padding: 22px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.concurrency-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.cc-icon { font-size: 2rem; display: block; margin-bottom: 10px; }
.concurrency-card h3 { font-size: 1rem; margin-bottom: 8px; color: var(--text); }
.concurrency-card p { font-size: 0.78rem; color: var(--text-light); line-height: 1.5; }
.concurrency-card code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  background: #f0f0f5;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--purple-dark);
}

/* -- Terminal Client Layout -- */
.farm-terminal-page > .demo-section:nth-of-type(2) {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.terminal-container {
  border-radius: 16px;
  overflow: hidden;
  background: #1a1b2e;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #12131f;
  border-bottom: 1px solid #2a2d44;
}
.terminal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #b0b5d0;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dots .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-conn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  color: #b0b5d0;
}
.conn-dot { width: 8px; height: 8px; border-radius: 50%; }
.conn-dot.disconnected { background: #ff5f57; }
.conn-dot.connected { background: #28c840; animation: connectedPulse 2s infinite; }
.conn-dot.error { background: #febc2e; }
@keyframes connectedPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* -- Login Overlay -- */
.login-overlay {
  position: relative;
  padding: 50px 30px;
  background: #1a1b2e;
}
.login-overlay.hidden { display: none; }
.login-overlay-local.hidden { display: none; }
.login-box {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}
.login-box h2 { color: #e0e3ff; font-size: 1.4rem; margin-bottom: 8px; }
.login-box p { color: #888daa; font-size: 0.85rem; margin-bottom: 20px; }
.login-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.login-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #3a3d55;
  border-radius: 8px;
  background: #252740;
  color: #e0e3ff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.login-input-row input:focus { border-color: var(--purple-light); }
.btn-login {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s;
}
.btn-login:hover { transform: translateY(-1px); }
.login-error { color: #ff5f57; font-size: 0.75rem; min-height: 18px; }
.login-hint {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: #252740;
  color: #888daa;
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: left;
}
.login-hint code {
  font-family: 'JetBrains Mono', monospace;
  background: #1a1b2e;
  padding: 1px 5px;
  border-radius: 3px;
  color: #b0b5d0;
}

/* -- Terminal Body -- */
.terminal-body { /* no-op */ }
.terminal-output {
  height: 320px;
  overflow-y: auto;
  padding: 14px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
}
.terminal-output::-webkit-scrollbar { width: 6px; }
.terminal-output::-webkit-scrollbar-thumb { background: #3a3d55; border-radius: 3px; }

.output-line { display: flex; gap: 8px; margin-bottom: 3px; }
.output-line.command .output-prefix { color: #6cddbb; }
.output-line.success .output-prefix { color: #28c840; }
.output-line.error .output-prefix { color: #ff5f57; }
.output-line.info .output-prefix { color: #febc2e; }
.output-line .output-prefix { color: #7b7fa8; font-weight: 600; }
.output-line .output-text { color: #c5cae0; word-break: break-all; white-space: pre-wrap; }
.output-line.error .output-text { color: #ff8a8a; }

/* -- Terminal Input -- */
.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid #2a2d44;
  background: #161728;
}
.terminal-input-row .prompt {
  color: #6cddbb;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
}
.terminal-input-row input {
  flex: 1;
  border: none;
  background: transparent;
  color: #e0e3ff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  outline: none;
}
.terminal-input-row input::placeholder { color: #555870; }
.btn-send {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: #3a3d55;
  color: #e0e3ff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-send:hover { background: var(--purple); }

/* -- Side Panel -- */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.status-bar {
  padding: 10px 14px;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--purple-dark);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

/* -- Farm Grid (Terminal version) -- */
.farm-grid-wrap {
  padding: 16px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.grid-header h4 { font-size: 0.9rem; color: var(--text); }
#grid-owner { color: var(--text-light); font-weight: 400; font-size: 0.78rem; }

.farm-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.farm-cell {
  aspect-ratio: 1;
  min-height: 70px;
  border: 2px solid #c69566;
  border-radius: 10px;
  background: linear-gradient(145deg, #dba86c, #ad7043);
  color: white;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.farm-cell:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(100, 57, 25, 0.2); }
.farm-cell.selected { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.3); transform: scale(1.05); }
.farm-cell .cell-icon { font-size: 1.5rem; line-height: 1.2; }
.farm-cell .cell-text { font-size: 0.65rem; font-weight: 600; margin-top: 2px; }
.farm-cell.growing { border-color: #4f9142; background: linear-gradient(145deg, #a6d46e, #5ca948); }
.farm-cell.ripe { border-color: #db9923; background: linear-gradient(145deg, #f8d962, #edac38); animation: cellPulse 1.5s infinite; }
@keyframes cellPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(243, 185, 50, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(243, 185, 50, 0); }
}

/* -- Quick Actions -- */
.quick-actions {
  padding: 16px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.quick-actions h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); margin-bottom: 10px; }
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.quick-btn {
  padding: 10px 12px;
  border: 1px solid #e0e2f0;
  border-radius: 8px;
  background: #f8f9ff;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.quick-btn:hover { background: #eef0ff; border-color: var(--purple-light); transform: translateY(-1px); }
.quick-btn.btn-steal { grid-column: span 2; background: #fff0f0; border-color: #f5c5c5; }
.quick-btn.btn-steal:hover { background: #ffe0e0; border-color: #ff6b6b; }

/* -- Command Reference -- */
.cmd-reference {
  padding: 16px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.cmd-reference h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); margin-bottom: 10px; }
.cmd-reference ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cmd-reference li { font-size: 0.74rem; color: var(--text-light); line-height: 1.5; }
.cmd-reference code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  background: #f0f0f8;
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--purple-dark);
  margin-right: 4px;
}

/* -- How to Run -- */
.how-to-run { background: linear-gradient(135deg, #f8f9ff, #f0f4ff); padding: 40px; border-radius: 24px; }
.run-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.run-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease;
}
.run-step:hover { transform: translateY(-2px); }
.step-num {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
}
.run-step h4 { font-size: 0.9rem; color: var(--text); margin-bottom: 8px; }
.run-step pre {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #1a1b2e;
  overflow-x: auto;
}
.run-step code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #c5cae0;
  line-height: 1.6;
  white-space: pre;
}

/* -- Terminal Responsive -- */
@media (max-width: 900px) {
  .farm-terminal-page > .demo-section:nth-of-type(2) {
    grid-template-columns: 1fr;
  }
  .concurrency-cards { grid-template-columns: repeat(2, 1fr); }
  .run-steps { grid-template-columns: 1fr; }
  .game-container { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .concurrency-cards { grid-template-columns: 1fr; }
  .terminal-output { height: 250px; }
  .how-to-run { padding: 24px; }
  .login-input-row { flex-direction: column; }
  .stats-row { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .quick-grid { grid-template-columns: 1fr; }
  .quick-btn.btn-steal { grid-column: span 1; }
}

/* ============================================================ */
/* ===== QQ Farm INTERACTIVE Demo (in-browser simulation) ===== */
/* ============================================================ */

.farm-interactive-page { max-width: 1400px; }

/* -- Feature Cards -- */
.concurrency-features { margin-top: 50px; }
.feature-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  padding: 24px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}
.fc-icon { font-size: 2.5rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; margin-bottom: 10px; color: var(--text); }
.feature-card p { font-size: 0.78rem; color: var(--text-light); line-height: 1.5; flex: 1; }
.btn-try {
  margin-top: 16px;
  padding: 8px 20px;
  border: 2px solid var(--purple);
  border-radius: 999px;
  background: transparent;
  color: var(--purple);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}
.btn-try:hover {
  background: var(--purple);
  color: white;
  transform: translateY(-2px);
}

/* -- Interactive Demo Layout -- */
.interactive-demo { margin-top: 60px; max-width: 1000px; }
.demo-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* -- Game Panel -- */
.game-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Login overlay (inside game panel) */
.login-overlay-local {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 22, 40, 0.92);
  backdrop-filter: blur(8px);
}
.login-overlay-local.hidden { display: none; }
.login-inner {
  max-width: 420px;
  width: 90%;
  padding: 40px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.login-inner h2 { font-size: 1.6rem; margin-bottom: 8px; }
.login-inner p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 24px; }
.login-row { display: flex; gap: 10px; }
.login-row input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e2f0;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.login-row input:focus { border-color: var(--purple); }
.btn-go {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.btn-go:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4); }
.login-err { color: #ff5f57; font-size: 0.8rem; margin-top: 8px; min-height: 18px; }

/* Player info bar */
.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.panel-player { display: flex; align-items: center; gap: 12px; }
.panel-avatar { font-size: 2rem; }
.panel-player strong { display: block; color: var(--text); font-size: 1rem; }
.panel-player small { color: var(--text-light); font-size: 0.75rem; }
.panel-stats { display: flex; gap: 10px; }
.ps-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #f8f9ff;
}
.ps-icon { font-size: 1.2rem; }
.ps-card small { display: block; font-size: 0.65rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.04em; }
.ps-card strong { font-size: 1.1rem; color: #f59e0b; }

/* Grid */
.panel-grid-wrap { text-align: center; }
.grid-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.farm-grid-local {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f9df, #e8f5e9);
}

/* Action buttons */
.panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.action-btn {
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  color: white;
}
.action-btn:hover { transform: translateY(-2px); }
.action-btn.active { outline: 3px solid rgba(255,255,255,0.6); transform: scale(1.03); }

.plant-btn { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 4px 12px rgba(34,197,94,0.3); }
.harvest-btn { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 12px rgba(245,158,11,0.3); }
.steal-btn { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 4px 12px rgba(239,68,68,0.3); }
.concurrent-btn { background: linear-gradient(135deg, var(--purple), var(--purple-light)); box-shadow: 0 4px 12px rgba(108,92,231,0.3); }

.panel-secondary-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.secondary-btn {
  padding: 10px 8px;
  border: 1px solid #e0e2f0;
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.secondary-btn:hover { background: #f0f2ff; border-color: var(--purple-light); }

/* -- Info Panel (bottom) -- */
.info-panel {
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  overflow: hidden;
  max-height: 300px;
  display: flex;
  flex-direction: column;
}
.tab-header {
  display: flex;
  border-bottom: 1px solid #eef0f8;
}
.tab-btn {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  position: relative;
}
.tab-btn:hover { color: var(--purple); }
.tab-btn.active { color: var(--purple); }
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--purple);
  border-radius: 3px 3px 0 0;
}

.tab-content { padding: 16px; overflow-y: auto; flex: 1; }
.tab-content.hidden { display: none; }

.tab-content h3 { font-size: 1rem; margin-bottom: 18px; }
.explain-block { margin-bottom: 18px; }
.explain-block h4 { font-size: 0.88rem; margin-bottom: 6px; color: var(--text); }
.explain-block p { font-size: 0.78rem; color: var(--text-light); line-height: 1.6; }
.explain-block code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  background: #f0f0f8;
  padding: 2px 5px;
  border-radius: 3px;
}

/* -- Server Log -- */
.log-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.log-toolbar h3 { margin-bottom: 0; }
.log-hint { font-size: 0.7rem; color: var(--text-light); }
.log-panel {
  border-radius: 10px;
  background: #1a1b2e;
  padding: 12px;
  max-height: 380px;
  overflow-y: auto;
}
.log-panel::-webkit-scrollbar { width: 6px; }
.log-panel::-webkit-scrollbar-thumb { background: #3a3d55; border-radius: 3px; }
.log-content {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.7;
}
.log-entry {
  display: flex;
  gap: 6px;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-wrap: wrap;
}
.log-time { color: #555870; }
.log-tag { color: #7b7fa8; font-weight: 600; min-width: 90px; }
.log-thread { color: #555870; }
.log-msg { color: #c5cae0; flex: 1; }
.log-success .log-msg { color: #5ae08a; }
.log-error .log-msg { color: #ff8a8a; }
.log-info .log-tag { color: #febc2e; }
.log-warn .log-tag { color: #febc2e; }

/* -- How to Play -- */
.howto-list { padding-left: 20px; margin: 0 0 16px; }
.howto-list li { font-size: 0.82rem; color: var(--text-light); line-height: 1.8; }
.howto-list strong { color: var(--text); }
.howto-hint {
  padding: 14px;
  border-radius: 10px;
  background: #eef8ff;
  color: #1a6e9a;
  font-size: 0.78rem;
  line-height: 1.5;
}

/* -- Status Bar -- */
.status-bar {
  margin-top: 18px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--purple-dark);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

/* -- Code Compare Section -- */
.code-ref { margin-top: 60px; }
.code-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
.code-compare-col {
  padding: 24px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.code-compare-col h4 { font-size: 1rem; margin-bottom: 14px; }
.code-compare-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.code-compare-col li { font-size: 0.8rem; color: var(--text-light); line-height: 1.5; }
.code-compare-col code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  background: #f0f0f8;
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--purple-dark);
  margin-right: 4px;
}

/* -- Modals -- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 22, 40, 0.7);
  backdrop-filter: blur(6px);
}
.modal-overlay.hidden { display: none; }
.modal-box {
  max-width: 460px;
  width: 90%;
  padding: 30px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-box h3 { font-size: 1.3rem; margin-bottom: 16px; }
.modal-box.modal-large { max-width: 520px; }
.modal-field { margin: 14px 0; }
.modal-field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-light); margin-bottom: 6px; }
.modal-field select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e0e2f0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  background: white;
}
.modal-field select:focus { border-color: var(--purple); }
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.btn-cancel {
  padding: 12px 24px;
  border: 1px solid #e0e2f0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-cancel:hover { background: #f8f9ff; border-color: #c0c4d8; }

/* -- Steal Modal -- */
#steal-info ul {
  padding-left: 18px;
  margin: 10px 0;
}
#steal-info li { font-size: 0.76rem; color: var(--text-light); line-height: 1.6; }
#steal-info strong { color: var(--text); }

/* -- Concurrent Test Modal -- */
.concurrent-setup {
  padding: 16px;
  border-radius: 12px;
  background: #f8f9ff;
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.8;
}
.concurrent-setup strong { color: var(--text); }
.concurrent-setup .hint {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #fff3e0;
  color: #c85d00;
  font-size: 0.74rem;
}
.concurrent-result { margin-top: 18px; }
.concurrent-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.concurrent-result-card {
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}
.concurrent-result-card.success { background: #e8f8ed; border: 2px solid #5ae08a; }
.concurrent-result-card.fail { background: #ffe8e8; border: 2px solid #ff8a8a; }
.concurrent-result-card h4 { font-size: 1rem; margin-bottom: 6px; }
.concurrent-result-card p { font-size: 0.78rem; }
.concurrent-summary {
  padding: 10px 14px;
  border-radius: 8px;
  background: #f0f0f8;
  font-size: 0.74rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* -- Location Banner -- */
.location-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 12px 0;
  border-radius: 10px;
  background: #f0f0f8;
  border: 2px solid #ddd;
  font-size: 0.85rem;
  transition: all 0.3s;
}
.location-banner .loc-pin { font-size: 1.1rem; }
.location-banner .loc-text { font-weight: 600; color: var(--text); }
.location-banner .loc-status { margin-left: auto; font-size: 0.78rem; color: var(--text-light); }
.location-banner.at-home {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-color: #66bb6a;
  box-shadow: 0 2px 8px rgba(102, 187, 106, 0.3);
}
.location-banner.at-home .loc-text { color: #2e7d32; }
.location-banner.at-home .loc-status { color: #388e3c; }
.location-banner.at-other {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-color: #ffa726;
  box-shadow: 0 2px 8px rgba(255, 167, 38, 0.3);
}
.location-banner.at-other .loc-text { color: #e65100; }
.location-banner.at-other .loc-status { color: #f57c00; }

/* -- Steal Button Disabled -- */
#btn-steal-mode:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

/* -- Visit Player Modal -- */
.modal-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 8px 0 14px;
}
.player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}
.player-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.player-list-item:hover {
  background: #e8f5e9;
  border-color: #66bb6a;
  transform: translateX(4px);
}
.player-list-item .pli-name { font-weight: 600; }
.player-list-item .pli-info { font-size: 0.78rem; color: var(--text-light); }

/* -- Concurrent Hint -- */
.concurrent-hint {
  padding: 12px 16px;
  border-radius: 8px;
  background: #f0f4ff;
  color: var(--text-light);
  font-size: 0.82rem;
  text-align: center;
  margin-bottom: 12px;
}

/* -- Responsive -- */
@media (max-width: 900px) {
  .demo-layout { grid-template-columns: 1fr; }
  .feature-cards { grid-template-columns: repeat(2, 1fr); }
  .code-compare { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .feature-cards { grid-template-columns: 1fr; }
  .panel-actions { grid-template-columns: 1fr 1fr; }
  .farm-grid-local { gap: 6px; padding: 10px; }
  .concurrent-results { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .panel-secondary-actions { grid-template-columns: 1fr; }
  .panel-stats { flex-direction: column; gap: 8px; }
  .ps-card { justify-content: center; }
}

/* -- Farm badge in hero -- */
.hero-desc code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  background: rgba(255,255,255,0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ╔═══════════════════════════════════════════════════════════╗
   /* ═══ TERMINAL PAGE STYLES ═══ */
   /* ╚═══════════════════════════════════════════════════════════╝ */

.terminal-page { max-width: 1000px; }

/* Mini terminal in hero */
.terminal-mini {
  background: #1a1b26;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  width: 280px;
  border: 1px solid #333;
}
.tm-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #2a2b3d;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #888;
}
.tm-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.t-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: #6c7294;
  line-height: 1.4;
}
.t-line.ok { color: #5cc27e; }

/* Terminal Hero */
.terminal-hero { padding-bottom: 20px; }

/* Terminal Section */
.terminal-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.terminal-container {
  background: #1a1b26;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0,0,0,0.3);
  border: 1px solid #2a2b3d;
}

/* Terminal Header */
.term-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #2a2b3d;
  border-bottom: 1px solid #333;
}
.term-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.term-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #888;
}

/* Terminal Output */
.terminal-output {
  padding: 16px 20px;
  height: 280px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #c0c5e0;
  scroll-behavior: smooth;
}
.term-line { display: flex; gap: 8px; flex-wrap: wrap; }
.term-line.welcome { color: #7aa2f7; font-weight: 600; }
.term-line.info { color: #5cc27e; }
.term-line.result { color: #c0c5e0; }
.term-line.error { color: #f7768e; }
.term-line.thread { color: #bb9af7; }  /* synchronized/thread logs */
.term-line.server { color: #e0af68; }   /* server broadcasts */
.term-line.steal-ok { color: #9ece6a; } /* successful steal */
.term-line.steal-fail { color: #f7768e; } /* failed steal */
.term-prompt { color: #7aa2f7; font-weight: 600; }
.term-welcome { font-size: 0.7rem; white-space: pre; }

/* Quick Button Bar */
.term-quickbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #222338;
  border-top: 1px solid #333;
  flex-wrap: wrap;
}
.qk-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.qk-btn {
  padding: 4px 10px;
  border: 1px solid #444;
  border-radius: 4px;
  background: #2a2b3d;
  color: #9aa5ce;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.2s;
}
.qk-btn:hover {
  background: #3b3d54;
  border-color: #7aa2f7;
  color: #7aa2f7;
}

/* Terminal Input */
.term-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #16172e;
  border-top: 1px solid #333;
}
.term-prompt-arrow { color: #5cc27e; font-weight: 700; font-size: 0.9rem; }
.term-tilde { color: #7aa2f7; font-weight: 600; font-size: 0.85rem; }
.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #c0c5e0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}
.term-input::placeholder { color: #555; }
.term-send {
  padding: 6px 14px;
  border: 1px solid #444;
  border-radius: 4px;
  background: #2a2b3d;
  color: #9aa5ce;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  cursor: pointer;
}
.term-send:hover { background: #3b3d54; border-color: #5cc27e; color: #5cc27e; }

/* Farm Display (below terminal input) */
.farm-display {
  padding: 16px 20px;
  background: #12131f;
  border-top: 1px solid #333;
}
.farm-display.hidden { display: none; }
.fd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}
.fd-title { color: #e0af68; font-weight: 600; }
.fd-player { color: #7aa2f7; }
.fd-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #9aa5ce;
}

/* Farm Grid in terminal */
.farm-grid-term {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 320px;
}
.farm-grid-term .fc {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid #333;
  transition: all 0.3s;
}
.farm-grid-term .fc.empty { background: #2a2b3d; }
.farm-grid-term .fc.growing { background: #3b4a3c; border-color: #5c8a3a; }
.farm-grid-term .fc.ripe { background: #4a4532; border-color: #c4a43a; animation: ripeGlow 2s infinite; }
@keyframes ripeGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,200,50,0.3); }
  50% { box-shadow: 0 0 8px 2px rgba(255,200,50,0.2); }
}

/* Command Reference */
.cmd-reference {
  background: #f8f9ff;
  border-radius: 14px;
  padding: 20px;
}
.cmd-reference h3 {
  font-size: 0.95rem;
  margin-bottom: 14px;
  color: var(--text);
}
.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: white;
  border-radius: 8px;
  font-size: 0.78rem;
}
.cmd-item code {
  font-family: 'JetBrains Mono', monospace;
  background: #eef;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--purple);
  font-size: 0.7rem;
  white-space: nowrap;
}
.cmd-item span { color: var(--text-light); }

/* Concurrency Explained */
.concurrency-explained { margin-top: 50px; }
.conc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.conc-card {
  padding: 18px;
  background: white;
  border-radius: 14px;
  border: 1px solid #eef0f8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.conc-icon { font-size: 1.5rem; margin-bottom: 8px; display: block; }
.conc-card h4 { font-size: 0.85rem; margin-bottom: 6px; }
.conc-card p { font-size: 0.75rem; color: var(--text-light); line-height: 1.5; margin-bottom: 10px; }
.conc-code {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  background: #1a1b26;
  color: #5cc27e;
  padding: 4px 8px;
  border-radius: 4px;
}

/* ===== HYBRID PAGE (Terminal + JavaFX GUI) ===== */
.hybrid-page { max-width: 1400px; }

.hybrid-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  background: linear-gradient(135deg, #1a1740 0%, #342c78 40%, var(--purple) 100%);
}

.hybrid-visual { display: flex; justify-content: center; align-items: center; }

.hybrid-preview {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transform: scale(0.85);
  transform-origin: center;
}

.hp-terminal {
  width: 220px;
  background: #1a1b26;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  font-family: 'JetBrains Mono', monospace;
}
.hp-term-h {
  background: #2d2d3d;
  padding: 6px 10px;
  display: flex;
  gap: 5px;
}
.hp-term-line {
  padding: 3px 10px;
  font-size: 0.65rem;
  color: #c0c5d8;
  line-height: 1.4;
}
.hp-term-line.ok { color: #5cc27e; }

.hp-javafx {
  width: 200px;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.hp-jfx-h {
  background: linear-gradient(180deg, #4a90d9, #357abd);
  color: white;
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 600;
}
.hp-jfx-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 6px;
}
.hp-cell {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  background: #8bc34a;
  border-radius: 2px;
}
.hp-cell.ripe { background: #ffd54f; }

/* Hybrid Layout */
.hybrid-section { margin-top: 40px; }

.hybrid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* Terminal Box */
.hybrid-terminal {
  position: sticky;
  top: 100px;
}

.term-box {
  background: #1a1b26;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  border: 1px solid #2d2d4a;
}

.term-box-header {
  background: #2d2d3d;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #3d3d5a;
}

.term-dots { display: flex; gap: 6px; }
.term-dots .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.term-box-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #8888aa;
}

.terminal-output {
  height: 380px;
  overflow-y: auto;
  padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #c0c5d8;
}

.term-line { margin-bottom: 2px; }
.term-line.welcome { color: #7a8199; font-size: 0.7rem; }
.term-line.welcome .term-welcome { color: #5cc27e; }
.term-line.ok { color: #5cc27e; }
.term-line.err { color: #ff6b6b; }
.term-line.warn { color: #ffbd2e; }
.term-line.thread { color: #c084fc; }
.term-line.echo { color: #7dd3fc; }
.term-line.info { color: #8899aa; }

.term-line code {
  background: #2d2d4a;
  padding: 1px 5px;
  border-radius: 3px;
  color: #7dd3fc;
  font-size: 0.72rem;
}

.term-prompt { color: #5cc27e; margin-right: 6px; }

/* Quickbar */
.term-quickbar {
  padding: 8px 14px;
  border-top: 1px solid #2d2d4a;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: #1e1f2e;
}

.qk-label {
  font-size: 0.65rem;
  color: #6666888;
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.qk-btn {
  background: #2d2d4a;
  border: 1px solid #3d3d5a;
  color: #8899aa;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.15s;
}

.qk-btn:hover {
  background: #3d3d5a;
  color: #c0c5d8;
  border-color: #5cc27e;
}

/* Input Row */
.term-input-row {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border-top: 1px solid #2d2d4a;
  background: #161722;
  gap: 8px;
}

.term-prompt-arrow {
  color: #5cc27e;
  font-size: 0.9rem;
  font-weight: bold;
}

.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #c0c5d8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  caret-color: #5cc27e;
}

.term-input::placeholder { color: #444466; }

.term-send {
  background: #2d2d4a;
  border: 1px solid #3d3d5a;
  color: #5cc27e;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.term-send:hover {
  background: #5cc27e;
  color: #1a1b26;
}

/* JavaFX Window */
.hybrid-javafx {
  position: sticky;
  top: 100px;
}

.javafx-window {
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  border: 1px solid #ccc;
  font-family: 'Segoe UI', 'Noto Sans SC', sans-serif;
}

/* JavaFX Title Bar */
.jfx-titlebar {
  background: linear-gradient(180deg, #4a90d9, #357abd);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
}

.jfx-icon { font-size: 0.9rem; }
.jfx-title { flex: 1; }
.jfx-controls { display: flex; gap: 4px; }
.jfx-ctrl {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 0.6rem;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
}
.jfx-ctrl:hover { background: rgba(255,255,255,0.3); }
.jfx-ctrl.close:hover { background: #e81123; }

/* JavaFX Menu Bar */
.jfx-menubar {
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  padding: 4px 10px;
  display: flex;
  gap: 16px;
}

.jfx-menu {
  font-size: 0.72rem;
  color: #444;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
}
.jfx-menu:hover { background: #ddd; }

/* JavaFX Content */
.jfx-content {
  padding: 12px;
  background: #e8e8e8;
}

/* Info Bar */
.jfx-info-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
  background: white;
  border-radius: 6px;
  padding: 8px 10px;
  border: 1px solid #ddd;
}

.jfx-info-item {
  display: flex;
  gap: 4px;
  align-items: center;
}

.jfx-info-label {
  font-size: 0.68rem;
  color: #888;
  font-weight: 500;
}

.jfx-info-value {
  font-size: 0.72rem;
  color: #333;
  font-weight: 600;
}

/* Farm Grid */
.jfx-grid-area {
  background: white;
  border-radius: 6px;
  padding: 10px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
}

.jfx-grid-label {
  font-size: 0.72rem;
  color: #666;
  margin-bottom: 6px;
  font-weight: 600;
}

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

.jfx-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border-radius: 4px;
  background: #8bc34a;
  transition: all 0.2s;
  border: 1px solid rgba(0,0,0,0.1);
}

.jfx-cell.empty { background: #a5d66a; }
.jfx-cell.sprout { background: #66bb6a; }
.jfx-cell.ripe {
  background: #ffd54f;
  animation: ripePulse 1.5s ease-in-out infinite;
}

@keyframes ripePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 213, 79, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(255, 213, 79, 0); }
}

/* Action Buttons */
.jfx-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.jfx-btn {
  flex: 1;
  min-width: 70px;
  padding: 7px 8px;
  border: 1px solid #bbb;
  border-radius: 5px;
  background: linear-gradient(180deg, #fff, #e8e8e8);
  font-size: 0.7rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.jfx-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #e8f0fe, #d2e3fc);
  border-color: #4a90d9;
}

.jfx-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.jfx-btn.steal:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffe0e0, #ffcdd2);
  border-color: #e53935;
}

.jfx-btn.home:hover:not(:disabled) {
  background: linear-gradient(180deg, #e0f2f1, #b2dfdb);
  border-color: #4db6ac;
}

/* Status Bar */
.jfx-statusbar {
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.68rem;
  color: #666;
}

/* ═══ WALKTHROUGH ═══ */
.walkthrough-section { margin-top: 30px; }

.walkthrough {
  background: white;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #e0e4f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.wt-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wt-step {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  background: #f8f9ff;
  border-radius: 10px;
  border: 1px solid #e8ebf5;
  transition: all 0.2s;
  cursor: pointer;
}

.wt-step:hover {
  border-color: #4a90d9;
  background: #f0f4ff;
}

.wt-step.active {
  border-color: #5cc27e;
  background: #f0fff4;
  box-shadow: 0 0 0 2px rgba(92, 194, 126, 0.15);
}

.wt-step.done {
  opacity: 0.6;
}

.wt-step.done .wt-num {
  background: #5cc27e;
  color: white;
}

.wt-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: #4a90d9;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.wt-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wt-cmd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  min-width: 140px;
}

.wt-cmd code {
  background: #1a1b26;
  color: #5cc27e;
  padding: 3px 8px;
  border-radius: 4px;
}

.wt-desc {
  flex: 1;
  font-size: 0.72rem;
  color: #666;
  line-height: 1.4;
  min-width: 200px;
}

.wt-desc code {
  background: #eef;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.68rem;
  color: #555;
}

.wt-run {
  padding: 5px 14px;
  background: #4a90d9;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.wt-run:hover {
  background: #357abd;
  transform: scale(1.05);
}

.wt-step.active .wt-run {
  background: #5cc27e;
}

/* Auto-run */
.wt-auto {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed #ddd;
}

.wt-autorun-btn {
  padding: 8px 20px;
  background: linear-gradient(135deg, #4a90d9, #357abd);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.wt-autorun-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.wt-autorun-btn.running {
  background: linear-gradient(135deg, #e53935, #c62828);
}

.wt-auto-hint {
  font-size: 0.7rem;
  color: #999;
}

/* Responsive */
@media (max-width: 600px) {
  .terminal-mini { display: none; }
  .cmd-grid { grid-template-columns: 1fr; }
  .conc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .hybrid-layout {
    grid-template-columns: 1fr;
  }
  .hybrid-terminal, .hybrid-javafx {
    position: static;
  }
  .hybrid-hero {
    grid-template-columns: 1fr;
  }
  .hybrid-preview {
    transform: scale(0.7);
  }
  .rules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

