/* styles.css */

/* Basic Reset and Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}
body {
  background-color: #f5f5f5;
  padding: 20px;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}
h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}
.tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
}
.tab {
  padding: 10px 20px;
  background-color: #eee;
  border: none;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  transition: background-color 0.2s;
}
.tab.active {
  background-color: #4caf50;
  color: #fff;
}
.tab-content {
  display: none;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 0 5px 5px 5px;
}
.tab-content.active {
  display: block;
}
.canvas-container {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  overflow: hidden;
}
canvas {
  border: 2px dashed #ccc;
  background-color: #f9f9f9;
  display: block;
  max-width: 100%;
  height: auto;
}
.upload-container {
  text-align: center;
  margin: 20px 0;
}
.btn {
  padding: 10px 20px;
  background-color: #4caf50;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s;
  margin: 5px;
}
.btn:hover {
  background-color: #45a049;
}
.btn-secondary {
  background-color: #2196f3;
}
.btn-secondary:hover {
  background-color: #0b7dda;
}
.btn-danger {
  background-color: #f44336;
}
.btn-danger:hover {
  background-color: #d32f2f;
}
.option-panel {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.option-item {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
  border-radius: 4px;
  position: relative;
}
.option-item img {
  max-width: 100%;
  height: auto;
  max-height: 100px;
  object-fit: contain;
}
.option-label {
  display: block;
  margin-top: 5px;
  font-weight: bold;
}
.delete-option {
  position: absolute;
  top: 0;
  right: 0;
  background-color: rgba(255, 0, 0, 0.7);
  color: #fff;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}
.option-settings {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.is-correct {
  margin-right: 5px;
}
.quiz-preview {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
}
.result-message {
  margin-top: 10px;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
  display: none;
}
.success {
  background-color: #e8f5e9;
  color: #2e7d32;
}
.error {
  background-color: #ffebee;
  color: #c62828;
}
.form-group {
  margin-bottom: 15px;
}
label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
input[type="text"],
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
textarea {
  min-height: 100px;
}
.export-options {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.help-text {
  margin: 10px 0;
  font-size: 14px;
  color: #666;
  text-align: center;
}
.flex-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.flex-item {
  flex: 1;
  min-width: 300px;
}
@media (max-width: 768px) {
  .flex-container {
    flex-direction: column;
  }
}
/* Draggable Options */
.draggable-options {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.draggable-option {
  border: 2px dashed #ccc;
  padding: 5px;
  cursor: move;
  transition: transform 0.2s;
}
.draggable-option img {
  max-width: 100px;
  max-height: 100px;
}
/* Cropper Modal */
.modal {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.4);
}
.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  max-width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
#cropperImage {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
}
.modal-content img {
  max-width: 100%;
}
.modal-buttons {
  display: flex;
  gap: 10px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}
/* Exported File Button */
#testQuizBtn {
  padding: 10px 20px;
  background-color: #4caf50;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 20px;
}
#testQuizBtn:hover {
  background-color: #45a049;
}
