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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  color: white;
  font-family: Arial, sans-serif;
  background-color: #111;
}

.container {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* changed so content stays higher */
  align-items: center;
  text-align: center;
  padding: 80px 20px 20px;
  background-image: url('bg-desktop.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .container {
    background-image: url('bg-mobile.png');
  }
}

h1 {
  font-size: 28px;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.explanation {
  font-size: 15px;
  line-height: 1.5;
  max-width: 420px;
  margin-bottom: 28px;
  opacity: 0.9;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

#characterInput {
  width: 100%;
  max-width: 320px;
  padding: 12px 16px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  margin-bottom: 16px;
  text-align: center;
}

button {
  padding: 14px 32px;
  font-size: 17px;
  background-color: #444c4c;     /* default color */
  color: white;
  border: none;
  border-radius: 0px;            /* sharper corners */
  cursor: pointer;
  margin-bottom: 24px;
  transition: background-color 0.2s;
}

button.active {
  background-color: #db0616;     /* color when text is typed */
}

button:hover {
  filter: brightness(1.1);
}

#result {
  font-size: 17px;
  line-height: 1.7;
  max-width: 420px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  min-height: 160px;             /* keeps layout stable */
}

/* Shake animation */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-6px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.3s ease;
}

button {
  transition: background-color 0.2s, opacity 0.15s;
}

.patreon-link {
  margin-top: 40px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.patreon-link:hover {
  color: #ff4d4d;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.secondary-btn {
  padding: 8px 18px;
  font-size: 14px;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  cursor: pointer;
}

.secondary-btn:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

#result {
  max-height: 38vh;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 6px;
}

.patreon-link {
  margin-top: 16px;
  margin-bottom: 20px;
}