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

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

main {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 400px;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  text-align: center;
}

form {
  display: flex;
  gap: 0.5rem;
}

#url-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  outline: none;
  transition: border-color 0.3s;
}

#url-input:focus {
  border-color: #007bff;
}

button {
  padding: 0.75rem 1.5rem;
  background: #007bff;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #0056b3;
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#error {
  margin-top: 1rem;
  color: #d9534f;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}

#result {
  margin-top: 1.5rem;
  display: none;
}

#original, #unshortened {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  word-break: break-all;
}

#original::before {
  content: "Original: ";
  color: #666;
}

#unshortened::before {
  content: "Unshortened: ";
  color: #666;
}

#unshortened a {
  color: #007bff;
  text-decoration: none;
}

#unshortened a:hover {
  text-decoration: underline;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#error.active, #result.active {
  display: block;
  animation: fadeIn 0.5s ease-in;
}
