body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #001e48;
  background: linear-gradient(135deg, #001e48 0%, #175059 50%, #823311 100%);
  min-height: 100vh;
  line-height: 1.6;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: #175059;
  box-shadow: 0 6px 0 #001e48, 0 12px 0 #823311;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  flex: 1;
}

.header-center {
  flex: 1;
  text-align: center;
}

.header-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.back-btn {
  color: #faeac3;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.back-btn:hover {
  color: #ed8824;
}

.game-title {
  font-family: 'Luckiest Guy', Arial Black, Arial, sans-serif;
  font-size: 1.8rem;
  color: #eb7317;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 #001e48;
  margin: 0;
}

#userName {
  color: #faeac3;
  font-weight: 500;
}

#settingsBtn {
  background-color: #823311;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

#settingsBtn:hover {
  background-color: #6b2a0e;
  transform: translateY(-1px);
}

.main {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 84px);
  padding: 40px 20px;
}

.game-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  border: 3px solid #faeac3;
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.game-section h2 {
  font-family: 'Luckiest Guy', Arial Black, Arial, sans-serif;
  font-size: 2.2rem;
  color: #001e48;
  margin-bottom: 16px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #faeac3;
}

.game-section p {
  color: #175059;
  font-size: 1.1rem;
  margin-bottom: 32px;
  font-weight: 500;
}

.game-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.game-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.game-btn.primary {
  background-color: #ed8824;
  color: #fff;
  box-shadow: 0 4px 0 #823311;
}

.game-btn.primary:hover {
  background-color: #eb7317;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #823311;
}

.game-btn.secondary {
  background-color: #175059;
  color: #fff;
  box-shadow: 0 4px 0 #001e48;
}

.game-btn.secondary:hover {
  background-color: #1a5762;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #001e48;
}

.game-btn:not(.primary):not(.secondary) {
  background-color: #823311;
  color: #fff;
  box-shadow: 0 4px 0 #001e48;
}

.game-btn:not(.primary):not(.secondary):hover {
  background-color: #6b2a0e;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #001e48;
}

.game-code-section {
  margin-top: 24px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid #ed8824;
}

.game-code-section.hidden {
  display: none;
}

#gameCodeInput {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

#gameCodeInput:focus {
  outline: none;
  border-color: #ed8824;
  box-shadow: 0 0 0 3px rgba(237, 136, 36, 0.2);
}

.password-section,
.player-name-section {
  margin-top: 1rem;
}

.password-section input,
.player-name-section input {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  border: 3px solid #175059;
  border-radius: 12px;
  background: white;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.password-section input:focus,
.player-name-section input:focus {
  outline: none;
  border-color: #ed8824;
  box-shadow: 0 0 20px rgba(237, 136, 36, 0.3);
}

.error-message {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid #ff4444;
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
  font-weight: 500;
  text-align: center;
}

.success-message {
  color: #00aa00;
  background: rgba(0, 170, 0, 0.1);
  border: 1px solid #00aa00;
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
  font-weight: 500;
  text-align: center;
}

.hidden {
  display: none !important;
}

.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
  .header {
    padding: 15px 20px;
  }
  
  .header-right {
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
  }
  
  .game-title {
    font-size: 1.5rem;
  }
  
  .main {
    padding: 20px 15px;
  }
  
  .game-section {
    padding: 30px 25px;
  }
  
  .game-section h2 {
    font-size: 1.8rem;
  }
  
  .game-buttons {
    gap: 12px;
  }
  
  .game-btn {
    padding: 12px 24px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .header-left,
  .header-center,
  .header-right {
    flex: none;
  }
  
    .game-section h2 {
      font-size: 1.6rem;
    }
  }