/**
 * Clean Market Ghana - Main Stylesheet
 * Version 1.0.0
 */

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

html {
  font-size: 16px;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f5f0e8;
  color: #2d2d2d;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Color Palette (Ghana-inspired) ===== */
:root {
  --green: #006B3F;
  --gold: #FCD116;
  --red: #CE1126;
  --earth-brown: #8B6914;
  --warm-orange: #E85D26;
  --sky-blue: #4A90D9;
  --dark: #2d2d2d;
  --light: #f5f0e8;
  --card-bg: #ffffff;
  --border: #d4c9a8;
  --success: #4CAF50;
  --warning: #FF9800;
  --danger: #F44336;
  --info: #2196F3;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.2);
}

/* ===== Game Container ===== */
#game-container {
  max-width: 1366px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ===== Screens ===== */
.game-screen {
  display: none;
  padding: 20px;
  overflow-y: auto;
}

.game-screen.active {
  display: flex;
  flex-direction: column;
}

/* === Desktop: screens fill viewport exactly === */
@media (min-width: 769px) {
  #game-container {
    height: 100vh;
    overflow: hidden;
  }
  .game-screen {
    flex: 1 1 0;
    min-height: 0;
  }
}

/* ===== Splash Screen ===== */
.screen-splash {
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, var(--green) 0%, #004d2e 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.splash-logo {
  width: 180px;
  height: 180px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.splash-logo-text {
  font-size: 2rem;
  font-weight: bold;
  color: var(--green);
}

.splash-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.splash-subtitle {
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.splash-course {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 32px;
}

.splash-loading {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ===== Main Menu ===== */
.screen-main-menu {
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--light);
}

.menu-header {
  margin-bottom: 32px;
}

.menu-title {
  font-size: 2.2rem;
  color: var(--green);
  font-weight: bold;
  margin-bottom: 4px;
}

.menu-subtitle {
  font-size: 1.2rem;
  color: var(--earth-brown);
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  width: 100%;
}

.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.4;
  font-weight: 500;
}

.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--green);
  color: white;
}

.btn-primary:hover {
  background: #004d2e;
}

.btn-secondary {
  background: var(--border);
  color: var(--dark);
}

.btn-secondary:hover {
  background: #c4b88a;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c62828;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-disabled, .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-action {
  background: var(--sky-blue);
  color: white;
  font-size: 1.1rem;
  padding: 14px 24px;
}

.btn-action:hover {
  background: #3a7bc8;
}

.btn-action.task-completed {
  background: var(--success);
  opacity: 0.7;
}

.menu-extras {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.2rem;
  background: var(--card-bg);
  border: 2px solid var(--border);
  color: var(--dark);
}

.btn-icon:hover {
  background: var(--gold);
}

/* ===== Player Setup ===== */
.screen-setup {
  justify-content: center;
  align-items: center;
}

.setup-form {
  max-width: 500px;
  width: 100%;
  background: var(--card-bg);
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--green);
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--green);
  outline: none;
}

.difficulty-options {
  display: flex;
  gap: 10px;
}

.btn-difficulty {
  flex: 1;
  padding: 12px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  color: var(--dark);
  text-align: left;
  line-height: 1.3;
  font-size: 0.9rem;
  border-radius: 8px;
}

.btn-difficulty:hover {
  border-color: var(--green);
}

.btn-difficulty-selected {
  border-color: var(--green);
  background: #e8f5e9;
  color: var(--green);
}

.btn-start {
  width: 100%;
  font-size: 1.2rem;
  padding: 16px;
  margin-top: 8px;
}

/* ===== Introduction ===== */
.screen-introduction {
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, var(--light) 0%, #e8dfc8 100%);
}

.intro-panel {
  max-width: 600px;
  width: 100%;
  background: var(--card-bg);
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  text-align: center;
}

.intro-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.intro-title {
  font-size: 1.5rem;
  color: var(--green);
  margin-bottom: 12px;
}

