/* ==== Global Styles ==== */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ==== Container ==== */
.container {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  max-width: 1100px;
  width: 90%;
}

/* ==== Top Heading ==== */
.topheading {
  text-align: center;
  font-size: 16px;
  color: #fff;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* ==== Token Styling ==== */
.token {
  display: inline-block;
  padding: 5px 10px;
  background: linear-gradient(135deg, #f9f9f9, #e6e6e6);
  border-radius: 20px;
  margin: 5px 5px 0 0;
  font-size: 0.9rem;
  color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, background 0.3s ease;
}
.token:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
}

/* ==== Layout for Large Screens ==== */
@media (min-width: 900px) {
  .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 20px 30px;
  }

  /* Top heading spans both */
  .topheading {
    grid-column: 1 / span 2;
    font-size: 18px;
  }

  /* Headings */
  .lfthead,
  .rgthead {
    font-size: 18px;
    text-align: center;
    color: #fff;
    margin-bottom: 10px;
  }

  /* Input & token box same height */
  textarea,
  .tokens {
    width: 90%;
    height: 40vh;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 1rem;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
  }

  /* Buttons full width */
  .leftdiv button,
  .rightdiv .clearBtn {
    width: 94%;
    padding: 12px;
    margin-top: 12px;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: #fff;
    transition: all 0.3s ease;
  }

  .clearBtn {
    background: linear-gradient(135deg, #ff4e50, #f9d423);
  }

  button:hover {
    opacity: 0.9;
  }
}

/* ==== Layout for Small Screens ==== */
@media (max-width: 899px) {
  .lfthead,
  .rgthead {
    text-align: center;
    color: #fff;
  }

  textarea,
  .tokens {
    width: 90%;
    min-height: 12em;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    border: none;
    padding: 10px;
    font-size: 1rem;
    margin-bottom: 10px;
    overflow-y: auto;
  }

  button {
    width: 94%;
    padding: 12px;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: #fff;
    transition: all 0.3s ease;
    margin-top: 5px;
  }

  .clearBtn {
    background: linear-gradient(135deg, #ff4e50, #f9d423);
  }
}
