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

body {
  font-family: Arial, sans-serif;
  background: #36393f;
  color: #dcddde;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

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

h1 {
  color: #fff;
  margin-bottom: 8px;
}

.subtitle {
  color: #b9bbbe;
}

.status-banner {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.status-banner.info {
  background: rgba(88, 101, 242, 0.18);
  border-color: rgba(88, 101, 242, 0.35);
}

.status-banner.success {
  background: rgba(59, 165, 93, 0.18);
  border-color: rgba(59, 165, 93, 0.35);
}

.status-banner.warning {
  background: rgba(250, 166, 26, 0.18);
  border-color: rgba(250, 166, 26, 0.35);
}

.status-banner.error {
  background: rgba(237, 66, 69, 0.18);
  border-color: rgba(237, 66, 69, 0.35);
}

.auth-section {
  max-width: 420px;
  margin: 80px auto;
}

.auth-card,
.form-section,
.preview-section {
  background: #2f3136;
  padding: 20px;
  border-radius: 8px;
}

.auth-card h2,
.form-section h2,
.preview-section h2,
.form-section h3 {
  color: #fff;
  margin-bottom: 15px;
}

.main-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
}

.form-section,
.preview-section {
  max-height: 88vh;
  overflow-y: auto;
}

label {
  display: block;
  margin-top: 15px;
  margin-bottom: 6px;
  color: #b9bbbe;
  font-size: 14px;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px;
  background: #40444b;
  border: 1px solid #202225;
  color: #dcddde;
  border-radius: 4px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button {
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.send-btn,
.secondary-btn,
.add-btn {
  padding: 10px 14px;
  color: #fff;
}

.send-btn {
  width: 100%;
  margin-top: 20px;
  background: #5865f2;
  font-weight: bold;
}

.send-btn:hover,
.preview-button:hover {
  background: #4752c4;
}

.secondary-btn {
  background: #4f545c;
}

.secondary-btn:hover {
  background: #5d6269;
}

.add-btn {
  background: #3ba55d;
}

.add-btn:hover {
  background: #2d7d46;
}

.compact-btn {
  width: auto;
  white-space: nowrap;
}

.formatting-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.formatting-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  background: #40444b;
  border: 1px solid #202225;
  border-radius: 6px;
}

.toolbar-btn {
  padding: 8px 12px;
  background: #4f545c;
  color: #fff;
}

.toolbar-btn:hover {
  background: #5d6269;
}

.inline-action {
  display: flex;
  gap: 10px;
  align-items: center;
}

.inline-action select {
  flex: 1;
}

#mentionTargetSelect {
  max-width: 180px;
}

.date-picker-wrapper {
  display: flex;
  gap: 10px;
}

.date-picker-wrapper input {
  flex: 1;
}

.helper-text {
  margin-top: 6px;
  color: #9ea2a8;
  font-size: 13px;
}

.warning-text {
  color: #f7c948;
}

.preview-list {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.file-preview-item,
.attachment-item,
.button-item {
  background: #40444b;
  padding: 14px;
  border-radius: 6px;
  position: relative;
}

.file-preview-item img,
.file-preview-item video,
.preview-image {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 4px;
  background: #202225;
}

.file-preview-label {
  margin-top: 10px;
  word-break: break-word;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

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

.remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ed4245;
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
}

.remove-btn:hover {
  background: #c03537;
}

.attachment-item .remove-btn {
  position: static;
}

.preview-shell {
  background: #2b2d31;
  border: 1px solid #1f2023;
  border-radius: 10px;
  padding: 14px;
}

.preview-shell-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.preview-shell-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865f2, #7983f5);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
}

.preview-shell-title {
  color: #fff;
  font-weight: 700;
}

.preview-shell-subtitle {
  color: #aeb4bb;
  font-size: 12px;
  margin-top: 2px;
}

.preview-message {
  background: #313338;
  border: 1px solid #3a3d44;
  border-radius: 8px;
  padding: 18px;
}

.preview-title {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0;
  word-break: break-word;
  line-height: 1.15;
}

.preview-release {
  color: #dbdee1;
}

.preview-divider {
  height: 1px;
  background: #4f545c;
  margin: 14px 0;
}

.preview-markdown {
  color: #dbdee1;
  word-break: break-word;
}

.preview-markdown > * + * {
  margin-top: 10px;
}

.preview-paragraph {
  line-height: 1.45;
}

.preview-heading {
  color: #fff;
  font-weight: 700;
  line-height: 1.25;
}

.preview-heading-1 {
  font-size: 28px;
}

.preview-heading-2 {
  font-size: 22px;
}

.preview-heading-3 {
  font-size: 18px;
}

.preview-quote {
  border-left: 4px solid #4e5058;
  padding-left: 12px;
  color: #c9ccd1;
}

.preview-list {
  padding-left: 22px;
  line-height: 1.45;
}

.preview-code-block {
  background: #1e1f22;
  border: 1px solid #111214;
  border-radius: 6px;
  padding: 12px;
  overflow-x: auto;
  color: #f2f3f5;
}

.preview-inline-code {
  background: #1e1f22;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.95em;
}

.preview-inline-link {
  color: #00a8fc;
  text-decoration: none;
}

.preview-inline-link:hover {
  text-decoration: underline;
}

.preview-inline-timestamp {
  color: #ebedef;
}

.preview-underline {
  text-decoration: underline;
}

.preview-strikethrough {
  text-decoration: line-through;
}

.preview-description,
.preview-release,
.preview-footer {
  margin: 0;
}

.preview-footer {
  color: #aeb4bb;
  font-size: 12px;
}

.preview-attachments,
.preview-media-gallery,
.preview-buttons {
  display: grid;
  gap: 12px;
}

.preview-attachment-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #2b2d31;
  border: 1px solid #3f4248;
  border-radius: 8px;
  padding: 12px;
}

.preview-attachment-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #5865f2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.preview-attachment-meta {
  min-width: 0;
}

.preview-attachment-name {
  color: #fff;
  font-weight: 600;
  word-break: break-word;
}

.preview-attachment-kind {
  color: #aeb4bb;
  font-size: 12px;
  margin-top: 4px;
}

.preview-media-gallery {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.preview-media-frame {
  background: #2b2d31;
  border: 1px solid #3f4248;
  border-radius: 8px;
  overflow: hidden;
}

.preview-media {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: #202225;
  display: block;
}

.preview-media-caption {
  padding: 10px 12px;
  font-size: 13px;
  color: #c9ccd1;
  word-break: break-word;
}

.preview-buttons {
  grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
}

.preview-button {
  background: #5865f2;
  color: #fff;
  padding: 10px 16px;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
}

.preview-empty-state {
  color: #aeb4bb;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }

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

  .inline-action,
  .date-picker-wrapper,
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }
}
