* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Trebuchet MS', Verdana, sans-serif;
  background: linear-gradient(180deg, #eafaf1 0%, #ffffff 100%);
  color: #223322;
  min-height: 100vh;
}

.main-header {
  text-align: center;
  padding: 30px 20px 15px;
  background: #2e7d32;
  color: white;
}

.main-header h1 {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.main-header p {
  font-size: 1.1rem;
  opacity: 0.95;
}

/* ===== TAB NAV ===== */
.tab-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  font-size: 1.1rem;
  font-weight: bold;
  padding: 14px 26px;
  border: none;
  border-radius: 50px;
  background: #dcedc8;
  color: #33691e;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.tab-btn.active {
  background: #2e7d32;
  color: white;
}

.tab-content {
  display: none;
  max-width: 800px;
  margin: 0 auto;
  padding: 10px 20px 60px;
}

.tab-content.active {
  display: block;
}

.hidden {
  display: none !important;
}

/* ===== PANEL HEADER / SCORE ===== */
.panel-header {
  text-align: center;
  margin-bottom: 20px;
}

.panel-header h2 {
  font-size: 1.8rem;
  color: #1b5e20;
  margin-bottom: 10px;
}

.score-board {
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: 1.2rem;
  font-weight: bold;
  background: white;
  border-radius: 14px;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: inline-flex;
}

/* ===== GAME: DRAG & DROP ===== */
.item-stage {
  text-align: center;
  margin: 30px 0;
}

.instruction-text {
  font-size: 1.15rem;
  margin-bottom: 20px;
  color: #444;
}

.draggable-item {
  font-size: 5rem;
  cursor: grab;
  display: inline-block;
  padding: 20px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  user-select: none;
  transition: transform 0.15s ease;
}

.draggable-item:active {
  cursor: grabbing;
  transform: scale(1.05);
}

.item-name {
  margin-top: 12px;
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
}

.shake {
  animation: shake 0.45s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-14px); }
  40% { transform: translateX(12px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(6px); }
}

.bins-container {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.bin {
  width: 160px;
  padding: 24px 10px;
  border-radius: 20px;
  text-align: center;
  cursor: pointer;
  color: white;
  font-weight: bold;
  font-size: 1.15rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.bin-icon {
  font-size: 2.6rem;
  margin-bottom: 8px;
}

.bin:hover, .bin.drag-over {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.bin-organik { background: #43a047; }
.bin-anorganik { background: #fbc02d; color: #3a2e00; }
.bin-b3 { background: #e53935; }

.feedback-popup {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: white;
  border-left: 8px solid #2e7d32;
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: bold;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  max-width: 90%;
  z-index: 100;
}

.feedback-popup.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.feedback-popup.correct { border-left-color: #2e7d32; color: #1b5e20; }
.feedback-popup.wrong { border-left-color: #e53935; color: #b71c1c; }

/* ===== RESULT SCREEN (shared) ===== */
.result-screen {
  text-align: center;
  background: white;
  border-radius: 20px;
  padding: 40px 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  margin-top: 20px;
}

.result-screen h2 {
  font-size: 1.8rem;
  color: #2e7d32;
  margin-bottom: 14px;
}

.result-screen p {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.primary-btn, .secondary-btn {
  font-size: 1.1rem;
  font-weight: bold;
  padding: 14px 30px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.primary-btn {
  background: #2e7d32;
  color: white;
}

.secondary-btn {
  background: #eceff1;
  color: #333;
  margin-top: 14px;
}

.primary-btn:hover, .secondary-btn:hover {
  transform: translateY(-2px);
}

/* ===== QUIZ ===== */
.quiz-card {
  background: white;
  border-radius: 22px;
  padding: 40px 30px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  text-align: center;
}

.quiz-question {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 30px;
  color: #1b5e20;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.quiz-option-btn {
  font-size: 1.15rem;
  padding: 16px 20px;
  border: 3px solid #a5d6a7;
  border-radius: 14px;
  background: white;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-letter {
  display: inline-block;
  background: #2e7d32;
  color: white;
  font-weight: bold;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  margin-right: 12px;
}

.quiz-option-btn:hover:not(.disabled) {
  border-color: #2e7d32;
  background: #f1f8f2;
  transform: translateX(4px);
}

.quiz-option-btn.disabled {
  cursor: default;
  opacity: 0.85;
}

.quiz-option-btn.correct {
  background: #c8e6c9;
  border-color: #2e7d32;
}

.quiz-option-btn.wrong {
  background: #ffcdd2;
  border-color: #e53935;
}

.quiz-feedback {
  font-size: 1.1rem;
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  text-align: left;
}

.quiz-feedback.correct { background: #e8f5e9; color: #1b5e20; }
.quiz-feedback.wrong { background: #ffebee; color: #b71c1c; }

/* ===== LEADERBOARD ===== */
.save-score-box {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.save-score-box input {
  font-size: 1.05rem;
  padding: 12px 16px;
  border-radius: 50px;
  border: 2px solid #a5d6a7;
  width: 220px;
}

.leaderboard {
  text-align: left;
  max-width: 320px;
  margin: 0 auto 20px;
}

.leaderboard h3 {
  text-align: center;
  color: #2e7d32;
  margin-bottom: 10px;
}

.leaderboard ol {
  background: #f1f8f2;
  border-radius: 14px;
  padding: 14px 14px 14px 34px;
}

.leaderboard li {
  font-size: 1.05rem;
  padding: 4px 0;
}

.main-footer {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 0.9rem;
}