/* tools.css */
.tool-container {
  padding: 2rem 0;
  max-width: 900px;
  margin: auto;
}

.tool-header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeInDown 1s;
}

.tool-header h1 {
    margin-bottom: 0.5rem;
}

.io-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.io-box {
  background-color: var(--secondary-background-color);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.io-box h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

textarea {
  width: 100%;
  min-height: 250px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  background-color: var(--background-color);
  color: var(--text-color);
  padding: 10px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  resize: vertical;
  transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.tool-actions, .output-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover-color);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}
.btn-secondary:hover {
  background-color: #5a6268;
}

#output-box {
  position: relative;
}

.output-actions {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

@media (max-width: 768px) {
  .io-container {
    grid-template-columns: 1fr;
  }
  .output-actions {
    position: static;
    margin-top: 1rem;
    justify-content: flex-start;
  }
}