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

body {
  min-height: 100vh;
  padding: 30px 20px;
  background: linear-gradient(135deg, #0f172a, #134e4a);
  color: #e2e8f0;
  font-family: "Space Grotesk", sans-serif;
}
header {
  margin-bottom: 16px;
}

h1 span,
h1,
h2 {
  background: linear-gradient(90deg, #77cda0, #f95738);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Main layout */
main {
  width: min(100%, 1000px);
  margin: 10px auto;
}

/* Input area */
.text-area {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Text inputs */
textarea {
  width: 100%;
  max-width: 460px;
  height: 180px;
  padding: 16px;
  resize: vertical;
  outline: none;

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(94, 234, 212, 0.6);
  border-radius: 12px;

  color: #e2fdf9;
  font: inherit;
  line-height: 1.6;
}

textarea:focus {
  border-color: #5eead4;
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

textarea::placeholder {
  color: #94a3b8;
}

/* Compare button */
#compare,
#show,
#clear,
.delete {
  display: block;
  margin: 24px auto 0;
  padding: 11px 28px;

  background: rgba(255, 255, 255, 0.09);
  color: #e2fdf9;

  border: 1px solid rgba(94, 234, 212, 0.4);
  border-radius: 10px;

  font: inherit;
  font-weight: 600;
  cursor: pointer;

  transition: 0.2s ease;
}

.show-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#show,
#clear,
.delete {
  display: inline-flex;
  margin: 10px auto;
  padding: 10px;
}

#compare:hover,
#show:hover,
#clear:hover {
  background: rgba(94, 234, 212, 0.15);
  border-color: #5eead4;
  transform: translateY(-2px);
}

/* Results */
.results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

/* Result cards */
.text,
.common {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}
#match {
  line-height: 1.8;
}

.text p {
  line-height: 1.8;
  word-break: break-word;
}

span {
  font-weight: 700;
  color: #e2fdf9;
  padding-right: 2px;
}

/* Matched characters */
.match {
  background: #77cda0;
  color: #045c43;
  padding: 2px 3px;
  border-radius: 4px;
}

/* Different characters */
.difference {
  background: #e1a4a4;
  color: #b91c1c;
  padding: 2px 3px;
  border-radius: 4px;
}
#all {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-inline: 16px;
}
#warning {
  text-align: center;
}
.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-inline: 10px;
}
.content {
  line-height: 1.8;
}
[hidden] {
  display: none !important;
}
/* Mobile */
@media (max-width: 650px) {
  body {
    padding: 25px 15px;
  }
  .results {
    grid-template-columns: 1fr;
  }
  textarea {
    max-width: 100%;
    height: 130px;
  }
  h1 {
    font-size: 1.6rem;
  }
  h1 .material-symbols-outlined {
    font-size: 1.4rem;
    vertical-align: middle;
  }
  h2 {
    font-size: 1rem;
  }
  #compare,
  #show,
  #clear,
  .delete {
    font-size: 0.75rem;
    padding: 8px 10px;
  }
  #show,
  #clear{
    font-size: 0.55rem;
  }
  span {
    font-weight: 600;
    font-size: 0.9rem;
  }
  p {
    font-size: 0.8rem;
  }
  button:focus-visible {
    outline: 2px solid #5eead4;
    outline-offset: 3px;
  }
  .text p {
    overflow-wrap: anywhere;
  }
  .show-info div{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap:5px
  }
}