.intro-text {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.intro-character {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f0f0f0;
  border-radius: 8px;
  margin-bottom: 16px;
}

.char-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.char-name {
  font-weight: 600;
}

.intro-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.intro-progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}

.intro-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.intro-dot.active {
  background: var(--green);
}

/* ===== Dashboard ===== */
.screen-dashboard {
  padding: 16px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--green);
  color: white;
  border-radius: 8px;
}

.dashboard-title {
  font-size: 1.3rem;
  font-weight: bold;
}

.dashboard-day {
  font-size: 1rem;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--card-bg);
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 1px 4px var(--shadow);
  text-align: center;
}

.stat-label {
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--dark);
}

.stat-bar {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.stat-bar-fill.budget { background: var(--gold); }
.stat-bar-fill.cleanliness { background: var(--success); }
.stat-bar-fill.gutter { background: var(--sky-blue); }
.stat-bar-fill.trader { background: var(--warm-orange); }
.stat-bar-fill.diversion { background: var(--green); }
.stat-bar-fill.health { background: #e91e63; }
.stat-bar-fill.score { background: var(--earth-brown); }

.dashboard-middle {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.market-map {
  flex: 1;
  background: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  min-height: 300px;
  position: relative;
}

.market-map-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--green);
  margin-bottom: 12px;
}

/* Market Visual Zones */
.market-visual {
  position: relative;
  width: 100%;
  height: 280px;
  background: #f5edd6;
  border-radius: 8px;
  overflow: hidden;
}

.market-zone {
  position: absolute;
  border-radius: 6px;
  padding: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.5s ease;
  cursor: default;
}

.market-zone.bad {
  background: rgba(244, 67, 54, 0.3);
  border: 2px solid var(--danger);
  color: #c62828;
}

.market-zone.fair {
  background: rgba(255, 152, 0, 0.2);
  border: 2px solid var(--warning);
  color: #e65100;
}

.market-zone.good {
  background: rgba(76, 175, 80, 0.2);
  border: 2px solid var(--success);
  color: #2e7d32;
}

.market-zone.none {
  background: rgba(0, 0, 0, 0.05);
  border: 2px dashed #aaa;
  color: #666;
}

#mv-gutter { top: 10px; left: 5%; width: 90%; height: 30px; }
#mv-food { top: 50px; left: 5%; width: 42%; height: 80px; }
#mv-sachet { top: 50px; left: 53%; width: 42%; height: 80px; }
#mv-chop { top: 140px; left: 5%; width: 42%; height: 60px; }
#mv-collection { top: 140px; left: 53%; width: 42%; height: 60px; }
#mv-compost { top: 210px; left: 5%; width: 28%; height: 50px; }
#mv-recycle { top: 210px; left: 38%; width: 28%; height: 50px; }
#mv-clothing { top: 210px; left: 70%; width: 25%; height: 50px; }

.dashboard-character {
  flex: 0 0 200px;
  background: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
}

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

.character-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  margin: 0 auto 8px;
}

.character-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.character-role {
  font-size: 0.8rem;
  color: #666;
}

.dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  align-items: center;
}

/* ===== Inspection ===== */
.screen-inspection {
  padding: 16px;
}

.screen-title {
  font-size: 1.5rem;
  color: var(--green);
  margin-bottom: 8px;
}

.screen-description {
  font-size: 1rem;
  color: #666;
  margin-bottom: 16px;
}

.screen-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

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

.inspection-area {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 4px var(--shadow);
}

.area-header {
  font-weight: 600;
  font-size: 1rem;
  color: var(--earth-brown);
  margin-bottom: 8px;
}

.inspection-problem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin: 4px 0;
  background: #f5f5f5;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.inspection-problem:hover {
  background: #e8f5e9;
  border-color: var(--green);
}

.inspection-problem:focus-visible {
  outline: 3px solid var(--gold);
}

.inspection-problem.found {
  background: #e8f5e9;
  border-color: var(--success);
  cursor: default;
}

