body {
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 16px;
  background: #f5f5f5;
}

.card {
  background: white;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 80vh;
}

.messages {
  flex: 1;
  overflow-y: scroll;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.messages::-webkit-scrollbar {
  display: none;
}

.message {
  margin-bottom: 8px;
}

.message.user {
  text-align: right;
  font-weight: bold;
}

.input {
  display: flex;
  gap: 8px;
}

input {
  flex: 1;
  padding: 12px;
  font-size: 16px;
}

button {
  padding: 12px;
  font-size: 16px;
}

/* ---------- EFFECTS ---------- */

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0);
  }
}

.card.shake {
  animation: shake 0.4s;
}

.input-locked .input {
  opacity: 0.5;
  pointer-events: none;
}

.input-locked .input::after {
  content: "…";
  position: absolute;
  right: 12px;
  opacity: 0.6;
}

/* Typing indicator */
.typing-indicator {
  font-size: 20px;
  color: #666;
  padding: 6px 4px;
}

.typing-indicator span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  background: #999;
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}
.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% {
    opacity: 0.2;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0.2;
  }
}

/* Choices */
.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.choice-button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  text-align: left;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.choice-button:hover:not(:disabled) {
  background: #e0e0e0;
}

.choice-button:active:not(:disabled) {
  background: #d0d0d0;
}

.choice-button:disabled,
.choice-button.choice-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
}

/* ===================== Landing view ===================== */

.landing {
  max-width: 480px;
  margin: 0 auto;
}

.landing-title {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.landing-description {
  margin: 0 0 12px;
  color: #555;
}

.landing-rules {
  padding-left: 20px;
  margin: 0 0 16px;
  color: #333;
}

.landing-rules li {
  margin-bottom: 4px;
}

.landing-player {
  margin: 0 0 20px;
  color: #555;
}

.btn-play {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: bold;
  background: #1a73e8;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.05em;
}

.btn-play:hover:not(:disabled) {
  background: #1557b0;
}

.btn-play:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.landing-error {
  margin-top: 12px;
  color: #d32f2f;
  font-size: 0.9rem;
}

/* ===================== Media in chat ===================== */

.message-media {
  max-width: 100%;
  border-radius: 4px;
  display: block;
  margin-top: 4px;
}

/* Error message */
.message.error {
  color: #d32f2f;
  background: #ffebee;
  padding: 8px;
  border-radius: 4px;
  border-left: 4px solid #d32f2f;
}
