* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Courier New", "Monaco", "Menlo", "Ubuntu Mono", monospace;
  background: #ffffff;
  color: #000000;
  line-height: 1.4;
  font-size: 14px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: left;
  margin-bottom: 30px;
  border-bottom: 2px solid #000000;
  padding-bottom: 15px;
}

header h1 {
  font-size: 24px;
  margin-bottom: 5px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

header p {
  font-size: 12px;
  color: #666666;
  font-family: "Courier New", monospace;
}

.input-section {
  background: #f8f8f8;
  border: 1px solid #000000;
  padding: 20px;
  margin-bottom: 20px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group:last-child {
  margin-bottom: 0;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.input-group input[type="url"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #000000;
  background: #ffffff;
  font-family: "Courier New", monospace;
  font-size: 14px;
  outline: none;
}

.input-group input[type="url"]:focus {
  border: 2px solid #000000;
}

.input-group input[type="file"] {
  display: block;
  margin-bottom: 10px;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.proxy-option {
  margin: 15px 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-size: 12px;
  color: #000000;
  user-select: none;
  font-family: "Courier New", monospace;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 16px;
  width: 16px;
  background-color: #ffffff;
  border: 1px solid #000000;
  margin-right: 5px;
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
  display: inline-block;
}

.checkbox-label:hover input ~ .checkmark {
  background-color: #f0f0f0;
}

.checkbox-label input:checked ~ .checkmark {
  background-color: #000000;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 3px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-text {
  flex: 1;
}

button {
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  padding: 8px 16px;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  outline: none;
}

button:hover {
  background: #ffffff;
  color: #000000;
}

button:disabled {
  background: #cccccc;
  color: #666666;
  cursor: not-allowed;
  border-color: #cccccc;
}

.loading {
  text-align: center;
  padding: 30px;
  background: #f8f8f8;
  border: 1px solid #000000;
  margin-bottom: 20px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #000000;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.error {
  background: #ffffff;
  border: 1px solid #ff0000;
  padding: 15px;
  margin-bottom: 20px;
  color: #ff0000;
  font-family: "Courier New", monospace;
}

.tree-container {
  background: #f8f8f8;
  border: 1px solid #000000;
  padding: 20px;
  margin-bottom: 20px;
}

.tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid #000000;
  padding-bottom: 10px;
}

.tree-header h2 {
  color: #000000;
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tree {
  font-family: "Courier New", "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
}

.tree-node {
  margin: 2px 0;
  cursor: pointer;
  padding: 2px 5px;
  border-left: 2px solid transparent;
}

.tree-node:hover {
  background-color: #e0e0e0;
  border-left-color: #000000;
}

.tree-node.selected {
  background-color: #ffffff;
  color: #000000;
  border-left: 3px solid #000000;
  border-right: 1px solid #000000;
  border-top: 1px solid #000000;
  border-bottom: 1px solid #000000;
}

.tree-node-content {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tree-toggle {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  color: #000000;
  font-size: 10px;
}

.tree-toggle.expanded {
  transform: rotate(90deg);
}

.tree-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  font-size: 10px;
  color: #000000;
}

.tree-label {
  color: inherit;
  font-weight: normal;
}

.tree-children {
  margin-left: 20px;
  border-left: 1px solid #cccccc;
  padding-left: 10px;
  display: none;
}

.tree-children.expanded {
  display: block;
}

.copy-section {
  background: #f8f8f8;
  border: 1px solid #000000;
  padding: 20px;
}

.copy-section h3 {
  margin-bottom: 10px;
  color: #000000;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.copy-section p {
  margin-bottom: 15px;
  color: #000000;
  font-size: 12px;
}

.copy-info {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

#selected-node {
  font-weight: bold;
  color: #000000;
  background: #ffffff;
  padding: 5px 10px;
  border: 1px solid #000000;
  font-family: "Courier New", monospace;
  font-size: 12px;
  flex-shrink: 0;
}

.copy-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.copy-buttons button {
  white-space: nowrap;
}

.leaves-preview {
  background: #ffffff;
  border: 1px solid #000000;
  padding: 10px;
  font-family: "Courier New", "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 11px;
  line-height: 1.4;
  max-height: 150px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  header h1 {
    font-size: 20px;
  }

  .input-section,
  .tree-container,
  .copy-section {
    padding: 15px;
  }

  .tree-header {
    flex-direction: column;
    align-items: stretch;
  }

  .tree-header button {
    width: 100%;
  }

  .copy-info {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-buttons {
    width: 100%;
  }

  .copy-buttons button {
    width: 100%;
  }
}
