/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: #f5f7fa;
  color: #1e2a3a;
  padding: 30px 20px;
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.05);
  padding: 30px 35px;
}

h1 {
  font-size: 26px;
  font-weight: 600;
  color: #1e2a3a;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.instruction {
  font-size: 16px;
  color: #5b6f82;
  margin-bottom: 28px;
  border-left: 4px solid #3b82f6;
  padding-left: 16px;
  background: #f8faff;
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}

/* ===== WORD BANK ===== */
.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px;
  background: #f0f4fe;
  border-radius: 16px;
  border: 1px solid #d9e2f0;
  min-height: 70px;
  margin-bottom: 30px;
  align-items: center;
}

/* ===== DRAGGABLE WORDS ===== */
.draggable {
  display: inline-block;
  background: #fbbf24;
  color: #1e293b;
  padding: 6px 16px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  cursor: grab;
  user-select: none;
  touch-action: none; /* stops the browser treating touch drags as scroll/zoom */
  transition: all 0.15s;
  letter-spacing: 0.3px;
}

.draggable:hover {
  transform: scale(1.02);
  background: #f59e0b;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.draggable.dragging {
  opacity: 0.85;
  cursor: grabbing;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  transform: scale(1.04);
  transition: none;
}

/* ===== DROP ZONES ===== */
.drop-zone, .drop-blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  height: 38px;
  background: #f8faff;
  border: 2px dashed #b9c8e0;
  border-radius: 40px;
  padding: 0 14px;
  margin: 0 4px;
  vertical-align: middle;
  transition: all 0.15s;
  font-size: 15px;
  font-weight: 500;
  color: #1e2a3a;
}

.drop-zone.filled, .drop-blank.filled {
  border-style: solid;
  border-color: #94a3b8;
  background: #ffffff;
}

.drop-zone .draggable, .drop-blank .draggable {
  background: transparent;
  box-shadow: none;
  padding: 0 4px;
  font-weight: 600;
  color: #1e2a3a;
}

/* ===== FEEDBACK COLORS ===== */
.correct {
  background-color: #d1fae5 !important;
  color: #065f46 !important;
  border-color: #34d399 !important;
}

.incorrect {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #f87171 !important;
}

/* ===== PARTS OF SPEECH CONTAINER ===== */
.pos-container {
  background: white;
  padding: 18px 20px;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
  border: 1px solid #e9edf4;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 30px;
}

.pos-box {
  flex: 1 0 160px;
  min-width: 140px;
  background: #f8faff;
  border-radius: 16px;
  padding: 12px 10px 14px;
  border: 1px solid #dfe7f2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pos-box h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #3b82f6;
  margin-bottom: 4px;
  font-weight: 600;
}

.pos-box .counter {
  font-size: 12px;
  color: #5b6f82;
  margin-bottom: 8px;
}

.pos-drop-area {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  width: 100%;
  min-height: 44px;
}

.pos-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  width: 100%;
  min-height: 40px;
}

/* ===== SENTENCE CARDS ===== */
.sentence-card {
  background: #ffffff;
  padding: 16px 20px;
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px solid #e9edf4;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.sentences {
  margin-top: 20px;
}

.sentence-num {
  font-weight: 600;
  color: #5b6f82;
  margin-right: 8px;
}

.example-word {
  background: #eef2f6;
  border: 1px solid #d0d9e6;
  padding: 2px 10px;
  border-radius: 40px;
  font-weight: 600;
  color: #1e2a3a;
  display: inline-block;
}

/* ===== DIALOGUE STYLES ===== */
.dialogue {
  font-size: 17px;
  line-height: 2.2;
}

.blank-number {
  font-weight: 600;
  color: #3b82f6;
  margin-right: 5px;
  font-size: 14px;
  pointer-events: none;
}

/* ===== SELECT / DROPDOWN BLANKS ===== */
.select-blank {
  display: inline-block;
  min-width: 150px;
  height: 38px;
  background-color: #f8faff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0L5 6L10 0Z' fill='%235b6f82'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px 6px;
  border: 2px dashed #b9c8e0;
  border-radius: 40px;
  padding: 0 32px 0 16px;
  margin: 0 4px;
  vertical-align: middle;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #1e2a3a;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.15s;
}

.select-blank:focus {
  outline: none;
  border-color: #3b82f6;
}

.select-blank.filled {
  border-style: solid;
  border-color: #94a3b8;
  background-color: #ffffff;
}

.select-blank.correct,
.select-blank.incorrect {
  border-style: solid;
}

/* ===== WORD BANK CARD ===== */
.word-bank-card {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid #e9edf4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
