:root {
  --bg-color: #f9fafe;
  --primary-color: #3b82f6;
  --accent-bg: #eff6ff;
  --text-color: #111827;
  --border-color: #dbeafe;
  --error-color: #ef4444;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  /* background: url('background.gif') repeat; */
  background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05)), url('background.gif') repeat;
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

h1 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  text-align: center;
}

input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: border 0.2s;
}

input[type="text"]:focus {
  border-color: var(--primary-color);
  outline: none;
}

#encodeBtn {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem;
  font-size: 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

#encodeBtn:hover {
  background: #2563eb;
}

#resultBox {
  background: var(--accent-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1.5rem;
  word-wrap: break-word;
  animation: fadeIn 0.3s ease-in-out;
}

.hidden {
  display: none;
}

#resultBox h2 {
  margin-top: 0;
}

#copyBtn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

#error {
  color: var(--error-color);
  margin-top: 1rem;
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}