
/* Vocabulary Matching Game v3.2.3 */

.vg-game {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.35;
}

.vg-game * {
  box-sizing: border-box;
}

.vg-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0 6px 0;
}

.vg-date {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280 !important;
  white-space: nowrap;
}

.vg-instructions {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.vg-instructions-text {
  font-weight: 600;
  color: #111827 !important;
}

.vg-progress {
  color: #6b7280 !important;
  font-weight: 600;
}

.vg-controls {
  display: flex;
  gap: 12px;
  padding: 6px 0 10px 0;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
}

.vg-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}

.vg-control-label {
  font-size: 12px;
  color: #6b7280 !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.vg-topic, .vg-level {
  width: 100%;
  max-width: 320px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  background: #ffffff;
  color: #111827 !important;
  -webkit-text-fill-color: #111827;
  font-size: 14px;
  line-height: 1.2;
  height: 40px;
}

.vg-status {
  padding: 0 0 10px 0;
  color: #b91c1c;
  font-size: 13px;
  min-height: 18px;
}

/* Board uses rows (each row has a word + definition). */
.vg-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 12px 0;
}

.vg-board-head {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr; /* words narrower, defs wider */
  gap: 10px;
}

.vg-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vg-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 10px;
  position: relative;
  overflow: visible;
}

.vg-row .vg-card {
  z-index: 1;
}

.vg-col-title {
  font-size: 12px;
  color: #6b7280 !important;
  font-weight: 700;
  margin: 0 0 6px 2px;
}

.vg-card {
  position: relative;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  background: #ffffff;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  text-transform: none !important;
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: transform 80ms ease, box-shadow 80ms ease;
}

.vg-card:focus {
  outline: none;
}

.vg-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.10);
}

.vg-card .vg-card-text {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  text-transform: none !important;
  position: relative;
  z-index: 1;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  word-break: break-word;
}

.vg-card.vg-type-def .vg-card-text {
  font-weight: 500;
}

.vg-card.vg-is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.vg-card.vg-is-selected {
  border-color: rgba(37, 99, 235, 0.9) !important;
  background: rgba(59, 130, 246, 0.10) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.vg-card.vg-is-locked {
  border-color: rgba(22, 163, 74, 0.85) !important;
  background: rgba(22, 163, 74, 0.12) !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12) !important;
  cursor: default;
  padding-right: 38px;
}

/* Checkmark on each locked card (reverted from row-level). */
.vg-card.vg-is-locked::after {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: 900;
  color: rgba(22, 163, 74, 0.30);
  pointer-events: none;
  z-index: 0;
}

.vg-card.vg-is-wrong {
  border-color: rgba(220, 38, 38, 0.9) !important;
  background: rgba(220, 38, 38, 0.10) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.vg-btn {
  appearance: none;
  border: 0;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.03em;
  background: #2563eb;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 80ms ease, box-shadow 80ms ease, opacity 120ms ease;
  height: 40px;
  white-space: nowrap;
}

.vg-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.vg-btn:active {
  transform: translateY(0);
}

.vg-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.vg-finish {
  padding: 10px 0;
}

.vg-finish-box {
  border-radius: 14px;
  border: 1px solid rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.08);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.vg-finish-title {
  font-weight: 800;
  color: #065f46 !important;
}

@media (max-width: 720px) {
  .vg-board {
    grid-template-columns: 1fr;
  }
  .vg-btn {
    width: auto;
  }
  .vg-control {
    min-width: 160px;
  }
}
