:root {
  --duo-green: #28d246;
  --duo-green-shadow: #22b33c;
  --duo-blue: #1CB0F6;
  --duo-blue-shadow: #1899D6;
  --duo-text: #4B4B4B;
  --duo-bg-creator: #FFFFFF;
}

.creator-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  flex-direction: column;
  background-color: var(--duo-bg-creator);
  overflow: hidden;
}

/* Top Progress Bar */
.creator-header {
  height: 64px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 2px solid #CDCDCD;
  background: white;
  z-index: 100;
}

.btn-close {
  font-size: 24px;
  color: #AFAFAF;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.1s;
}

.btn-close:hover {
  color: var(--duo-text);
}

.progress-container {
  flex: 1;
  height: 16px;
  background-color: #CDCDCD;
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 45%;
  background-color: var(--duo-green);
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* Split Main Content */
.creator-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Left Question Panel */
.question-panel {
  width: 500px;
  background: white;
  border-right: 2px solid #CDCDCD;
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  overflow-y: auto;
  gap: 20px;
}

.question-panel h1 {
  font-size: 24px;
  font-weight: 800;
  color: #3C3C3C;
  margin-bottom: 4px;
}

.question-card {
  border: 2px solid #CDCDCD;
  border-radius: 20px;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-card h2 {
  font-size: 18px;
  font-weight: 800;
  color: #3C3C3C;
  margin-bottom: 4px;
}

.input-field {
  border: 2px solid #CDCDCD;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  background-color: #F7F7F7;
  color: #4B4B4B;
  transition: border-color 0.1s;
  width: 100%;
  resize: none;
  overflow-y: hidden;
  box-sizing: border-box;
  line-height: 1.4;
}

.input-field:focus {
  outline: none;
  border-color: var(--duo-blue);
  background-color: white;
}

.input-correct {
  border-color: var(--duo-green);
  background-color: #f1fff0;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.option-group label {
  font-size: 13px;
  font-weight: 800;
  color: #757575;
  text-transform: uppercase;
  margin-left: 4px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.option-group textarea {
  padding-right: 60px !important; /* Space for the circle */
}

.selection-circle {
  position: absolute;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 3px solid #CDCDCD;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  z-index: 10;
}

.selection-circle i {
  color: white;
  font-size: 16px;
  display: none;
}

.option-group.is-correct .selection-circle {
  background-color: var(--duo-green);
  border-color: var(--duo-green);
}

.option-group.is-correct .selection-circle i {
  display: block;
}

.option-group.is-correct textarea {
  border-color: var(--duo-green);
  background-color: #f1fff0;
}

.card-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-action {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid #CDCDCD;
  background: white;
  color: #757575;
}

.btn-delete:hover {
  border-color: #ff4b4b;
  color: #ff4b4b;
}

.btn-map:hover {
  border-color: var(--duo-blue);
  color: var(--duo-blue);
}

.btn-image:hover {
  border-color: var(--duo-blue);
  color: var(--duo-blue);
}

.image-preview-container {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #CDCDCD;
  background-color: #F7F7F7;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  margin-top: 8px;
}

.image-preview-container img {
  max-width: 100%;
  max-height: 250px;
  display: block;
  object-fit: contain;
}

.btn-remove-image {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(255, 75, 75, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.1s;
}

.btn-remove-image:hover {
  transform: scale(1.1);
  background: #ff4b4b;
}

/* Right Map View */
.map-panel {
  flex: 1;
  background-image: url('assets/map_bg.png');
  background-size: cover;
  background-position: center;
  position: relative;
}

.map-overlay-hint {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 12px 24px;
  border-radius: 16px;
  border: 2px solid #CDCDCD;
  font-weight: 700;
  color: #777;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100;
  pointer-events: none; /* Make it click-through */
}

.header-title-input {
  font-size: 28px !important;
  font-weight: 800 !important;
  color: var(--duo-text);
  border: none !important;
  background-color: transparent !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-top: -10px;
}

.header-title-input:focus {
  outline: none;
  border-bottom: 3px solid var(--duo-blue) !important;
  border-radius: 0;
}

.creator-info-group label {
  font-size: 13px;
  font-weight: 800;
  color: #757575;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}
.game-stats-overlay {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  width: 580px; /* Fixed width */
  height: 76px;  /* Fixed height */
  box-sizing: border-box;
  padding: 0 40px;
  border-radius: 24px;
  border: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  pointer-events: none; /* Make it ignore mouse interactions */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-group {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 120px; /* Ensure groups have consistent footprint */
}

.stat-group i {
  font-size: 20px;
  color: var(--duo-blue);
  background: #f0f9ff;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.05);
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  font-weight: 800;
  color: #757575;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #3C3C3C;
  line-height: 1;
}

.stat-group:nth-child(2) i { color: #58CC02; background: #f1fff0; }
.stat-group:nth-child(3) i { color: #FF9600; background: #fff9f0; }

.char-counter {
  font-size: 11px;
  font-weight: 800;
  color: #757575;
  margin-bottom: 2px;
}

/* Toggle Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CDCDCD;
  transition: .4s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: var(--duo-green);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--duo-green);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}
