.case-converter-tool {
  max-width: 1160px;
}

header .flex-grow-1 {
  min-width: 0;
}

header h1 {
  overflow-wrap: anywhere;
}

.tool-panel {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(32, 45, 64, 0.08);
}

.tool-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.code-area {
  min-height: 320px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
}

.result-area {
  background: #1f2937;
  color: #f8fafc;
}

.options-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.status-message {
  border-radius: 8px;
  border: 1px solid #d8dee8;
  padding: 12px 14px;
  background: #f8fafc;
  color: #334155;
}

.status-message.is-success {
  border-color: #9dd7b0;
  background: #eefaf2;
  color: #14532d;
}

.status-message.is-error {
  border-color: #f3a7a7;
  background: #fff1f1;
  color: #8a1f1f;
}

.status-message.is-info {
  border-color: #b8d4f4;
  background: #f0f7ff;
  color: #1e3a5f;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stats-grid div,
.preview-section__body {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.stats-grid span {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
}

.stats-grid strong {
  display: block;
  color: #111827;
  font-size: 1.12rem;
  word-break: break-word;
}

.preview-section__body {
  max-height: 320px;
  overflow: auto;
}

.preview-section__body td,
.preview-section__body th {
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .options-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767.98px) {
  header h1 {
    font-size: 1rem;
    line-height: 1.2;
  }

  header a.ms-auto img {
    width: 64px;
  }

  .tool-panel {
    padding: 16px;
  }

  .tool-panel__header {
    display: block;
  }

  .tool-panel__header .button-row {
    margin-top: 16px;
  }

  .button-row .btn {
    flex: 1 1 45%;
  }

  .code-area {
    min-height: 250px;
  }

  .options-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
