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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  color: #2c3e50;
}

.hidden {
  display: none !important;
}

/* Status styles */
#status-container {
  text-align: center;
  padding: 40px 0;
}

#status-message {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Chat styles */
#chat-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

#chat-header {
  background-color: #3498db;
  color: white;
  padding: 15px;
  text-align: center;
}

#instructions {
  font-style: italic;
  margin-top: 5px;
  font-size: 0.9rem;
}

#messages-container {
  height: 400px;
  overflow-y: auto;
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.message {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 5px;
  max-width: 80%;
}

.message-self {
  background-color: #e1f5fe;
  margin-left: auto;
}

.message-other {
  background-color: #f1f1f1;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 0.85rem;
}

.message-username {
  font-weight: bold;
}

.message-time {
  color: #999;
}

.message-content {
  word-wrap: break-word;
}

#input-container {
  padding: 15px;
  display: flex;
}

#message-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: none;
  height: 60px;
}

#send-btn {
  margin-left: 10px;
  padding: 0 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#send-btn:hover {
  background-color: #2980b9;
}

/* Guess container */
#guess-container {
  padding: 15px;
  text-align: center;
  border-top: 1px solid #eee;
}

#guess-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.guess-btn {
  padding: 10px 20px;
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.guess-btn:hover {
  background-color: #27ae60;
}

/* Result styles */
#result-container {
  text-align: center;
  padding: 40px 0;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#result-title {
  margin-bottom: 20px;
}

#result-message {
  margin-bottom: 30px;
}

#play-again-btn {
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#play-again-btn:hover {
  background-color: #2980b9;
}