.problem-icon {
  font-size: 1.2rem;
}

.problem-name {
  font-size: 0.9rem;
}

.area-clean {
  padding: 8px;
  text-align: center;
  color: var(--success);
  font-size: 0.9rem;
}

.inspection-results {
  margin-top: 16px;
  text-align: center;
  font-size: 1rem;
}

/* ===== Sorting ===== */
.screen-sorting {
  padding: 16px;
}

.sorting-progress {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sky-blue);
  margin-bottom: 16px;
  text-align: center;
}

.sorting-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sorting-item-container {
  text-align: center;
}

.sorting-item {
  display: inline-block;
  background: var(--card-bg);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
  border: 3px solid var(--border);
  text-align: center;
  min-width: 200px;
}

.sorting-item:hover {
  border-color: var(--green);
}

.sorting-item.selected-item {
  border-color: var(--green);
  background: #e8f5e9;
}

.sorting-item.dragging {
  opacity: 0.6;
}

.sorting-item-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.sorting-item-name {
  font-size: 1.2rem;
  font-weight: 600;
}

.sorting-item-desc {
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
}

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

.sorting-bin {
  background: var(--card-bg);
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 1px 4px var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  border: 3px solid var(--border);
}

.sorting-bin:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-lg);
}

.sorting-bin:focus-visible {
  outline: 3px solid var(--gold);
}

.bin-icon {
  font-size: 2rem;
}

.bin-name {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 4px;
}

.bin-label {
  font-size: 0.7rem;
  color: #666;
  margin-top: 2px;
}

.sorting-feedback {
  margin-top: 12px;
}

