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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

#linkContainer {
    margin: 2rem 0 2rem 0;
    a {
      font-size: 1.2rem;
    }
}

h1 {
  font-size: 2rem;
  margin: 2rem 0 1rem 0;
  color: #1a1a1a;
  border-bottom: 3px solid #4a90e2;
  padding-bottom: 0.5rem;
}

h1:first-of-type {
  margin-top: 0;
}

h2 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem 0;
  color: #555;
  font-weight: 600;
}

textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.95rem;
  resize: vertical;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

#encodedIn8192,
#encodedIn64,
#decoded {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  min-height: 60px;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.95rem;
  word-break: break-all;
  color: #2c3e50;
  margin-bottom: 1rem;
}

#encodedIn8192Count
{
  font-size: 1.1rem;
}

#decodeError {
  background: #fee;
  color: #c33;
  padding: 1rem;
  border-radius: 8px;
  border: 2px solid #fcc;
  margin-top: 0.5rem;
  display: none;
  font-weight: 500;

  li {
    list-style-position: inside;
  }
}

#decodeError:not(:empty) {
  display: block;
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.1rem;
  }
}
