.ast-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 1.2rem 1rem 1.2rem;
  min-height: 100vh;
  box-sizing: border-box;
  color: #181818;
  font-family: 'Segoe UI', 'Nunito', Arial, sans-serif;
}

.ast-hero {
  text-align: center;
  margin-bottom: 2.3rem;
}

.ast-hero h1 {
  color: #b93434;
  margin: 0;
  font-size: 2.4rem;
}

.ast-subtitle {
  margin-top: 0.6rem;
  color: #b93434;
  font-size: 1.2rem;
}

.ast-translator {
  background: #fff;
  border: 2px solid #b93434;
  border-radius: 20px;
  padding: 1.4rem 1rem 1.5rem;
  margin-bottom: 2.2rem;
  box-shadow: 0 4px 28px 0 #b9343420;
}

.ast-slang-input {
  width: 100%;
  font-size: 1.1rem;
  padding: 0.7em 1em;
  border-radius: 10px;
  border: 1px solid #b93434;
  outline: none;
  color: #181818;
  background: #fff;
  box-sizing: border-box;
}

.ast-submit-btn {
  margin-top: 1em;
  background: #b93434;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.7em 1.2em;
  font-size: 1em;
  cursor: pointer;
  width: 100%;
}

.ast-translation-box {
  margin-top: 1.25em;
  min-height: 3.5em;
  background: #fff7f7;
  border-radius: 18px;
  font-size: 1em;
  color: #262626;
  border: 1px solid #f5d2d2;
  padding: 1.1rem;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 0 #ffffff;
}

.ast-copy-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #b93434;
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: none;
  box-shadow: 0 8px 18px #b9343430;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  z-index: 2;
}

.ast-translation-box:hover .ast-copy-btn {
  display: block;
}

.ast-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px #b9343440;
}

.ast-copy-btn.ast-copied {
  display: block;
  background: #1f7a4d;
  box-shadow: 0 8px 18px #1f7a4d30;
}

.ast-translation-text {
  display: block;
}

.ast-loading-message {
  margin-top: 0.7em;
  color: #8c2b2b;
  font-style: italic;
  font-size: 0.95em;
  min-height: 1.3em;
}

.ast-loading-active {
  background: #fff5f5;
  border: 1px solid #f4d1d1;
  border-radius: 999px;
  display: inline-block;
  padding: 0.35rem 0.75rem;
}

.ast-result-card {
  background: linear-gradient(180deg, #ffffff 0%, #fffafa 100%);
  border: 1px solid #efc6c6;
  border-radius: 16px;
  padding: 1.25rem;
  padding-top: 1.35rem;
  box-shadow: 0 14px 35px #b9343418;
}

.ast-result-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-right: 5.5rem;
}

.ast-result-label {
  color: #9a3030;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1.2;
}

.ast-result-chip {
  background: #fff5f5;
  color: #b93434;
  border: 1px solid #f4caca;
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.1;
}

.ast-result-term {
  color: #181818;
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 800;
  margin-top: 0.18rem;
  overflow-wrap: anywhere;
}

.ast-result-main {
  border: 1px solid #f0c5c5;
  border-left: 5px solid #b93434;
  background: #fff4f4;
  border-radius: 12px;
  padding: 1rem 1.05rem;
  margin-bottom: 0.85rem;
}

.ast-result-main span,
.ast-result-summary span,
.ast-result-example span,
.ast-result-item span {
  display: block;
  color: #8c2b2b;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.2;
  margin-bottom: 0.42rem;
}

.ast-result-main strong {
  display: block;
  color: #181818;
  font-size: 1.45rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.ast-result-summary {
  background: #ffffff;
  border: 1px solid #f2d5d5;
  border-radius: 12px;
  padding: 1rem 1.05rem;
  margin-bottom: 0.85rem;
}

.ast-result-example {
  background: #fff8f1;
  border: 1px solid #f0d8bd;
  border-radius: 12px;
  padding: 1rem 1.05rem;
  margin-bottom: 0.85rem;
}

.ast-result-summary p,
.ast-result-example p {
  margin: 0;
  color: #262626;
  font-size: 1.05rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.ast-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.ast-result-item {
  background: #ffffff;
  border: 1px solid #f2dada;
  border-radius: 12px;
  padding: 0.95rem;
  min-height: 5.25rem;
}

.ast-result-item p {
  margin: 0;
  color: #262626;
  font-size: 0.98rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ast-message-result {
  background: #ffffff;
  border: 1px solid #f2d5d5;
  border-radius: 12px;
  color: #262626;
  line-height: 1.6;
  padding: 1rem;
  padding-right: 5.5rem;
  white-space: pre-line;
}

@media (max-width: 640px) {
  .ast-translation-box {
    padding: 0.85rem;
  }

  .ast-copy-btn {
    position: static;
    display: none;
    width: 100%;
    margin-top: 0.75rem;
  }

  .ast-translation-box:hover .ast-copy-btn,
  .ast-copy-btn.ast-copied {
    display: block;
  }

  .ast-result-top {
    display: block;
    padding-right: 0;
  }

  .ast-result-grid {
    display: block;
  }

  .ast-result-chip {
    display: inline-block;
    margin-top: 0.7rem;
  }

  .ast-result-item {
    margin-top: 0.75rem;
  }

  .ast-result-term {
    font-size: 1.55rem;
  }

  .ast-result-main strong {
    font-size: 1.18rem;
  }

  .ast-message-result {
    padding-right: 1rem;
  }
}
