* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #0f1115;
  color: #f1f1f1;
  font-family: Inter, sans-serif;
}

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

header {
  margin-bottom: 20px;
}

header h1 {
  margin: 0;
  font-size: 34px;
}

header p {
  margin-top: 8px;
  color: #999;
}

.upload-section {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.upload-box {
  flex: 1;
  background: #1b1f27;
  border: 1px solid #2c313c;
  border-radius: 10px;
  padding: 18px;
}

.upload-box label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.actions-panel {
  background: #1b1f27;
  border: 1px solid #2c313c;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.output-actions {
  display: flex;
  gap: 12px;
}

button {
  border: none;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

button:hover {
  opacity: 0.92;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#generateBtn {
  background: #4f7cff;
  color: white;
}

#copyBtn {
  background: #1f9d67;
  color: white;
}

#downloadBtn {
  background: #444;
  color: white;
}

.info-cards {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.info-card {
  background: #1b1f27;
  border: 1px solid #2c313c;
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 150px;
}

.info-card span {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}

.info-card strong {
  font-size: 18px;
  color: white;
}

.top-controls {
  margin-bottom: 18px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #bbb;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
}

.panel {
  background: #1b1f27;
  border: 1px solid #2c313c;
  border-radius: 10px;
  overflow: hidden;
}

.panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid #2c313c;
}

.panel-header h2 {
  margin: 0;
  font-size: 16px;
}

.panel-body {
  padding: 16px;
}

#fileTree {
  max-height: 700px;
  overflow: auto;
}

.tree-folder,
.tree-file {
  margin: 2px 0;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.tree-children {
  margin-left: 22px;
}

.folder-toggle {
  width: 16px;
  cursor: pointer;
  user-select: none;
  color: #aaa;
}

.folder-name {
  font-weight: 600;
  color: #ddd;
}

.file-name {
  color: #bbb;
}

.file-disabled {
  opacity: 0.4;
}

.extension-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #bbb;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;

  margin-top: 20px;
  padding: 18px 4px 4px;

  border-top: 1px solid #2c313c;

  color: #777;
  font-size: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-divider {
  color: #555;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  border-radius: 8px;

  background: #1b1f27;
  border: 1px solid #2c313c;

  color: #888;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.footer-icon-link:hover {
  background: #222834;
  color: #fff;
  border-color: #3d4656;
}

.footer-icon-link svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 1000px) {

  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {

  .upload-section {
    flex-direction: column;
  }

  .output-actions {
    flex-direction: column;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}