.upload-area {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  justify-content: center;
}

#dropZone {
  border: 2px dashed #4a6b32; /* darker green */
  padding: 40px;
  text-align: center;
  background: #1b2a17; /* very dark green */
  color: #a3c17f; /* muted light green */
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: inset 0 0 10px #3a5723cc;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}
#dropZone:hover {
  background-color: #254019;
  border-color: #7fbb53;
  color: #d0e8a6;
}

#modList {
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin: 0 auto 20px;
  color: #c7d8a8;
  font-weight: 600;
}

#modList li {
  background: #2c3b17; /* dark olive green */
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1.5px solid #597930;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 0 8px #4f6831aa;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
#modList li:hover {
  background-color: #3d5520;
  box-shadow: 0 0 12px #7caf44cc;
}

#modList button {
  margin-left: 8px;
  background-color: #7caf44;
  border: none;
  color: #1b2608;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 0 10px #a2c865aa;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#modList button:hover {
  background-color: #9dcd6e;
  box-shadow: 0 0 14px #b9e087cc;
}

#output {
  background: #0b1800; /* very dark greenish */
  color: #a3d15b; /* bright green */
  padding: 14px;
  overflow: auto;
  max-height: 300px;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: inset 0 0 4px #49741bcc;
  font-family: monospace, Consolas, 'Courier New', monospace;
  font-size: 0.95rem;
  user-select: text;
}

#reloadWorldBtn, #clearWorldBtn {
  display: block;
  margin: 16px auto 0 auto;
  padding: 12px 28px;
  font-weight: 700;
  background-color: #63812a;
  border: 2px solid #8eb84f;
  border-radius: 10px;
  color: #f0f7d4;
  cursor: pointer;
  box-shadow: 0 0 15px #7cb02b88;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
#reloadWorldBtn:hover, #clearWorldBtn:hover {
  background-color: #8eb84f;
  box-shadow: 0 0 20px #b5e65dcc;
}

#modList img {
  border-radius: 6px;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border: 1.5px solid #7ca943;
  box-shadow: 0 0 6px #9ecf5eaa;
}
/* Text input styling */
#urlInput {
  padding: 10px 14px;
  border: 2px solid #5c8033;
  border-radius: 8px;
  background-color: #1c2f13;
  color: #b4dc85;
  font-size: 0.95rem;
  width: 280px;
  box-shadow: inset 0 0 6px #3e5f26aa;
  transition: border-color 0.3s ease;
}
#urlInput:focus {
  border-color: #8ccf4f;
  outline: none;
}

/* File input styling */
#zipLoader {
  background-color: #2f4d1b;
  color: #cde7a6;
  border: 2px solid #5c8033;
  padding: 10px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 8px #7caf44aa;
  transition: background-color 0.3s ease;
}
#zipLoader:hover {
  background-color: #3f6724;
}

/* Buttons (reused for #folderLoader, #urlLoadBtn) */
#folderLoader,
#urlLoadBtn {
  background-color: #63812a;
  border: 2px solid #8eb84f;
  color: #f0f7d4;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 10px #7cb02b88;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
#folderLoader:hover,
#urlLoadBtn:hover {
  background-color: #8eb84f;
  box-shadow: 0 0 16px #b5e65dcc;
}

.upload-row {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-bottom: 12px;
}

.upload-row input[type="file"],
.upload-row input[type="text"],
.upload-row button {
  flex: 1;
  min-width: 0;
}

/* Optional: Make file input shrink slightly to match button size */
#zipLoader {
  flex: 2;
  max-width: 70%;
}
#folderLoader {
  flex: 1;
}

/* Optional: Balance the URL input and button better */
#urlInput {
  flex: 3;
}
#urlLoadBtn {
  flex: 1;
}

.world-button-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}


@media (max-width: 768px) {
  .upload-area,
  .upload-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .upload-row input[type="file"],
  .upload-row input[type="text"],
  .upload-row button,
  #zipLoader,
  #folderLoader,
  #urlInput,
  #urlLoadBtn {
    width: 100% !important;
    flex: unset !important;
  }

  #dropZone {
    padding: 24px;
    font-size: 0.95rem;
  }

  #modList li {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    word-break: break-word;
  }

  #modList button {
    align-self: flex-end;
    width: 100%;
  }

  #modList img {
    width: 32px;
    height: 32px;
  }

  #output {
    font-size: 0.9rem;
    max-height: 200px;
  }

  #reloadWorldBtn, #clearWorldBtn {
    width: 50%;
    font-size: 1rem;
    padding: 10px 20px;
  }

  #modList button,
  #reloadWorldBtn,
  #clearWorldBtn,
  #urlLoadBtn,
  #folderLoader {
    max-width: 200px;
  }
}


/* Layout container */
.world-container {
  display: flex;
  flex-direction: row;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Panels */
.left-panel,
.right-panel {
  flex: 1 1 48%;
  min-width: 300px;
  box-sizing: border-box;
}

/* Right panel box style */
.right-panel {
  background-color: #1b2a17;
  padding: 20px;
  border-radius: 10px;
  box-shadow: inset 0 0 10px #3a5723cc;
  color: #c7d8a8;
}

/* Upload area: stretch full width in panel */
.upload-area {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  justify-content: flex-start;
  width: 100%;
  box-sizing: border-box;
}

/* Make inputs and buttons responsive */
.upload-area input[type="text"],
.upload-area input[type="file"],
.upload-area button {
  flex: 1 1 100%;
  max-width: 100%;
}

/* Search bar */
#modSearch {
  padding: 10px 14px;
  border: 2px solid #5c8033;
  border-radius: 8px;
  background-color: #1c2f13;
  color: #b4dc85;
  font-size: 0.95rem;
  width: 100%;
  box-shadow: inset 0 0 6px #3e5f26aa;
  margin-bottom: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

/* Mod browser results */
#modBrowserList {
  max-height: 400px;
  overflow-y: auto;
  background-color: #26391a;
  border-radius: 8px;
  padding: 12px;
  box-shadow: inset 0 0 6px #45682eaa;
  box-sizing: border-box;
}

/* Drop zone and mod list */
#dropZone,
#modList,
#output {
  width: 100%;
  box-sizing: border-box;
}

#reloadWorldBtn, #clearWorldBtn {
  width: auto;
}

/* Make mod list not exceed container */
#modList {
  max-width: 100%;
  margin: 0 0 20px 0;
}