.feedback-correct, .feedback-incorrect {
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.feedback-correct {
  background: #e8f5e9;
  border: 2px solid var(--success);
  color: #2e7d32;
}

.feedback-incorrect {
  background: #fbe9e7;
  border: 2px solid var(--danger);
  color: #c62828;
}

.feedback-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.correct-category {
  font-weight: 600;
  margin-top: 8px;
}

.sorting-results {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  margin-top: 16px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

/* ===== Shop ===== */
.screen-shop {
  padding: 16px;
}

.shop-budget {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 16px;
  text-align: center;
  background: #2d2d2d;
  color: var(--gold);
  padding: 12px;
  border-radius: 8px;
}

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

.shop-card {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 1px 4px var(--shadow);
  transition: all 0.2s;
  border: 2px solid transparent;
}

.shop-card:hover {
  box-shadow: 0 4px 12px var(--shadow-lg);
}

.shop-card.purchased {
  border-color: var(--success);
  background: #e8f5e9;
}

.shop-card.cannot-afford {
  opacity: 0.6;
}

.shop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.shop-card-header h3 {
  font-size: 1rem;
  color: var(--dark);
}

.shop-cost {
  font-weight: 600;
  color: var(--earth-brown);
}

.shop-desc {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 8px;
}

.shop-effects {
  margin-bottom: 8px;
}

.shop-benefit {
  font-size: 0.8rem;
  color: var(--success);
}

.shop-disadvantage {
  font-size: 0.8rem;
  color: var(--warning);
}

.shop-stat-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.stat-change {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.stat-change.positive {
  background: #e8f5e9;
  color: var(--success);
}

.stat-change.negative {
  background: #fbe9e7;
  color: var(--danger);
}

.shop-purchased-badge {
  text-align: center;
  font-weight: 600;
  color: var(--success);
}

.btn-shop-buy {
  width: 100%;
}

/* ===== Decision Screen ===== */
.screen-decision {
  padding: 16px;
}

.decision-character {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f0f0f0;
  border-radius: 8px;
}

.decision-scenario {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  margin-bottom: 16px;
}

.scenario-text {
  font-size: 1.1rem;
  line-height: 1.6;
}

.decision-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-choice {
  background: var(--card-bg);
  border: 2px solid var(--border);
  padding: 12px;
  text-align: left;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  gap: 10px;
}

.btn-choice:hover {
  border-color: var(--green);
  background: #e8f5e9;
}

.btn-choice:focus-visible {
  outline: 3px solid var(--gold);
}

.choice-letter {
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--green);
}

.choice-text {
  flex: 1;
}

.decision-result {
  margin-top: 16px;
}

.feedback-panel {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
}

.feedback-best {
  border: 2px solid var(--gold);
}

.feedback-ok {
  border: 2px solid var(--sky-blue);
}

.feedback-correct {
  border: 2px solid var(--success);
}

.feedback-incorrect {
  border: 2px solid var(--danger);
}

.stat-changes-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.educational-note {
  padding: 12px;
  background: #e8f5e9;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 0.95rem;
}

/* ===== End of Day Report ===== */
.screen-report {
  padding: 16px;
  justify-content: flex-start;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.report-section {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 1px 4px var(--shadow);
}

.report-section h3 {
  font-size: 1rem;
  color: var(--green);
  margin-bottom: 8px;
}

.report-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.9rem;
}

.positive { color: var(--success); }
.negative { color: var(--danger); }

.report-lesson {
  background: #e8f5e9;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.report-lesson h3 {
  color: var(--green);
}

/* ===== Final Results ===== */
.screen-final {
  padding: 16px;
  justify-content: flex-start;
}

.final-rank {
  text-align: center;
  margin-bottom: 24px;
}

.rank-icon {
  font-size: 4rem;
}

.final-score-display {
  text-align: center;
  margin-bottom: 24px;
}

.final-score-number {
  font-size: 3rem;
  font-weight: bold;
  color: var(--green);
}

.final-score-label {
  font-size: 1rem;
  color: #666;
}

.final-stats {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  margin-bottom: 16px;
}

.final-stat {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.final-decisions {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.final-personalized {
  background: #e8f5e9;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.6;
}

/* ===== Assessment ===== */
.screen-assessment {
  padding: 16px;
}

.assessment-progress {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--sky-blue);
  margin-bottom: 16px;
}

.assessment-question {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  margin-bottom: 16px;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.5;
}

.assessment-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-assessment {
  width: 100%;
}

.assessment-short-answer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assessment-short-answer textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

.assessment-feedback {
  margin-top: 12px;
}

.assessment-score-display {
  text-align: center;
  margin-bottom: 16px;
}

.score-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--green);
}

.score-percentage {
  font-size: 1.2rem;
  color: #666;
}

.assessment-review {
  margin-bottom: 16px;
}

.review-item {
  padding: 12px;
  margin: 8px 0;
  border-radius: 8px;
}

.review-correct {
  background: #e8f5e9;
  border: 1px solid var(--success);
}

.review-incorrect {
  background: #fbe9e7;
  border: 1px solid var(--danger);
}

.review-question {
  font-weight: 600;
  margin-bottom: 4px;
}

.review-result {
  font-size: 0.9rem;
}

.review-explanation {
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
}

.learning-gain {
  background: #e8f5e9;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.learning-gain h3 {
  color: var(--green);
}

/* ===== Waste Guide ===== */
.screen-guide {
  padding: 16px;
}

.guide-principles {
  margin-bottom: 24px;
}

.guide-principles h3 {
  color: var(--green);
  margin-bottom: 12px;
}

.principle-card {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 1px 4px var(--shadow);
  margin: 8px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.principle-icon {
  font-size: 2rem;
}

.principle-card h4 {
  color: var(--green);
  margin-bottom: 4px;
}

.principle-example {
  font-size: 0.85rem;
  color: #666;
}

.guide-categories h3 {
  color: var(--green);
  margin-bottom: 12px;
}

.category-card {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 8px;
  border: 2px solid var(--border);
  margin: 8px 0;
}

.category-icon {
  font-size: 2rem;
}

.category-card h4 {
  margin-bottom: 4px;
}

.category-items {
  font-size: 0.85rem;
  color: #666;
}

.guide-item {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  margin: 2px;
}

/* ===== Objectives ===== */
.screen-objectives {
  padding: 16px;
}

.objectives-list {
  margin-bottom: 16px;
}

.objective-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--card-bg);
  border-radius: 8px;
  margin: 8px 0;
  align-items: flex-start;
}

