
.webhook-app {
  max-width: 1450px;
  margin: auto;
  padding: 30px 20px;
  color: #f4f4f8;
}

.webhook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.webhook-header h1 {
  font-size: 32px;
  margin: 12px 0 5px;
}

.webhook-header p {
  color: #999;
}

.back-link {
  color: #a78bfa;
  text-decoration: none;
}

.status {
  color: #a78bfa;
  background: #21183c;
  padding: 10px 15px;
  border-radius: 20px;
}

.webhook-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 25px;
  align-items: start;
}

.editor-panel,
.preview-panel {
  background: #11131d;
  border: 1px solid #292c3c;
  border-radius: 16px;
  padding: 24px;
  min-width: 0;
}

.editor-panel h2,
.preview-panel h2 {
  font-size: 19px;
  margin: 0 0 20px;
}

.editor-panel label {
  display: block;
  margin: 16px 0 8px;
  color: #c9c7d6;
  font-size: 13px;
}

.editor-panel input,
.editor-panel textarea,
.editor-panel select {
  width: 100%;
  box-sizing: border-box;
  background: #090b12;
  color: white;
  border: 1px solid #343747;
  border-radius: 9px;
  padding: 12px;
  outline: none;
  font: inherit;
}

.editor-panel input:focus,
.editor-panel textarea:focus {
  border-color: #9470ff;
}

.editor-panel textarea {
  resize: vertical;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}

.embed-form {
  background: #191c29;
  border: 1px solid #303448;
  border-radius: 12px;
  padding: 17px;
  margin: 15px 0;
}

.embed-form h3 {
  margin: 0;
}

.embed-form .remove-embed {
  background: #51232d;
  color: #ffb8c2;
  border: 0;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
}

.embed-form input[type="color"] {
  height: 45px;
  padding: 4px;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.editor-actions button,
.secondary-btn,
.send-btn,
.reset-btn {
  border: 0;
  padding: 12px 16px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
}

.secondary-btn {
  background: #29233f;
  color: #c9b8ff;
}

.send-btn {
  background: #7952e8;
  color: white;
  flex: 1;
}

.reset-btn {
  background: #303342;
  color: white;
}

.discord-preview {
  background: #292b32;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  min-height: 150px;
}

.discord-avatar {
  background: #7952e8;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: bold;
  flex-shrink: 0;
}

.discord-message {
  min-width: 0;
  flex: 1;
}

.discord-name {
  font-weight: bold;
  margin-bottom: 10px;
}

.discord-name span {
  background: #5865f2;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 10px;
  margin-left: 5px;
}

.discord-name small {
  color: #aaa;
  font-weight: normal;
  margin-left: 7px;
}

.preview-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 10px;
}

.preview-embed {
  background: #202127;
  border-left: 4px solid #7952e8;
  border-radius: 5px;
  padding: 13px;
  margin: 10px 0;
  max-width: 520px;
  overflow-wrap: anywhere;
}

.preview-embed h3 {
  margin: 5px 0 10px;
}

.preview-embed p {
  white-space: pre-wrap;
  color: #ddd;
}

.preview-embed img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 5px;
  margin-top: 10px;
}

.preview-embed .thumbnail {
  float: right;
  width: 75px;
  height: 75px;
  object-fit: cover;
  margin: 0 0 8px 10px;
}

.preview-footer {
  color: #aaa;
  font-size: 12px;
  margin-top: 12px;
}

#jsonOutput {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #090b12;
  padding: 15px;
  border-radius: 9px;
  margin-top: 15px;
  color: #b9a5ff;
  max-height: 350px;
  overflow: auto;
}

#sendStatus {
  color: #c9b8ff;
  overflow-wrap: anywhere;
}

@media (max-width: 850px) {
  .webhook-layout {
    grid-template-columns: 1fr;
  }

  .webhook-header {
    align-items: flex-start;
  }
}
