body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  max-width: 900px;
  margin: 20px auto;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

h1 {
  font-size: 26px;
  margin-bottom: 20px;
  color: #2E6A28;
  text-align: center;
}

label {
  display: block;
  margin-top: 16px;
  font-weight: 600;
  color: #2E6A28;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

input[type="text"],
input[type="datetime-local"],
textarea {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="datetime-local"]:focus,
textarea:focus {
  border-color: #2E6A28;
  box-shadow: 0 0 6px rgba(46,106,40,0.3);
}

.fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.field-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  background-color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
}

.field-item:hover {
  background-color: #e1f2dd;
  border-color: #2E6A28;
}

.field-item span.checkbox-wrapper {
  width: 20px;
  display: flex;
  justify-content: center;
}

.field-item input {
  margin: 0;
  accent-color: #2E6A28;
}

#build {
  display: block;
  margin: 24px auto 32px auto; /* gap from fields and bottom */
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: linear-gradient(135deg, #2E6A28, #70B84F);
  color: #fff;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
}

#build:hover {
  background: linear-gradient(135deg, #3c8040, #88c46b);
  transform: translateY(-1px);
}

#build:active {
  transform: translateY(0);
}

.result-container {
  position: relative;
  width: 100%;
}

#copy {
  position: absolute;
  top: 0;
  right: 0;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
  background: linear-gradient(135deg, #2E6A28, #70B84F);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  z-index: 1;
}

#copy:hover {
  background: linear-gradient(135deg, #3c8040, #88c46b);
}

textarea {
  margin-top: 28px; /* leave space for copy button above */
  height: 70px;
  padding: 10px 12px;
  font-family: monospace;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  resize: none;
}

@media (max-width: 720px) {
  .fields {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .fields {
    grid-template-columns: 1fr;
  }
}

#tag-wrapper {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 5px;
  margin-top: 10px;
}

#tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

#tag-container .tag {
  background: linear-gradient(135deg, #2E6A28, #4CAF50);
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.tag button {
  background: transparent;
  border: none;
  color: white;
  margin-left: 5px;
  cursor: pointer;
  font-weight: bold;
}

.tabs {
  margin-top: 15px;
}

.tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: #e0e0e0;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: background 0.3s;
}

.tab-btn:hover {
  background: #ccc;
}

.tab-btn.active {
  background: linear-gradient(90deg, #2E6A28, #4CAF50);
  color: white;
}

.tab-content {
  display: none;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 10px;
  background: #fafafa;
}

.tab-content.active {
  display: block;
}