* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background-color: #121212;
  color: #ffffff;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  margin: 30px 0 20px;
  font-weight: normal;
}

.settings-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 10000;
  padding: 5px;
}
.settings-toggle:hover {
  color: #ccc;
}

.generate-toggle {
  position: fixed;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 10000;
  padding: 5px;
}
.generate-toggle:hover {
  color: #ccc;
}

#ccgToggle { top: 60px; }
#tgToggle  { top: 100px; }

.settings-container {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 12px;
  width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  z-index: 9999;
}
.hidden {
  display: none;
}

.settings-container label {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
  color: #dddddd;
  font-size: 14px;
  font-weight: 500;
}
.checkbox-label {
  display: flex;
  align-items: center;
  margin-top: 12px;
  cursor: pointer;
}
.checkbox-label input {
  margin-right: 8px;
  transform: scale(1.2);
}

.settings-container select,
.settings-container input[type="text"],
.settings-container input[type="number"],
.settings-container input[type="file"] {
  width: 100%;
  background-color: #252525;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  box-sizing: border-box;
  margin-bottom: 8px;
}
.settings-container input[type="file"]::-webkit-file-upload-button {
  background: #2a2a2a;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
}
.settings-container input[type="file"]::-webkit-file-upload-button:hover {
  background: #333;
}

.form-container {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
  margin-bottom: 30px;
}
.form-container textarea,
.form-container button,
.form-container select,
.form-container input[type="text"],
.form-container input[type="file"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  background: #2a2a2a;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 16px;
}
.form-container textarea {
  resize: vertical;
  min-height: 200px;
  font-family: monospace;
}
.form-container select {
  height: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,\
<svg fill='white' height='24' viewBox='0 0 24 24' width='24'\
 xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/>\
<path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-position: right 10px center;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.form-container button {
  background: #fff;
  color: #121212;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}
.form-container button:hover {
  background: #ccc;
}

.progress-container {
  margin-bottom: 15px;
}
.progress-bar {
  width: 100%;
  height: 10px;
  background: #333;
  border-radius: 5px;
  overflow: hidden;
}
.progress-bar-inner {
  height: 100%;
  width: 0;
  background: #4caf50;
  border-radius: 5px;
  transition: width 0.3s ease;
}
.progress-text {
  margin-top: 5px;
  text-align: center;
  font-size: 13px;
  color: #aaa;
}

.results-section {
  width: 90%;
  max-width: 800px;
  margin: 20px auto 0;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-title {
  display: inline-flex;
  align-items: center;
  font-size: 18px;
  padding-left: 10px;
  border-left: 5px solid transparent;
}
.section-title.success { border-left-color: #4caf50; }
.section-title.failed  { border-left-color: #f44336; }
.section-title.error   { border-left-color: #ff9800; }

.section-toggle {
  background: #2a2a2a;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
}
.section-toggle:hover {
  background: #3a3a3a;
}

.section-content {
  margin-top: 10px;
}
.result-item {
  background: #1e1e1e;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  word-break: break-all;
  line-height: 1.4;
}
.result-item.success { border-left: 5px solid #4caf50; }
.result-item.failed  { border-left: 5px solid #f44336; }
.result-item.error   { border-left: 5px solid #ff9800; }

#ccgContainer .generate-button,
#tgContainer  .generate-button {
  width: 100%;
  padding: 10px;
  margin-top: 15px;
  background: #fff;
  color: #121212;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}
#ccgContainer .generate-button:hover,
#tgContainer  .generate-button:hover {
  background: #ccc;
}