.objective-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

/* ===== How To Play ===== */
.screen-howto {
  padding: 16px;
}

.howto-section {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 8px;
  margin: 8px 0;
}

.howto-section h3 {
  color: var(--green);
  margin-bottom: 8px;
}

.howto-section ul {
  padding-left: 20px;
  margin-top: 8px;
}

.howto-section li {
  margin: 4px 0;
  font-size: 0.95rem;
}

/* ===== Credits ===== */
.screen-credits {
  padding: 16px;
}

.credits-section {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 8px;
  margin: 8px 0;
}

.credits-section h3 {
  color: var(--green);
  margin-bottom: 8px;
}

.credit-member {
  padding: 4px 0;
}

.credits-version {
  text-align: center;
  margin-top: 16px;
  color: #666;
}

/* ===== Modal ===== */
#modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

#modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-height: 80vh;
  overflow-y: auto;
}

#modal-title {
  font-size: 1.3rem;
  color: var(--green);
  margin-bottom: 12px;
  font-weight: bold;
}

#modal-body {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

#modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ===== Notifications ===== */
#notification-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification {
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 2px 10px var(--shadow);
  animation: slideIn 0.3s ease;
  max-width: 300px;
}

.notification-info {
  background: var(--sky-blue);
  color: white;
}

.notification-success {
  background: var(--success);
  color: white;
}

.notification-error {
  background: var(--danger);
  color: white;
}

.notification-warning {
  background: var(--warning);
  color: white;
}

.notification-exit {
  animation: slideOut 0.3s ease forwards;
}

/* ===== Rain Effect (Day 5) ===== */
.rain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  background: rgba(0, 100, 200, 0.05);
}

.rain-drop {
  position: absolute;
  width: 2px;
  height: 20px;
  background: rgba(100, 150, 255, 0.3);
  animation: rainFall linear infinite;
}

/* ===== Print Styles ===== */
@media print {
  .btn, .dashboard-actions, .screen-actions, .sorting-bins, .menu-extras,
  #notification-container, #modal-overlay, .rain-overlay {
    display: none !important;
  }
  .game-screen {
    display: block !important;
  }
  body {
    background: white;
    color: black;
  }
}

/* ===== Breadcrumbs ===== */
.breadcrumb-bar {
  background: #3E2723;
  color: #FCD116;
  padding: 6px 16px;
  font-size: 0.85rem;
  min-height: 28px;
  z-index: 100;
  flex-shrink: 0;
}
.breadcrumb-bar .bc-link {
  cursor: pointer;
  color: #FFD54F;
  text-decoration: none;
}
.breadcrumb-bar .bc-link:hover { color: #fff; }
.breadcrumb-bar .bc-sep { margin: 0 4px; opacity: 0.6; }
.breadcrumb-bar .bc-current { color: #fff; font-weight: 600; }

/* ===== Sanitation Screen ===== */
.screen-sanitation {
  position: relative;
  background: #000;
  overflow: hidden;
  padding: 0;
}
.sanitation-canvas-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex: 1;
  min-height: 0;
  position: relative; /* HUD overlays relative to this */
}
#sanitation-canvas {
  border: 2px solid #5D4037;
  max-width: 100%;
  height: auto;
  display: block;
  touch-action: none; /* prevent browser scroll/zoom during gameplay */
}

