/* ==========================================================================
   소녀들의 사계절 농장 (Stardew Valley Harvest) - CSS Styling
   ========================================================================== */

:root {
  --bg-main: #f5f0e6;
  --bg-card: #ffffff;
  --bg-panel: #fffdfa;
  --border-wood: #8d5b34;
  --border-light: #e4d7c5;
  --primary-green: #488b49;
  --primary-green-hover: #3b743c;
  --soil-dry: #9c6c44;
  --soil-wet: #5d3a1e;
  --gold-accent: #f5a623;
  --gold-light: #ffea79;
  --water-blue: #3b88c3;
  --heart-red: #e0475b;
  --text-dark: #2c2523;
  --text-muted: #796c64;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 3px 6px rgba(0,0,0,0.08);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.12);
  --shadow-popup: 0 12px 32px rgba(0,0,0,0.25);
  --font-main: 'Noto Sans KR', sans-serif;
  --font-deco: 'Gaegu', cursive, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #2b3a2f;
  background: radial-gradient(circle at center, #3d5240 0%, #1e281f 100%);
  font-family: var(--font-main);
  color: var(--text-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 10px;
  overflow-x: hidden;
}

#game-container {
  width: 100%;
  max-width: 900px;
  min-height: 850px;
  background-color: var(--bg-main);
  border: 4px solid var(--border-wood);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   TOP HUD BAR
   -------------------------------------------------------------------------- */
#top-hud {
  background: #3e2817;
  background: linear-gradient(180deg, #513620 0%, #3a2515 100%);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #734a29;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 10;
}

.hud-left, .hud-center, .hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 10px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.avatar-icon {
  font-size: 24px;
}

.farm-title {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-title {
  background: var(--gold-accent);
  color: #3e2817;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 900;
}

.level-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.level-label {
  font-weight: 700;
  color: var(--gold-light);
}

.exp-bar {
  width: 70px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

#exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #6fd96f, #b9f36b);
  transition: width 0.3s ease;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gold-pill .pill-val { color: var(--gold-light); }
.rep-pill .pill-val { color: #ff9aa8; }
.water-pill .pill-val { color: #8fd0ff; }

.season-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
}

#season-icon {
  font-size: 18px;
}

.season-text {
  line-height: 1.2;
}

.season-text small {
  display: block;
  font-size: 9px;
  color: #d1dfcf;
}

.hud-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.icon-btn.highlight {
  background: var(--gold-accent);
  color: #3e2817;
  border-color: #ffd678;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(245, 166, 35, 0); }
}

/* --------------------------------------------------------------------------
   ZONE NAVIGATION TABS
   -------------------------------------------------------------------------- */
#zone-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #dec8ae;
  border-bottom: 3px solid var(--border-wood);
  padding: 4px 6px 0 6px;
  gap: 4px;
}

.zone-tab {
  background: #cbb294;
  border: 2px solid #8d5b34;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 8px 4px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 13px;
  color: #4f341d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  transition: background 0.2s, transform 0.15s;
}

.zone-tab:hover {
  background: #dbcaa8;
}

.zone-tab.active {
  background: var(--bg-main);
  color: #2c1a0c;
  border-color: var(--border-wood);
  font-weight: 900;
  transform: translateY(-2px);
  box-shadow: 0 -2px 6px rgba(0,0,0,0.06);
}

.tab-badge {
  position: absolute;
  top: -4px;
  right: 6px;
  background: #e0475b;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 900;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tab-badge.harvest-ready {
  background: #488b49;
  animation: bounce 1.2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* --------------------------------------------------------------------------
   MAIN VIEWPORT & PAGES
   -------------------------------------------------------------------------- */
#zone-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background-color: var(--bg-main);
}

.zone-page {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.zone-page.active {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   ZONE BANNER & CHARACTER OVERLAY
   -------------------------------------------------------------------------- */
.zone-banner {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 3px solid var(--border-wood);
  box-shadow: var(--shadow-md);
  background: #000;
}

.banner-img-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(1.08) contrast(1.02);
  transition: transform 0.4s ease;
}

.banner-img-wrap:hover .banner-img {
  transform: scale(1.02);
}

.character-overlay {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.speech-bubble {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #5b3a1e;
  border-radius: 14px;
  padding: 8px 14px;
  font-family: var(--font-deco);
  font-size: 16px;
  font-weight: 700;
  color: #2e1d0e;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  pointer-events: auto;
  cursor: pointer;
  line-height: 1.35;
  transition: transform 0.15s;
}

.speech-bubble:hover {
  transform: scale(1.02);
  background: #fff;
}

.char-tag {
  align-self: flex-start;
  background: #4a2d16;
  color: #ffdf94;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #7a4f2b;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* --------------------------------------------------------------------------
   ZONE CONTENT & HEADER BAR
   -------------------------------------------------------------------------- */
.zone-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zone-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 10px;
}

.zone-desc h3 {
  font-size: 15px;
  color: #3b2515;
  font-weight: 900;
  margin-bottom: 2px;
}

.zone-desc p {
  font-size: 12px;
  color: var(--text-muted);
}

.zone-quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

.action-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.primary-btn {
  background: #8d5b34;
  color: #fff;
  border-color: #633c1d;
}
.primary-btn:hover { background: #9d683d; }

.special-btn {
  background: #f5a623;
  color: #3e2608;
  border-color: #d18811;
}
.special-btn:hover { background: #ffb438; }

.water-btn {
  background: #3b88c3;
  color: #fff;
  border-color: #246497;
}
.water-btn:hover { background: #4a9bd9; }

.plant-btn {
  background: var(--primary-green);
  color: #fff;
  border-color: #306531;
}
.plant-btn:hover { background: var(--primary-green-hover); }

.harvest-btn {
  background: #e65100;
  color: #fff;
  border-color: #b23c00;
}
.harvest-btn:hover { background: #f55d0a; }

.sub-btn {
  background: #e8ded2;
  color: #533924;
  border-color: #cfbfad;
}
.sub-btn:hover { background: #f0e7dd; }

.gold-btn {
  background: linear-gradient(180deg, #ffc107 0%, #e0a800 100%);
  color: #3e2817;
  border-color: #b38600;
}

.heart-btn {
  background: #ff5e7e;
  color: #fff;
  border-color: #d43b5a;
}

/* --------------------------------------------------------------------------
   FARM GRID & PLOT TILES
   -------------------------------------------------------------------------- */
.farm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  background: #bfa181;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 3px solid #7d522e;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.15);
}

.plot-card {
  background: #8d5b34;
  border: 3px solid #5d3a1e;
  border-radius: var(--radius-sm);
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 6px rgba(0,0,0,0.18);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  overflow: hidden;
}

.plot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
  border-color: #f5a623;
}

.plot-card:active {
  transform: translateY(1px);
}

/* 상태별 플롯 스타일 */
.plot-card.untilled {
  background: #736b5e;
  border-color: #4a443b;
}

.plot-card.tilled {
  background: #82542e;
  border-color: #573418;
}

.plot-card.fertilized {
  background: #6a472c;
  border-color: #e5a93b;
  box-shadow: inset 0 0 10px rgba(245, 166, 35, 0.4);
}

.plot-card.watered {
  background: #4a2c16;
  border-color: #40a9ff;
  box-shadow: inset 0 0 12px rgba(64, 169, 255, 0.5);
}

.plot-card.ready-harvest {
  border-color: #52c41a;
  box-shadow: 0 0 14px rgba(82, 196, 26, 0.6);
  animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.plot-icon {
  font-size: 38px;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.plot-card:hover .plot-icon {
  transform: scale(1.1);
}

.plot-card.ready-harvest .plot-icon {
  animation: crop-wiggle 1.2s infinite ease-in-out;
}

@keyframes crop-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}

.plot-status-label {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  margin-top: 4px;
  text-align: center;
}

.plot-progress-bar {
  width: 90%;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}

.plot-progress-fill {
  height: 100%;
  background: #52c41a;
  border-radius: 4px;
  transition: width 0.2s ease;
}

.plot-water-indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 14px;
}

.plot-soil-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 9px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffdf94;
  padding: 1px 4px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   STATS CARD (ZONE 1)
   -------------------------------------------------------------------------- */
.till-stats-card {
  display: flex;
  justify-content: space-around;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.stat-item .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 6px;
}

.stat-item .val {
  font-size: 13px;
  font-weight: 700;
  color: #3b2515;
}

.stat-item .val.highlight {
  color: #8d5b34;
}

/* --------------------------------------------------------------------------
   SEED SELECTION TRAY (ZONE 2)
   -------------------------------------------------------------------------- */
.seed-tray-container {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
}

.tray-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #3b2515;
  margin-bottom: 8px;
}

.tray-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.seed-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.seed-card {
  flex: 0 0 110px;
  background: #fcf8f2;
  border: 2px solid #dfcfbc;
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.seed-card:hover {
  background: #fdf2e2;
  border-color: #f5a623;
  transform: translateY(-2px);
}

.seed-card.selected {
  border-color: var(--primary-green);
  background: #eef7ed;
  box-shadow: 0 0 8px rgba(72, 139, 73, 0.4);
}

.seed-icon {
  font-size: 26px;
  margin-bottom: 2px;
}

.seed-name {
  font-size: 12px;
  font-weight: 700;
  color: #3b2515;
}

.seed-info {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.seed-cost {
  font-size: 11px;
  font-weight: 700;
  color: #b57a1e;
  margin-top: 4px;
}

.seed-locked {
  opacity: 0.55;
  filter: grayscale(0.8);
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   HARVEST & COOP LAYOUT (ZONE 3)
   -------------------------------------------------------------------------- */
.fever-gauge-wrap {
  background: linear-gradient(90deg, #3d2210, #5d2f0d);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  border: 2px solid #8d4f18;
}

.fever-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.fever-mult {
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 900;
}

.fever-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  overflow: hidden;
}

#fever-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff9800, #ffeb3b, #ff5722);
  transition: width 0.15s ease;
}

.harvest-flex-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 650px) {
  .harvest-flex-layout {
    grid-template-columns: 1fr;
  }
}

.harvest-box, .coop-box {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
}

.box-header h3 {
  font-size: 14px;
  color: #3b2515;
  font-weight: 800;
}

.coop-level {
  font-size: 11px;
  background: #e8ded2;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  color: #553b26;
}

.harvest-plots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.ready-crop-item {
  background: #fdf5ea;
  border: 2px solid #e7c69d;
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.12s;
}

.ready-crop-item:hover {
  background: #ffebd2;
  transform: scale(1.05);
  border-color: #f5a623;
}

.ready-crop-icon {
  font-size: 30px;
}

.ready-crop-name {
  font-size: 11px;
  font-weight: 700;
  color: #3b2515;
  margin-top: 2px;
}

.coop-scene {
  background: #efe4d3;
  border: 2px solid #d4c0a5;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.chicken-family {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hen-sprite {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.hen-sprite:hover {
  transform: scale(1.08);
}

.hen-icon {
  font-size: 46px;
  animation: cluck 2s infinite ease-in-out;
}

@keyframes cluck {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-5deg); }
  40% { transform: rotate(5deg); }
}

.hen-name {
  font-size: 11px;
  font-weight: 800;
  color: #3e2608;
}

.hen-mood {
  font-size: 10px;
  color: #7d522e;
}

.chicks-group {
  display: flex;
  gap: 6px;
  font-size: 18px;
}

.chick-icon {
  animation: chick-hop 1.5s infinite alternate;
}

.chick2 { animation-delay: 0.3s; }
.chick3 { animation-delay: 0.6s; }

@keyframes chick-hop {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.nest-box {
  background: #dfcfba;
  border: 2px dashed #a4825d;
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  min-height: 100px;
  justify-content: center;
  gap: 6px;
}

.nest-title {
  font-size: 11px;
  font-weight: 700;
  color: #4f3319;
}

.eggs-container {
  display: flex;
  gap: 4px;
  font-size: 20px;
  min-height: 28px;
  align-items: center;
}

.empty-nest-text {
  font-size: 10px;
  color: #7b624a;
}

.coop-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.inventory-basket-card {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.inventory-basket-card h4 {
  font-size: 13px;
  color: #3b2515;
  margin-bottom: 8px;
}

.inv-items-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.inv-item-pill {
  background: #fdf8f0;
  border: 1px solid #dfcfbc;
  border-radius: 20px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.inv-item-count {
  background: #5d3a1e;
  color: #fff;
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   MARKET & COMMERCE LAYOUT (ZONE 4)
   -------------------------------------------------------------------------- */
.market-sub-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 6px;
}

.sub-tab {
  background: #e8ded2;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  color: #553b26;
  cursor: pointer;
  transition: all 0.15s;
}

.sub-tab:hover {
  background: #dfcfbc;
}

.sub-tab.active {
  background: #8d5b34;
  color: #fff;
}

.market-sub-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.market-sub-panel.active {
  display: flex;
}

.panel-header-desc {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-header-desc h3 {
  font-size: 14px;
  color: #3b2515;
  font-weight: 800;
}

.panel-header-desc p {
  font-size: 11px;
  color: var(--text-muted);
}

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.order-card {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.order-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-requester-avatar {
  font-size: 24px;
}

.order-requester-title {
  font-size: 12px;
  font-weight: 800;
  color: #3b2515;
}

.order-requirements {
  background: #fdf8f0;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.req-item {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.req-item.fulfilled {
  color: #2e7d32;
}

.req-item.unfulfilled {
  color: #c62828;
}

.order-rewards {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  border-top: 1px dashed var(--border-light);
  padding-top: 6px;
}

.order-reward-val {
  color: #b57a1e;
}

.sales-grid, .upgrades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.sale-item-card, .upgrade-card {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.sale-item-icon, .upgrade-icon {
  font-size: 32px;
}

.sale-item-name, .upgrade-name {
  font-size: 13px;
  font-weight: 800;
  color: #3b2515;
}

.sale-item-price, .upgrade-cost {
  font-size: 12px;
  font-weight: 700;
  color: #b57a1e;
}

.upgrade-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   MODALS & POPUPS
   -------------------------------------------------------------------------- */
.game-modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  background: #fffdfa;
  border: 4px solid var(--border-wood);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-popup);
  overflow: hidden;
  z-index: 101;
  animation: modalPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  background: #513620;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #734a29;
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 800;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.help-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step-num {
  background: #8d5b34;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-step p {
  font-size: 12px;
  color: var(--text-dark);
  line-height: 1.4;
  margin-top: 2px;
}

.help-tip-box {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #795548;
}

.quest-item, .achievement-item {
  background: #fdf8f0;
  border: 1px solid #e2d3c2;
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.quest-info h4, .achievement-info h4 {
  font-size: 12px;
  color: #3b2515;
}

.quest-info p, .achievement-info p {
  font-size: 11px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   FLOATING PARTICLES & TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
#toast-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  pointer-events: none;
  z-index: 200;
}

.toast {
  background: rgba(35, 23, 13, 0.9);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  animation: toastFade 2.5s forwards ease;
}

@keyframes toastFade {
  0% { opacity: 0; transform: translateY(10px); }
  15% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-15px); }
}

#particle-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 150;
}

.floating-text {
  position: absolute;
  font-family: var(--font-deco);
  font-size: 20px;
  font-weight: 900;
  color: #ffd54f;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 8px rgba(255, 213, 79, 0.8);
  pointer-events: none;
  animation: floatUp 1.2s forwards ease-out;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-50px) scale(1.3); }
}

/* --------------------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  #top-hud {
    padding: 8px 10px;
  }
  .profile-badge {
    padding: 2px 6px;
  }
  .farm-title {
    font-size: 11px;
  }
  .zone-tab .tab-title {
    font-size: 11px;
  }
  .banner-img-wrap {
    height: 170px;
  }
  .speech-bubble {
    font-size: 14px;
    padding: 6px 10px;
  }
  .farm-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px;
  }
  .plot-card {
    height: 115px;
    padding: 4px;
  }
  .plot-icon {
    font-size: 28px;
  }
}
