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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 600px;
}

h1 {
  text-align: center;
  color: white;
  margin-bottom: 30px;
  font-size: 2.5em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

h2 {
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

h3 {
  color: #555;
  margin-bottom: 15px;
}

input[type="text"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
}

.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

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

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.info-text {
  text-align: center;
  color: #666;
  margin-bottom: 20px;
}

.info-text.small {
  font-size: 14px;
}

.players-section {
  margin: 20px 0;
}

.player-list {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  max-height: 300px;
  overflow-y: auto;
}

.player-item {
  padding: 10px;
  background: white;
  margin-bottom: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-item:last-child {
  margin-bottom: 0;
}

.player-name {
  font-weight: 500;
  color: #333;
}

.host-badge {
  background: #ffc107;
  color: #000;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.word-display {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  font-size: 2.5em;
  font-weight: bold;
  margin: 20px 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.role-display {
  background: #f8f9fa;
  border: 3px solid #667eea;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 25px;
  color: #333;
}

.role-display.impostor {
  background: #ffe6e6;
  border-color: #dc3545;
  color: #dc3545;
}

.role-display.regular {
  background: #e6f7ff;
  border-color: #28a745;
  color: #28a745;
}

#wordRevealSection {
  text-align: center;
  padding: 40px 20px;
}

#wordSection {
  margin-top: 20px;
}

.game-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.game-info p {
  color: #555;
  margin-bottom: 10px;
  line-height: 1.6;
}

.game-info p:last-child {
  margin-bottom: 0;
}

.voting-list {
  margin: 20px 0;
}

.vote-option {
  background: #f8f9fa;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.vote-option:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

.vote-option.selected {
  background: #667eea;
  color: white;
  border-color: #764ba2;
}

.vote-status {
  text-align: center;
  color: #666;
  font-style: italic;
  margin-top: 20px;
}

.results-content {
  margin: 20px 0;
}

.result-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.result-section h3 {
  margin-bottom: 10px;
}

.result-highlight {
  font-size: 1.3em;
  font-weight: bold;
  color: #667eea;
  margin: 10px 0;
}

.result-success {
  color: #28a745;
}

.result-failure {
  color: #dc3545;
}

.vote-count {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  background: white;
  margin-bottom: 5px;
  border-radius: 4px;
}

.error-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #dc3545;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: none;
  max-width: 300px;
  z-index: 1000;
}

.error-message.show {
  display: block;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
  }
  to {
    transform: translateX(0);
  }
}

/* Responsive Design */
@media (max-width: 600px) {
  h1 {
    font-size: 2em;
  }

  .card {
    padding: 20px;
  }

  .word-display {
    font-size: 1.8em;
    padding: 30px 20px;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