/* ===== HUD ===== */
.sanitation-hud {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 90;
  padding: 8px 16px;
  background: rgba(30,20,10,0.85);
  color: #FCD116;
  font-size: 0.9rem;
  /* On desktop: overlays on canvas (absolute inside canvas-wrap) */
  /* On mobile: also overlays (absolute inside screen-sanitation above controls) */
}
.sanitation-hud.active { display: block; }
.hud-row { display: flex; justify-content: space-between; align-items: center; }
.hud-top { margin-bottom: 4px; }
.hud-left, .hud-center, .hud-right { flex: 1; text-align: center; }
.hud-left { text-align: left; }
.hud-right { text-align: right; }
.hud-objective { font-size: 0.8rem; color: #fff; }
.hud-feedback { font-size: 0.85rem; color: #81C784; max-height: 40px; overflow: hidden; }
.hud-timer.timer-warning { color: #F44336; font-weight: bold; }
.minimap { border: 1px solid #5D4037; background: #1a1a1a; margin-top: 4px; }

/* ===== Touch Controls ===== */
.sanitation-touch-controls {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 91;
  background: rgba(30, 20, 10, 0.92);
  padding: 10px 16px;
  border-top: 2px solid #5D4037;
  box-sizing: border-box;
}
.sanitation-touch-controls.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.touch-dpad {
  display: grid;
  grid-template-columns: repeat(3, 50px);
  grid-template-rows: repeat(3, 50px);
  gap: 4px;
  grid-template-areas:
    ".   up   ."
    "left .   right"
    ".   down .";
}
.touch-dpad-btn {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  width: 50px;
  height: 50px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  font-size: 1.4rem;
  line-height: 50px;
  text-align: center;
  vertical-align: middle;
  background: rgba(60,40,20,0.9);
  color: #FCD116;
  border: 3px solid #5D4037;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  box-sizing: border-box;
}
#touch-up { grid-area: up; }
#touch-left { grid-area: left; }
#touch-right { grid-area: right; }
#touch-down { grid-area: down; }
.touch-actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.touch-action-btn {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  padding: 10px 16px;
  background: rgba(0,107,63,0.9);
  color: #fff;
  border: 3px solid #006B3F;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
  text-align: center;
  min-width: 0;
  box-sizing: border-box;
}
.btn-danger-sm {
  background: rgba(244,67,54,0.9);
  border-color: #F44336;
}

/* ===== Sanitation Results Overlay ===== */
.sanitation-results-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  justify-content: center;
  align-items: center;
}
.sanitation-results-overlay.active { display: flex; }
.sanitation-results-panel {
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  text-align: center;
}
.sanitation-results-panel h2 { color: #006B3F; margin-bottom: 16px; }
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.result-item { display: flex; justify-content: space-between; padding: 4px 8px; background: #f5f0e8; border-radius: 4px; }
.result-item strong { color: #006B3F; }
.bonus-text { color: #4CAF50; font-weight: 600; margin-bottom: 12px; }

/* ===== Character Select ===== */
.screen-charSelect {
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.char-select-grid {
  display: flex;
  gap: 16px;
  margin: 16px 0;
}
.char-select-card {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  border: 3px solid #d4c9a8;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  flex: 1;
}
.char-select-card:hover { border-color: #006B3F; }
.char-select-card.selected { border-color: #006B3F; background: #e8f5e9; }
.char-select-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}
.char-select-card h3 { color: #006B3F; margin-bottom: 4px; }
.char-select-card p { font-size: 0.85rem; color: #666; }

/* ===== Leaderboard ===== */
.leaderboard { width: 100%; }
.lb-row { display: flex; justify-content: space-between; padding: 4px 8px; font-size: 0.85rem; }
.lb-header { font-weight: 600; color: #006B3F; border-bottom: 2px solid #006B3F; }
.lb-top { background: #e8f5e9; font-weight: 600; }

/* ===== Sanitation Primary Button ===== */
.btn-sanitation-primary {
  background: #006B3F;
  color: #fff;
  font-size: 1.3rem;
  padding: 16px 28px;
  border: 3px solid #FCD116;
  border-radius: 12px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 2px 8px rgba(0,107,63,0.4);
  animation: pulse 2s ease infinite;
}
.btn-sanitation-primary:hover {
  background: #004d2e;
  border-color: #fff;
}
